JP2011199473A - Device for setting bit rate - Google Patents

Device for setting bit rate Download PDF

Info

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
Application number
JP2010062513A
Other languages
Japanese (ja)
Other versions
JP5075932B2 (en
Inventor
Akiko Shimazaki
亜希子 島崎
Miyuki Yanagida
みゆき 柳田
Mitsuro Ikeda
充郎 池田
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.)
NTT Electronics Corp
Original Assignee
NTT Electronics 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 NTT Electronics Corp filed Critical NTT Electronics Corp
Priority to JP2010062513A priority Critical patent/JP5075932B2/en
Publication of JP2011199473A publication Critical patent/JP2011199473A/en
Application granted granted Critical
Publication of JP5075932B2 publication Critical patent/JP5075932B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To set a bit rate so as to record all codes of a moving image in a recording medium with respect to an encoder of a variable bit rate system.SOLUTION: A cumulative code amount calculation unit 14 outputs a cumulative code amount D. A remaining capacity calculation unit 15 subtracts the cumulative code amount D from recording medium capacity C to obtain the remaining capacity (C-D). An encoded recording time length acquisition unit 16 acquires encoded recording time length N. A remaining recording time length calculation unit 17 subtracts the encoded recording time length N from moving image recording time length M to obtain the remaining recording time length (M-N). A bit rate calculation unit 18 divides the remaining capacity (C-D) by the remaining recording time length (M-N) to obtain the bit rate K. A bit rate setting unit 19 sets bit rate BR equal to the bit rate K in a bit rate calculation unit 22 of an encoder 2.

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 encoding device 2 corresponds to the data amount of the encoding target portion of the moving image V so as to encode the moving image V so as to obtain the total code amount corresponding to the bit rate BR set from the outside. This is a variable bit rate type encoding apparatus that encodes the encoding target portion at a bit rate larger or smaller than the bit rate BR.

符号化装置2は、例えば、動画像記憶装置3から送信される動画像Vを可変ビットレート方式で符号化し、符号を符号蓄積装置4に送信し、蓄積する。   For example, the encoding device 2 encodes the moving image V transmitted from the moving image storage device 3 by the variable bit rate method, and transmits the code to the code storage device 4 for storage.

符号化装置2は、動画像Vを符号化する符号化部21と、符号化部21から符号化対象部分のデータ量を取得し、データ量が大の場合は、例えば、激しい動きが連続する符号化対象部分の場合は、ビットレートBRより大きいビットレートを計算し、一方、データ量が小の場合は、例えば、静止画である符号化対象部分の場合は、ビットレートBRより小さいビットレートを計算し、そのビットレートを符号化部21に与えるビットレート計算部22を有し、符号化部21は、与えられるビットレートで符号化対象部分を符号化する。   The encoding device 2 acquires an encoding unit 21 that encodes the moving image V and the data amount of the encoding target portion from the encoding unit 21. If the data amount is large, for example, intense motion continues. In the case of the encoding target part, a bit rate larger than the bit rate BR is calculated. On the other hand, when the data amount is small, for example, in the case of the encoding target part which is a still image, the bit rate smaller than the bit rate BR And a bit rate calculation unit 22 that gives the bit rate to the encoding unit 21. The encoding unit 21 encodes the encoding target portion at the given bit rate.

これにより、符号化装置2は、ビットレートBRに応じた総符号量が得られるように動画像Vを符号化できるようになっている。   Thereby, the encoding apparatus 2 can encode the moving image V so that the total code amount according to the bit rate BR can be obtained.

総符号量に対応する全ての符号は、符号蓄積装置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).

特開2000−156857号公報JP 2000-156857 A

図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 encoding unit 21, the period from the beginning of encoding to an arbitrary timing The total code amount is equal to the target code amount P0, that is, the constant integral of the bit rate during the period, and increases with a constant slope equal to the bit rate BR.

しかし、動画像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 encoding device 2 so that all codes can be recorded on the recording medium.

しかし、符号化装置2は、例えば、他社製で内部が非公開であることや、既に集積化されていることがあり、実際には機能追加は困難である。   However, for example, the encoding device 2 may be made by another company and the inside thereof may not be disclosed, or may be already integrated, so that it is actually difficult to add functions.

本発明は、上記の課題に鑑みてなされたものであり、その目的とするところは、可変ビットレート方式の符号化装置に対し動画像の全ての符号を記録媒体に記録できるようなビットレートを設定できるビットレート設定装置を提供することにある。   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.

第1の実施の形態に係るビットレート設定装置の構成と利用形態を示す図である。It is a figure which shows the structure and utilization form of the bit rate setting apparatus which concern on 1st Embodiment. 第1の実施の形態における累積符号量が理想的には記録媒体容量に等しくなる仕組みを説明するための図である。It is a figure for demonstrating the mechanism in which the accumulation code amount in 1st Embodiment becomes ideally equal to a recording medium capacity | capacitance. 第1の実施の形態における実際の累積符号量の変化の様子を示す図である。It is a figure which shows the mode of the change of the actual accumulation code amount in 1st Embodiment. 第2の実施の形態に係るビットレート設定装置の構成と利用形態を示す図である。It is a figure which shows the structure and utilization form of the bit rate setting apparatus which concern on 2nd Embodiment. 第2の実施の形態における累積符号量が理想的には記録媒体容量に等しくなる仕組みを説明するための図である。It is a figure for demonstrating the mechanism in which the accumulated code amount in 2nd Embodiment becomes ideally equal to a recording medium capacity | capacitance. 従来における符号化装置の構成と利用形態を示す図である。It is a figure which shows the structure and utilization form of the encoding apparatus in the past. 従来における符号化の過程での総符号量の変化の様子を示す図である。It is a figure which shows the mode of the change of the total code amount in the process of the encoding in the past.

以下、本発明の実施の形態を図面を参照して説明する。   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 encoding device 2.

符号化装置2は、ビットレート設定装置1から設定されるビットレートBRに応じた総符号量が得られるように動画像Vを符号化すべく動画像Vの符号化対象部分のデータ量に応じてビットレートBRより大きいまたは小さいビットレートで符号化対象部分を符号化する可変ビットレート方式の符号化装置である。   The encoding device 2 depends on the data amount of the encoding target portion of the moving image V so as to encode the moving image V so that the total code amount corresponding to the bit rate BR set from the bit rate setting device 1 is obtained. This is a variable bit rate type encoding apparatus that encodes a part to be encoded at a bit rate larger or smaller than the bit rate BR.

符号化装置2は、例えば、動画像記憶装置3から送信される動画像Vを可変ビットレート方式で符号化し、符号を符号蓄積装置4に送信し、蓄積する。   For example, the encoding device 2 encodes the moving image V transmitted from the moving image storage device 3 by the variable bit rate method, and transmits the code to the code storage device 4 for storage.

符号化装置2は、動画像Vを符号化する符号化部21と、符号化部21から符号化対象部分のデータ量を取得し、データ量が大の場合は、例えば、激しい動きが連続する符号化対象部分の場合は、ビットレートBRより大きいビットレートを計算し、一方、データ量が小の場合は、例えば、静止画である符号化対象部分の場合は、ビットレートBRより小さいビットレートを計算し、そのビットレートを符号化部21に与えるビットレート計算部22を有し、符号化部21は、ビットレート計算部22から与えられるビットレートで符号化対象部分を符号化する。   The encoding device 2 acquires an encoding unit 21 that encodes the moving image V and the data amount of the encoding target portion from the encoding unit 21. If the data amount is large, for example, intense motion continues. In the case of the encoding target part, a bit rate larger than the bit rate BR is calculated. On the other hand, when the data amount is small, for example, in the case of the encoding target part which is a still image, the bit rate smaller than the bit rate BR And a bit rate calculation unit 22 that gives the bit rate to the encoding unit 21, and the encoding unit 21 encodes the part to be encoded at the bit rate supplied from the bit rate calculation unit 22.

これにより、符号化装置2は、ビットレート設定装置1から設定されるビットレートBRに応じた総符号量が得られるように動画像Vを符号化できるようになっている。   Thereby, the encoding apparatus 2 can encode the moving image V so that the total code amount corresponding to the bit rate BR set from the bit rate setting apparatus 1 can be obtained.

ビットレート設定装置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 encoding device 2.

ビットレート設定装置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 capacity storage unit 11 and a moving image recording time length M that is a recording time length (also referred to as a reproduction time length) of the moving image V (for example, a time length of 2 hours when the moving image V is a movie) are stored in advance. A moving image recording time length storage unit 12, a timer 13 that outputs a timing signal t at each timing, for example, a code is monitored and a cumulative code amount is continuously calculated, and a timing signal t is received. When the accumulated code amount calculation unit 14 for outputting the accumulated code amount D, which is the latest calculated value, is output at the timing, and the accumulated code amount D is output, the recording medium capacity C is read from the recording medium capacity storage unit 11 and recorded. The remaining capacity calculation unit 15 that calculates the remaining capacity (C−D) obtained by subtracting the accumulated code amount D from the medium capacity C and the timing at which the timing signal t is received, for example, the encoded accumulated from the encoding device 2. If the encoded recording time length acquisition unit 16 that acquires the encoded recording time length N, which is the recording time length of the moving image portion corresponding to the code amount, is acquired, The remaining recording time length is calculated by reading the moving image recording time length M from the image recording time length storage unit 12 and calculating the remaining recording time length (MN) obtained by subtracting the encoded recording time length N from the moving image recording time length M. If the calculation unit 17 calculates the remaining capacity (CD) and the remaining recording time length (MN), the bit rate obtained by dividing the remaining capacity (CD) by the remaining recording time length (MN). Bit rate calculation to calculate K (= (C−D) ÷ (MN)) When the bit rate K is calculated, the unit 18 includes a bit rate setting unit 19 that sets a bit rate BR equal to the bit rate K in the bit rate calculation unit 22 of the encoding device 2, and an input unit (not shown).

(第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 capacity storage unit 11, and the moving image recording time length M is the moving image recording time. It is stored in the time length storage unit 12.

タイマー13は、例えば、符号化装置2へ動画像Vが送信開始される以前のタイミングを含め、10秒ごとの各タイミングにタイミング信号tを出力する。   For example, the timer 13 outputs a timing signal t at each timing of 10 seconds including the timing before the transmission of the moving image V to the encoding device 2 is started.

累積符号量計算部14は、まず、1回目のタイミング信号tを受信したタイミングで、累積符号量Dであるゼロを出力する。   The accumulated code amount calculation unit 14 first outputs zero as the accumulated code amount D at the timing of receiving the first timing signal t.

残存容量計算部15は、累積符号量Dであるゼロが出力されたなら、記録媒体容量記憶部11から記録媒体容量Cである、例えば、4.7ギガバイトを読み出し、記録媒体容量Cからゼロを減じ、残存容量(C−D)である4.7ギガバイトを得る。   The remaining capacity calculation unit 15 reads out, for example, 4.7 gigabytes, which is the recording medium capacity C, from the recording medium capacity storage unit 11 and outputs zero from the recording medium capacity C when zero which is the accumulated code amount D is output. Subtract and obtain 4.7 GB, the remaining capacity (C-D).

符号化済記録時間長取得部16は、まず、1回目のタイミング信号tを受信したタイミングで、例えば、符号化装置2から、符号化済記録時間長Nであるゼロを取得する。   The encoded recording time length acquisition unit 16 first acquires, for example, zero that is the encoded recording time length N from the encoding device 2 at the timing of receiving the first timing signal t.

残存記録時間長計算部17は、符号化済記録時間長Nが取得されたなら、動画像記録時間長記憶部12から動画像記録時間長Mである、例えば2時間を読み出し、動画像記録時間長Mから符号化済記録時間長N(ゼロ)を減じ、残存記録時間長(M−N)である、例えば2時間を得る。   If the encoded recording time length N is acquired, the remaining recording time length calculation unit 17 reads out, for example, 2 hours, which is the moving image recording time length M, from the moving image recording time length storage unit 12, and the moving image recording time The encoded recording time length N (zero) is subtracted from the length M to obtain, for example, 2 hours, which is the remaining recording time length (MN).

ビットレート計算部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 rate calculation unit 18 calculates the remaining capacity (C−D). Dividing by the remaining recording time length (M−N), the bit rate K (= (C−D) ÷ (M−N)), that is, the initial bit rate K0 is obtained.

ビットレート設定部19は、初期ビットレートK0が計算されたなら、初期ビットレートK0に等しいビットレートBRを符号化装置2のビットレート計算部22に設定する。   When the initial bit rate K0 is calculated, the bit rate setting unit 19 sets a bit rate BR equal to the initial bit rate K0 in the bit rate calculation unit 22 of the encoding device 2.

ビットレート計算部22は、符号化部21から符号化対象部分のデータ量を取得し、データ量が大の場合は、例えば、激しい動きが連続する符号化対象部分の場合は、初期ビットレートK0より大きいビットレートを計算し、一方、データ量が小の場合は、例えば、静止画である符号化対象部分の場合は、初期ビットレートK0より小さいビットレートを計算し、そのビットレートを符号化部21に与える。   The bit rate calculation unit 22 acquires the data amount of the encoding target portion from the encoding unit 21. When the data amount is large, for example, in the case of the encoding target portion where intense motion continues, the initial bit rate K0. When a larger bit rate is calculated, on the other hand, when the amount of data is small, for example, in the case of an encoding target portion that is a still image, a bit rate smaller than the initial bit rate K0 is calculated and the bit rate is encoded. Part 21 is given.

符号化部21は、ビットレート計算部22から与えられるビットレートで符号化対象部分を符号化し、符号を符号蓄積装置4に送信し、蓄積する。   The encoding unit 21 encodes the encoding target portion at the bit rate given from the bit rate calculation unit 22, transmits the code to the code storage device 4, and stores it.

次に、ビットレート計算部22は、符号化部21から次の符号化対象部分のデータ量を取得し、同様にビットレートを計算し、そのビットレートを符号化部21に与える。   Next, the bit rate calculation unit 22 acquires the data amount of the next encoding target portion from the encoding unit 21, similarly calculates the bit rate, and gives the bit rate to the encoding unit 21.

符号化部21は、ビットレート計算部22から与えられるビットレートで符号化対象部分を符号化し、符号を符号蓄積装置4に送信し、蓄積する。   The encoding unit 21 encodes the encoding target portion at the bit rate given from the bit rate calculation unit 22, transmits the code to the code storage device 4, and stores it.

同様な処理が続く間、累積符号量計算部14は、符号を監視し、累積符号量Dを継続的に計算し記憶しておく。   While the same processing continues, the accumulated code amount calculation unit 14 monitors the code, and continuously calculates and stores the accumulated code amount D.

タイマー13は、例えば、1回目のタイミングの10秒後に、2回目のタイミング信号tを出力する。   For example, the timer 13 outputs the second timing signal t 10 seconds after the first timing.

累積符号量計算部14は、2回目のタイミング信号tを受信したタイミングで、累積符号量Dを出力する。累積符号量Dは、勿論、前回の累積符号量Dよりも多い。   The accumulated code amount calculation unit 14 outputs the accumulated code amount D at the timing when the second timing signal t is received. Of course, the accumulated code amount D is larger than the previous accumulated code amount D.

残存容量計算部15は、2回目の累積符号量Dが出力されたなら、記録媒体容量記憶部11から記録媒体容量Cを読み出し、記録媒体容量Cから2回目の累積符号量Dを減じ、残存容量(C−D)を得る。   When the second cumulative code amount D is output, the remaining capacity calculation unit 15 reads the recording medium capacity C from the recording medium capacity storage unit 11, subtracts the second cumulative code amount D from the recording medium capacity C, and Capacitance (C-D) is obtained.

符号化済記録時間長取得部16は、2回目のタイミング信号tを受信したタイミングで、例えば、符号化装置2から、符号化済記録時間長Nを取得する。符号化済記録時間長Nは、勿論、前回の符号化済記録時間長Nよりも長い。   The encoded recording time length acquisition unit 16 acquires, for example, the encoded recording time length N from the encoding device 2 at the timing of receiving the second timing signal t. The encoded recording time length N is, of course, longer than the previous encoded recording time length N.

残存記録時間長計算部17は、符号化済記録時間長Nが取得されたなら、動画像記録時間長記憶部12から動画像記録時間長Mを読み出し、動画像記録時間長Mから符号化済記録時間長Nを減じ、残存記録時間長(M−N)を得る。   When the encoded recording time length N is acquired, the remaining recording time length calculation unit 17 reads the moving image recording time length M from the moving image recording time length storage unit 12 and encodes it from the moving image recording time length M. The recording time length N is reduced to obtain the remaining recording time length (MN).

ビットレート計算部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 rate calculation unit 18 divides the remaining capacity (CD) by the remaining recording time length (MN). The bit rate K, that is, the second bit rate K is obtained.

ビットレート設定部19は、2回目のビットレートKが計算されたなら、ビットレートKに等しいビットレートBRを符号化装置2のビットレート計算部22に設定する。   When the second bit rate K is calculated, the bit rate setting unit 19 sets a bit rate BR equal to the bit rate K in the bit rate calculation unit 22 of the encoding device 2.

ビットレート計算部22は、符号化部21から符号化対象部分のデータ量を取得し、データ量が大の場合は、例えば、激しい動きが連続する符号化対象部分の場合は、2回目のビットレートKより大きいビットレートを計算し、一方、データ量が小の場合は、例えば、静止画である符号化対象部分の場合は、2回目のビットレートKより小さいビットレートを計算し、そのビットレートを符号化部21に与える。   The bit rate calculation unit 22 acquires the data amount of the encoding target portion from the encoding unit 21, and when the data amount is large, for example, in the case of the encoding target portion where intense motion continues, the second bit When the bit rate is larger than the rate K, and the amount of data is small, for example, in the case of the encoding target portion that is a still image, the bit rate smaller than the second bit rate K is calculated and the bit The rate is given to the encoding unit 21.

符号化部21は、ビットレート計算部22から与えられるビットレートで符号化対象部分を符号化し、符号を符号蓄積装置4に送信し、蓄積する。   The encoding unit 21 encodes the encoding target portion at the bit rate given from the bit rate calculation unit 22, transmits the code to the code storage device 4, and stores it.

次に、ビットレート計算部22は、符号化部21から次の符号化対象部分のデータ量を取得し、同様にビットレートを計算し、そのビットレートを符号化部21に与える。   Next, the bit rate calculation unit 22 acquires the data amount of the next encoding target portion from the encoding unit 21, similarly calculates the bit rate, and gives the bit rate to the encoding unit 21.

符号化部21は、ビットレート計算部22から与えられるビットレートで符号化対象部分を符号化し、符号を符号蓄積装置4に送信し、蓄積する。   The encoding unit 21 encodes the encoding target portion at the bit rate given from the bit rate calculation unit 22, transmits the code to the code storage device 4, and stores it.

同様な処理が続く間、累積符号量計算部14は、符号を監視し、累積符号量Dを継続的に計算し記憶しておく。   While the same processing continues, the accumulated code amount calculation unit 14 monitors the code, and continuously calculates and stores the accumulated code amount D.

これ以降は、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 encoding device 2 is set with a bit rate BR equal to the initial bit rate K0.

仮に、動画像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 encoding unit 21, the target code amount P0 in that case, that is, the encoding unit The constant integral in the period from the timing T0 to an arbitrary timing for the bit rate given to 21 increases with a constant slope equal to the bit rate BR and finally becomes equal to the recording medium capacity C. In this case, the target code amount P0 is always equal to the cumulative code amount D, and all codes can be recorded on a recording medium (DVD disc or the like), for example.

第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 encoding unit 21, to an arbitrary timing is It increases at a constant slope equal to the bit rate BR and finally becomes equal to the recording medium capacity C.

低減後のビットレート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 encoding unit 21 to an arbitrary timing, It increases with a constant slope equal to the rate BR and finally becomes equal to the recording medium capacity C.

増加後のビットレート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 type encoding device 2 that encodes the portion to be encoded at a bit rate larger or smaller than the bit rate, a plurality of times until the encoding of the moving image is completed. A bit rate setting device that sets a bit rate BR at timing, and a recording medium capacity storage that stores in advance a recording medium capacity C that is a maximum code amount that can be recorded on a recording medium on which an encoded moving image is recorded Unit 11, a moving image recording time length storage unit 12 in which a moving image recording time length M, which is a moving image recording time length, is stored in advance, and a plurality of times until encoding of moving images is completed A cumulative code amount calculation unit 14 that calculates a cumulative code amount D, which is a cumulative code amount that has been encoded at the timing, and, when the cumulative code amount is calculated, reads the recording medium capacity from the recording medium capacity storage unit, A remaining capacity calculation unit 15 that calculates a remaining capacity (C−D) obtained by subtracting the accumulated code amount from the medium capacity, and a cumulative code amount that has been encoded at a plurality of timings until encoding of the moving image ends. The encoded recording time length acquisition unit 16 that acquires the encoded recording time length N that is the recording time length of the corresponding moving image portion, and the moving image recording time length storage if the encoded recording time length is acquired A remaining recording time length calculation unit 17 that reads out a moving image recording time length from the recording unit and calculates a remaining recording time length (MN) obtained by subtracting the encoded recording time length from the moving image recording time length; And remaining record If the length is calculated, the bit rate calculation unit 18 that calculates the bit rate K, K0 obtained by dividing the remaining capacity by the remaining recording time length, and if the bit rate is calculated, the bit rate BR equal to the bit rate. And a bit rate setting unit 19 for setting the coding rate to the encoding device, it is possible to set a bit rate at which all the codes of the moving image can be recorded on the recording medium for the variable bit rate coding device.

[第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 encoding device 2, for example, the timing before the moving image V starts to be transmitted to the encoding device 2, and its timing. This is a device that sets the bit rate BR every 0.5 seconds, including the timing after the second.

ビットレート設定装置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 capacity storage unit 11, a moving image recording time length storage unit 12, a timer 13, a cumulative code amount calculation unit 14, a remaining capacity calculation unit 15, and an encoded recording time length. The acquisition unit 16, the remaining recording time length calculation unit 17, the bit rate calculation unit 18, and the timing every 0.5 seconds including 0.5 seconds after the timing when the second bit rate K is calculated, for example. The timer 100 that outputs the signal t1, the initial bit rate storage unit 101 that stores the initial bit rate K0, and the latest bit rate Ki that is the newest bit rate K calculated by the second and subsequent output of the timing signal t. Is stored in the latest bit rate storage unit 102 and the latest bit rate Ki is calculated, the initial bit rate K0 is obtained from the initial bit rate storage unit 101. A bit rate determination unit 103 that determines whether or not the latest bit rate Ki is smaller than the initial bit rate K0, and, for example, monitors a code and determines a predetermined time length L (for example, 0.5 seconds) The latest cumulative code amount H, which is the encoded amount of code that has been encoded only during the period retroactively, is output, and if the timing signal t1 is output, the latest cumulative code amount H at that time is output. When the calculation unit 104 calculates the latest bit rate Ki, it calculates the latest accumulated code amount threshold G obtained by multiplying the latest bit rate Ki, the time length L, and a predetermined coefficient α (for example, 0.5). If the latest cumulative code amount threshold calculation unit 105, the parameter storage unit 106 in which the time length L and the coefficient α are stored in advance, the latest cumulative code amount H are output, and the latest cumulative code amount threshold G is calculated, the latest cumulative code amount threshold value G is calculated. Mark The latest cumulative code amount determination unit 107 that determines whether the amount H is smaller than the latest cumulative code amount threshold G and the determination result by the bit rate determination unit 103 are affirmative, and the latest cumulative code amount determination unit 107 If the determination result is affirmative, the initial bit rate K0 is read from the initial bit rate storage unit 101, and the bit rate BR equal to the initial bit rate K0 is set in the bit rate calculation unit 22 of the encoding device 2, while the bit rate If the determination result by the determination unit 103 or the determination result by the latest cumulative code amount determination unit 107 is negative, the latest bit rate Ki is read from the latest bit rate storage unit 102, and the bit rate BR equal to the latest bit rate Ki is set. A bit rate setting unit 108 to be set in the bit rate calculation unit 22 of the encoding device 2; And an input unit.

(第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 capacity storage unit 11 as a moving image recording time. The length M is stored in the moving image recording time length storage unit 12, and the time length L and the coefficient α are stored in the parameter storage unit 106.

第2の実施の形態では、2回目のビットレートKが計算されるまでの動作は、ビットレート計算部18が初期ビットレートK0を初期ビットレート記憶部101に記憶させ、ビットレート設定部108が、その初期ビットレートK0を直ちに読み出し、ビットレート計算部22に設定することを除いては、第1の実施の形態と同様なので、説明を省略する。   In the second embodiment, until the second bit rate K is calculated, the bit rate calculation unit 18 stores the initial bit rate K0 in the initial bit rate storage unit 101, and the bit rate setting unit 108 The initial bit rate K0 is the same as that of the first embodiment except that the initial bit rate K0 is immediately read out and set in the bit rate calculation unit 22, and thus the description thereof is omitted.

第2の実施の形態では、タイマー100が、2回目のビットレートK(この時点での最新ビットレートKi)が計算されたなら、タイミング信号t1を出力し、以降、0.5秒ごとにタイミング信号t1を出力する。   In the second embodiment, the timer 100 outputs the timing signal t1 when the second bit rate K (the latest bit rate Ki at this time) is calculated, and thereafter performs the timing every 0.5 seconds. The signal t1 is output.

ビットレート計算部18は、2回目のビットレートK(この時点での最新ビットレートKi)が計算されたなら、最新ビットレートKiを最新ビットレート記憶部102に記憶させる。   When the second bit rate K (the latest bit rate Ki at this time) is calculated, the bit rate calculation unit 18 stores the latest bit rate Ki in the latest bit rate storage unit 102.

ビットレート判定部103は、最新ビットレートKiが計算されたなら、初期ビットレート記憶部101から初期ビットレートK0を読み出し、最新ビットレートKiが初期ビットレートK0より小さいか否かを判定する。ビットレート判定部103は、最新ビットレートKiが初期ビットレートK0より小さいなら、ビットレート設定部108に肯定的な判定結果を与え、一方、最新ビットレートKiが初期ビットレートK0以上なら、ビットレート設定部108に否定的な判定結果を与える。   When the latest bit rate Ki is calculated, the bit rate determination unit 103 reads the initial bit rate K0 from the initial bit rate storage unit 101, and determines whether or not the latest bit rate Ki is smaller than the initial bit rate K0. If the latest bit rate Ki is smaller than the initial bit rate K0, the bit rate determination unit 103 gives a positive determination result to the bit rate setting unit 108. On the other hand, if the latest bit rate Ki is equal to or higher than the initial bit rate K0, the bit rate A negative determination result is given to the setting unit 108.

最新累積符号量計算部104は、タイミング信号t1が出力されたなら、そのときの最新累積符号量Hを出力する。   When the timing signal t1 is output, the latest accumulated code amount calculation unit 104 outputs the latest accumulated code amount H at that time.

最新累積符号量閾値計算部105は、最新ビットレートKiが計算されたなら、パラメータ記憶部106から時間長Lと係数αを読み出し、最新ビットレートKiと時間長Lと係数αとを互いに乗じ、最新累積符号量閾値Gを得て、出力する。   When the latest bit rate Ki is calculated, the latest accumulated code amount threshold calculation unit 105 reads the time length L and the coefficient α from the parameter storage unit 106, and multiplies the latest bit rate Ki, the time length L, and the coefficient α with each other. Obtain and output the latest cumulative code amount threshold G.

最新累積符号量判定部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 amount determination unit 107 determines whether or not the latest cumulative code amount H is smaller than the latest cumulative code amount threshold G. If the latest accumulated code amount H is smaller than the latest accumulated code amount threshold G, the latest accumulated code amount determination unit 107 gives a positive determination result to the bit rate setting unit 108, while the latest accumulated code amount H is the latest accumulated code amount H. If it is equal to or larger than the amount threshold G, a negative determination result is given to the bit rate setting unit 108.

例えば、最新累積符号量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 amount determination unit 107 determines whether or not the portion of the moving image V corresponding to the latest accumulated code amount H is a still image.

ビットレート設定部108は、ビットレート判定部103による判定結果が肯定的であり、且つ、最新累積符号量判定部107による判定結果が肯定的であるなら、初期ビットレート記憶部101から初期ビットレートK0を読み出し、初期ビットレートK0に等しいビットレートBRを符号化装置2のビットレート計算部22に設定する。   If the determination result by the bit rate determination unit 103 is affirmative and the determination result by the latest cumulative code amount determination unit 107 is affirmative, the bit rate setting unit 108 reads the initial bit rate from the initial bit rate storage unit 101. K0 is read and a bit rate BR equal to the initial bit rate K0 is set in the bit rate calculation unit 22 of the encoding device 2.

ビットレート設定部108は、一方、ビットレート判定部103による判定結果、または、最新累積符号量判定部107による判定結果が否定的であるなら、最新ビットレート記憶部102から最新ビットレートKiを読み出し、最新ビットレートKiに等しいビットレートBRを符号化装置2のビットレート計算部22に設定する。   On the other hand, if the determination result by the bit rate determination unit 103 or the determination result by the latest cumulative code amount determination unit 107 is negative, the bit rate setting unit 108 reads the latest bit rate Ki from the latest bit rate storage unit 102. The bit rate BR equal to the latest bit rate Ki is set in the bit rate calculation unit 22 of the encoding device 2.

図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 encoding unit 21, the target code The quantity P0 increases with a constant slope equal to the initial bit rate K0 (= bit rate BR) and finally becomes equal to the recording medium capacity C. In this case, the target code amount P0 is always equal to the accumulated code amount, and all codes can be recorded on, for example, a recording medium (DVD disc or the like).

また、第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 rate setting unit 108 always sets the bit rate BR after this reduction, that is, the latest bit rate Ki to the bit rate calculation unit 22, the accumulated code amount D is represented by the reference code amount D1. As a result, the slope of the reference code amount D1 decreases between the timings T1 and T2, and the bit rate may decrease. In this case, all codes can be recorded on the recording medium. However, when the codes are reproduced, the image quality is lowered between the timings T1 and T2.

しかし、ビットレート設定部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 rate setting unit 108 encodes not the latest bit rate Ki but the bit rate BR equal to the larger initial bit rate K0. 2 bit rate calculation unit 22 is set.

つまり、ビットレート設定部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 rate setting unit 108, for example, also uses the latest bit rate Ki in subsequent movie scenes. Is smaller than the initial bit rate K0 and a still image continues, a larger bit rate BR is set in the encoding device 2.

例えば、タイミング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 rate calculation unit 22, and the accumulated code amount D becomes larger than the reference code amount D1. Therefore, the image quality during this period is improved.

仮に、タイミング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 rate encoding apparatus 2 that encodes the moving image at a bit rate larger or smaller than the bit rate according to the data amount of A bit rate setting device for setting a rate BR, and a recording medium capacity storage unit 11 in which a recording medium capacity C, which 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 12 in which a moving image recording time length M, which is a moving image recording time length, is stored in advance, and a plurality of timings until encoding of the moving image ends. A cumulative code amount calculation unit 14 for calculating a cumulative code amount D, which is a cumulative code amount that has been encoded in the recording, 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 15 that calculates a remaining capacity (C−D) obtained by subtracting the accumulated code amount from the medium capacity, and a cumulative code amount that has been encoded at a plurality of timings until encoding of the moving image ends. The encoded recording time length acquisition unit 16 that acquires the encoded recording time length N that is the recording time length of the corresponding moving image portion, and the moving image recording time length storage if the encoded recording time length is acquired A remaining recording time length calculation unit 17 that reads out a moving image recording time length from the recording unit and calculates a remaining recording time length (MN) obtained by subtracting the encoded recording time length from the moving image recording time length; And the remaining recording time length If so, the bit rate calculation unit 18 for calculating the bit rates K, K0 and Ki obtained by dividing the remaining capacity by the remaining recording time length and the initial bit rate K0 which is the first calculated bit rate are stored. The initial bit rate storage unit 101, the latest bit rate storage unit 102 for storing the latest bit rate Ki, which is the most recently calculated bit rate for the second and subsequent times, and the initial bit rate if the latest bit rate is calculated. The initial bit rate is read from the storage unit, the bit rate determination unit 103 that determines whether or not the latest bit rate is smaller than the initial bit rate, and predetermined timing at each timing for setting the bit rate for the encoding device Latest cumulative code that calculates the latest cumulative code quantity H, which is the encoded code quantity only for the period that goes back the time length L If the latest bit rate is calculated, the code amount calculation unit 104 calculates the latest cumulative code amount threshold G by multiplying the latest bit rate, a predetermined time length L, and a predetermined coefficient α. When the amount threshold value calculation unit 105, the latest accumulated code amount, and the latest accumulated code amount threshold value are calculated, it is determined whether or not the latest accumulated code amount is smaller than the latest accumulated code amount threshold value. 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 is set. While the same bit rate is set in the encoding device, the determination result by the bit rate determination unit or the determination result by the latest cumulative code amount determination unit is negative. A bit rate setting unit 108 that reads the latest bit rate from the latest bit rate storage unit and sets the bit rate equal to the latest bit rate in the encoding device. The bit rate can be set so that all the codes can be recorded on the recording medium, and the image quality when the codes are reproduced can be improved.

なお、各実施の形態において、記録媒体容量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 encoding device 2. However, for example, when the encoded recording time length N is obtained by the moving image storage device 3, it is acquired from the moving image storage device 3. May be.

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 rate setting device 2 ... Encoding device 3 ... Moving image storage device 4 ... Code storage device 11 ... Recording medium capacity storage unit 12 ... Moving image recording time length storage unit 13, 100 ... Timer 14 ... Cumulative code amount Calculation unit 15: Remaining capacity calculation unit 16 ... Encoded recording time length acquisition unit 17 ... Remaining recording time length calculation unit 18, 22 ... Bit rate calculation unit 19, 108 ... Bit rate setting unit 21 ... Encoding unit 101 ... Initial Bit rate storage unit 102 ... Latest bit rate storage unit 103 ... Bit rate determination unit 104 ... Latest accumulated code amount calculation unit 105 ... Latest accumulated code amount threshold calculation unit 106 ... Parameter storage unit 107 ... Latest accumulated code amount determination unit α ... Coefficient BR ... Bit rate C ... Recording medium capacity D ... Cumulative code amount D1 ... Reference code amount D2 ... Total code amount G ... Latest cumulative code amount threshold H ... Latest cumulative code K: Bit rate K0: Initial bit rate Ki: Latest bit rate L ... Time length M ... Moving image recording time length N ... Encoded recording time length P0, P1, P2 ... Target code amount V ... Moving image T0, T1, T1 ', T2 ... Timing t, t1 ... Timing signal

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.
JP2010062513A 2010-03-18 2010-03-18 Bit rate setting device Active JP5075932B2 (en)

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)

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

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

Patent Citations (2)

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

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