JP4928569B2 - Segment encoding method, segment encoding apparatus, segment encoding program and recording medium thereof, parallel encoding system, partial re-encoding system - Google Patents
Segment encoding method, segment encoding apparatus, segment encoding program and recording medium thereof, parallel encoding system, partial re-encoding system Download PDFInfo
- Publication number
- JP4928569B2 JP4928569B2 JP2009005366A JP2009005366A JP4928569B2 JP 4928569 B2 JP4928569 B2 JP 4928569B2 JP 2009005366 A JP2009005366 A JP 2009005366A JP 2009005366 A JP2009005366 A JP 2009005366A JP 4928569 B2 JP4928569 B2 JP 4928569B2
- Authority
- JP
- Japan
- Prior art keywords
- segment
- encoding
- stream
- buffer
- encoded
- 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.)
- Active
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Description
本発明は,シーケンスの一部分を切り出したセグメントを,in点とout点のバッファ位置が決まっている状態で符号化し,最終的に前後の符号化ストリームと結合して一本のストリームを生成する符号化技術に関するものである。 The present invention encodes a segment obtained by cutting out a part of a sequence in a state where the buffer positions of the in point and the out point are determined, and finally combines the preceding and subsequent encoded streams to generate a single stream. Is related to the technology.
図8は,セグメントエンコードに対応していない従来の符号化装置の構成例を示す図であり,図9は,その符号化装置の処理フローチャートである。 FIG. 8 is a diagram illustrating a configuration example of a conventional encoding device that does not support segment encoding, and FIG. 9 is a process flowchart of the encoding device.
図8および図9に従って,セグメントエンコードに対応していない従来の一般的な符号化処理方法について説明する。原画像のシーケンスを符号化するにあたって,まず,符号化装置200は,符号化対象の原画像を原画像保存部201に保存する(ステップS201)。また,目標レートT,初期バッファ位置Bstart,バッファサイズBSをもとに,符号量制御部202で,量子化幅の初期値を決定する(ステップS202)。その後,全フレームについて,ステップS204〜S207の処理を反復する(ステップS203)。
A conventional general encoding method that does not support segment encoding will be described with reference to FIGS. In encoding an original image sequence, first, the
まず,符号量制御部202で求めた量子化幅をもとに,符号化部203にて,1フレームを符号化し,符号化情報を時刻情報付加部204へ送る(ステップS204)。符号化結果の発生符号量とその履歴,目標レートT,初期バッファ位置Bstart,バッファサイズBSから,デコード用時刻情報を符号量制御部202で算出して,時刻情報付加部204へ送信する(ステップS205)。一方,同じく発生符号量とその履歴,目標レートT,初期バッファ位置Bstart,バッファサイズBSから,次フレームの量子化幅を符号量制御部202で算出し,符号化部203に送る(ステップS206)。時刻情報付加部204では,符号化部203からの符号化情報に符号量制御部202からのデコード用時刻情報を付加してストリームを生成する(ステップS207)。以上の操作を全フレームに対して反復する(ステップS208)。
First, one frame is encoded by the
図10は,図8に示す符号化部203の構成例を示す。符号化部203は,符号化対象の原画像の画像信号と符号化時の量子化幅を入力する。まず,減算器211により原画像と予測画像の差分をとり,予測残差画像を生成する。直交変換部212は,予測残差画像に対してDCT変換などの直交変換を行い,直交変換係数を出力する。量子化部213は,指定された量子化幅により,直交変換係数を量子化する。可変長符号化部214は,量子化後の直交変換係数を可変長符号に変換し,符号化情報として出力する。
FIG. 10 shows a configuration example of the
一方,逆量子化部215は,量子化後の直交変換係数を逆量子化する。逆直交変換部216は,逆量子化後の直交変換係数に逆直交変換を施し,予測残差復号画像を生成する。加算器217により,予測残差復号画像と予測画像とを加算することにより復号画像を生成し,復号画像保存メモリ218に格納する。予測画像生成部219は,復号画像保存メモリ218に格納された復号画像を参照画像として,動き探索などを用いて,次の予測残差画像を求めるための予測画像を生成する。
On the other hand, the
以上の符号化部203は一般的なものであるが,他の符号化方法を用いることもできる。
The
次に,本発明が対象としているセグメントエンコード(セグメント符号化)について説明する。図11に,セグメントエンコードが必要になる場合の例を示す。 Next, segment encoding (segment encoding) targeted by the present invention will be described. FIG. 11 shows an example when segment encoding is required.
セグメントエンコードは,シーケンスの一部を切り出して符号化する技術である。これは,例えば図11(A)に示すように,画像シーケンスを時間方向に複数パート(これをセグメントという)に分割し,複数台のセグメント符号化装置1001〜1003で並列にエンコードする場合や,図11(B)に示すように,編集作業で既に符号化したストリームの一部分だけを再エンコードする場合に用いられる。最終的にセグメントエンコードされたストリームは,前後のストリームと結合し,1本のストリームにする。
Segment encoding is a technique for extracting and encoding a part of a sequence. For example, as shown in FIG. 11A, when an image sequence is divided into a plurality of parts (referred to as segments) in the time direction and encoded in parallel by a plurality of
このようにセグメントエンコードされたストリームを,前後のストリームと結合するときの最大の問題は,バッファの不整合である。CBR(ビットレート一定)で符号化する場合,デコーダバッファが破綻しないようにバッファ推移を監視しながら発生符号量を制御する必要がある。セグメントエンコードの場合,個々のストリームについては,CBRモードを有する既存のエンコーダを用いることで,バッファ破綻させずに符号化可能であるが,前後のストリームのバッファ位置をチェックしないため,1本のストリームにつなげた場合,バッファ破綻が起こる可能性がある。 The biggest problem when combining such segment-encoded streams with the preceding and succeeding streams is buffer mismatch. When encoding with CBR (constant bit rate), it is necessary to control the generated code amount while monitoring the buffer transition so that the decoder buffer does not fail. In the case of segment encoding, each stream can be encoded without using a buffer failure by using an existing encoder having the CBR mode. However, since the buffer positions of the preceding and succeeding streams are not checked, one stream is used. If it is connected, buffer corruption may occur.
図12に,ストリームを結合した場合にバッファ破綻を起こす例,図13に,バッファ破綻が起こらない例を示す。 FIG. 12 shows an example in which a buffer failure occurs when streams are combined, and FIG. 13 shows an example in which a buffer failure does not occur.
例えば,図12(A)に示すように,あるセグメントnの終端バッファ位置が,次セグメントn+1の開始バッファ位置よりも低い場合,これらを結合すると,図12(B)に示すように,セグメントn+1の中でバッファアンダーフローが発生し,バッファ破綻を起こす可能性がある。 For example, as shown in FIG. 12A, when the end buffer position of a certain segment n is lower than the start buffer position of the next segment n + 1, these are combined, and as shown in FIG. 12B, the segment n + 1 May cause buffer underflow and buffer failure.
逆に,図13(A)に示すように,あるセグメントnの終端バッファ位置が,次セグメントn+1の開始バッファ位置よりも高い場合,これらを結合する際に,その差を無効データ(filler)で埋めてしまうことで,図13(B)に示すように,バッファ破綻を起こすことなく,ストリームを結合することができる。 On the contrary, as shown in FIG. 13A, when the end buffer position of a certain segment n is higher than the start buffer position of the next segment n + 1, when these are combined, the difference is expressed as invalid data (filler). By filling it, as shown in FIG. 13B, the streams can be combined without causing buffer failure.
したがって,セグメントエンコードでは,開始時点でのバッファ位置に加え,セグメント終端時点でのバッファ位置も指定し,セグメントの符号化終了時点でのバッファ位置(終端バッファ位置)がその指定値以上になる必要がある。 Therefore, in segment encoding, the buffer position at the end of the segment must be specified in addition to the buffer position at the start, and the buffer position at the end of segment encoding (end buffer position) must be greater than or equal to the specified value. is there.
このようなバッファ破綻の問題を解決する従来技術として,特許文献1に記載されている「ビットストリームのシームレス接続エンコード方法及びその装置」がある。ここでは,各フレームの符号化時に,現在のバッファ位置と推定バッファ位置との差を監視し,発生符号量が超えないように割当て符号量を逐次制御することが行われている。
As a conventional technique for solving such a buffer failure problem, there is a “bitstream seamless connection encoding method and apparatus” described in
図14は,従来のセグメント符号化装置の構成例を示す図であり,図15は,従来のセグメント符号化装置の処理フローチャートである。 FIG. 14 is a diagram showing a configuration example of a conventional segment encoding apparatus, and FIG. 15 is a process flowchart of the conventional segment encoding apparatus.
セグメント符号化装置1000は,原画像のシーケンスの一部分を切り出したセグメントを符号化するにあたって,その符号化対象の原画像を原画像保存部1100に保存する(ステップS301)。また,目標レートT,初期バッファ位置Bstart,バッファサイズBSをもとに,終端処理付き符号量制御部1101で,量子化幅の初期を決定する(ステップS302)。その後,全フレームについて,ステップS304〜S307の処理を反復する(ステップS303)。
When the
まず,終端処理付き符号量制御部1101で求めた量子化幅をもとに,符号化部1102にて,終端バッファ位置Bendを考慮しながら,1フレームを符号化する(ステップS304)。符号化結果の発生符号量とその履歴,目標レートT,初期バッファ位置Bstart,バッファサイズBSから,デコード用時刻情報を終端処理付き符号量制御部1101で算出して,時刻情報付加部1103へ送信する(ステップS305)。一方,同じく発生符号量とその履歴,目標レートT,初期バッファ位置Bstart,バッファサイズBSから,終端が終端バッファ位置Bend以上になるように考慮しつつ,次フレームの量子化幅を終端処理付き符号量制御部1101で算出し,符号化部1102に送る(ステップS306)。時刻情報付加部1103では,符号化部1102からの符号化情報に終端処理付き符号量制御部1101からのデコード用時刻情報を付加してストリームを生成する(ステップS307)。以上の操作を全フレームに対して反復する(ステップS308)。最後に,バッファ位置が終端バッファ位置Bendとなるように,終端調整部1104で無効データを挿入する終端バッファ位置調整処理を行う(ステップS309)。
First, based on the quantization width obtained by the code
シーケンスの一部分を切り出したセグメントを符号化し,最終的に前後の符号化ストリームと結合して,1本のストリームを生成する場合,従来のセグメントエンコード技術では,発生符号量が制限以内になるように厳しく監視する必要があるため,発生符号量の誤差は少なくなるものの,画質が変動しやすくなるという問題がある。 When a segment obtained by cutting out a part of a sequence is encoded and finally combined with preceding and subsequent encoded streams to generate a single stream, the conventional segment encoding technique ensures that the amount of generated code is within the limit. Since strict monitoring is required, the error in the amount of generated code is reduced, but the image quality is likely to fluctuate.
また,符号量の制御では,次のフレームの量子化幅を決定するときに,常に終端バッファ位置Bendを考慮して算出しなければならないため,特殊な符号量制御が必要であり,汎用性に欠けるとともに,画質調整などのコストが必要になるという問題があった。 In addition, in the code amount control, when determining the quantization width of the next frame, it must always be calculated in consideration of the end buffer position Bend. In addition to lacking, there is a problem that costs such as image quality adjustment are required.
本発明は,上記課題を解決するため,セグメントの符号化時に,以下のように処理する。
1.本来の設定レートと終端バッファ位置,セグメント長をもとに,仮目標レート(仮の目標符号量)を算出する。
2.本来のバッファサイズと終端バッファ位置から仮想バッファサイズを算出する。
3.以下の処理を全フレームについて反復する。
In order to solve the above-described problems, the present invention performs the following processing when encoding a segment.
1. Based on the original set rate, end buffer position, and segment length, a temporary target rate (temporary target code amount) is calculated.
2. The virtual buffer size is calculated from the original buffer size and the end buffer position.
3. The following process is repeated for all frames.
3−1.仮目標レートと仮想バッファサイズを使い,既存エンコーダのCBR(レート一定)モードを用いて符号化する。 3-1. Encoding is performed using the CBR (constant rate) mode of the existing encoder using the temporary target rate and the virtual buffer size.
3−2.発生符号量をもとに,本来の設定レートとバッファサイズから復号時刻を算出する。 3-2. Based on the generated code amount, the decoding time is calculated from the original set rate and buffer size.
以上により複数ストリーム結合時のバッファ破綻を,既存のエンコーダを大きく変えることなく回避することができる。その理由は,以下のとおりである。 As described above, it is possible to avoid a buffer failure when combining a plurality of streams without greatly changing the existing encoder. The reason is as follows.
複数の符号化ストリームを結合したときに,バッファ破綻が起こらない十分条件は,あるストリームの符号化終了時点でのバッファ位置が次のストリームの開始バッファ位置よりも高いことである。本発明では,既存の一般的なエンコーダのCBR(レート一定)モードを用い,目標レートより微妙に少ない設定レートで符号化する。このストリームについて,目標レートに関してバッファ推移を描くと,目標符号量より発生符号量が若干少ないため,バッファ位置が緩やかに右肩上がりになるようなグラフとなる。そこで,既存のエンコーダに対して,「若干少ない目標レート」の値を事前に求める仕組みを付加することで,エンコーダ内部を特に改造しなくとも,符号化終了時点でのバッファ位置を次のストリームの開始バッファ位置よりも高く持っていくエンコードシステムを構築することができる。 A sufficient condition that a buffer failure does not occur when a plurality of encoded streams are combined is that the buffer position at the end of encoding of a stream is higher than the start buffer position of the next stream. In the present invention, encoding is performed at a slightly lower set rate than the target rate using the CBR (constant rate) mode of an existing general encoder. For this stream, when the buffer transition is drawn with respect to the target rate, the generated code amount is slightly smaller than the target code amount, so that the buffer position gradually rises to the right. Therefore, by adding a mechanism to obtain the “slightly lower target rate” value for the existing encoder in advance, the buffer position at the end of encoding can be changed to the next stream without any special modification inside the encoder. You can build an encoding system that takes you higher than the starting buffer position.
なお,復号時刻は,符号化制御部で求めるバッファ推移情報を利用して計算するのが一般的であるが,本発明では,符号化制御部に与えた目標レートが本来の目標レートよりも低いために時刻情報がずれてしまう。そこで,符号化制御部とは別に本来の目標レートで復号時刻情報を求める機構を設ける。 The decoding time is generally calculated using the buffer transition information obtained by the encoding control unit. However, in the present invention, the target rate given to the encoding control unit is lower than the original target rate. Therefore, the time information is shifted. Therefore, a mechanism for obtaining decoding time information at the original target rate is provided separately from the encoding control unit.
このように,本発明では,既存のエンコーダ内部に特に手を入れないため,システムの構築が容易で,かつ汎用性が高い。 As described above, in the present invention, since no particular effort is made inside the existing encoder, the construction of the system is easy and the versatility is high.
また,本発明では,複数ストリーム結合時にセグメントのつなぎ目での画質変動をほとんど気にする必要がない。ストリーム終端のバッファ位置を高く上げることを考慮しながら符号化する場合,後半部分になるほど発生符号量の制約が厳しくなるが,本発明では,既存のエンコーダで一定レートで符号化するだけなので,セグメントのつなぎ目での画質変動対策などは特に考える必要がない。また,「若干少ない目標レート」については,例えば初期バッファ位置が設定レートの半分,セグメント長が60秒の場合,目標レートより0.5/60≒0.83%低い目標レートに設定すればよく,セグメント長が長いほど画質に与える影響は少なくなる。 Further, in the present invention, there is almost no need to worry about image quality fluctuations at the joints of segments when a plurality of streams are combined. When encoding while considering raising the buffer position at the end of the stream, the restriction on the amount of generated code becomes stricter in the latter half, but in the present invention, since encoding is performed at a constant rate with an existing encoder, the segment There is no need to think about measures for image quality fluctuations at the joints. For the “slightly lower target rate”, for example, when the initial buffer position is half the set rate and the segment length is 60 seconds, the target rate may be set to 0.5 / 60≈0.83% lower than the target rate. , The longer the segment length, the less influence on the image quality.
本発明によれば,複数ストリーム結合時にバッファ破綻が起こらないように符号化することが可能である。また,セグメントエンコードに未対応の既存のエンコーダを,ほとんど手を加えることなく,セグメントエンコードに使用することできる。そのため,高い汎用性を確保でき,開発や調整のコストを大幅に削減することができる。さらに,セグメントのつなぎ目での画質変動をほとんど気にする必要がないという効果を有する。 According to the present invention, it is possible to perform encoding so that a buffer failure does not occur when a plurality of streams are combined. In addition, an existing encoder that does not support segment encoding can be used for segment encoding with almost no modification. Therefore, high versatility can be secured, and development and adjustment costs can be greatly reduced. In addition, there is an effect that there is almost no need to worry about image quality fluctuations at the segment joints.
以下,図面を用いて本発明の実施の形態を説明する。セグメント符号化装置の実施の形態についての詳細を説明するに先立ち,本発明の適用システムの例を説明する。 Embodiments of the present invention will be described below with reference to the drawings. Prior to describing details of the embodiment of the segment coding apparatus, an example of an application system of the present invention will be described.
図1は,本発明が適用される並列エンコードシステムの構成例を示す図である。 FIG. 1 is a diagram showing a configuration example of a parallel encoding system to which the present invention is applied.
図1に示す並列エンコードシステム100は,原画像の入力ストリームを自動的に複数のセグメントに分割して,各セグメントを並列に符号化するシステムである。そのため,並列エンコードシステム100は,原画像を保存する原画像保存部101,原画像のシーケンスをセグメントに分割するセグメント分割部102,それぞれのセグメントを並列に符号化する複数のセグメント符号化装置103,104,105,…,符号化したセグメントのストリームを結合するストリーム結合部106を備える。
A
並列エンコードシステム100には,初期バッファ位置Bstart,目標レートT,バッファサイズBSが入力される。先頭セグメントの初期バッファ位置は,システムに与えられた初期バッファ位置Bstartの値を用いる。また,最終セグメントに与える終端バッファ位置Bendは,例えば0としてもよい。
The
すなわち,先頭セグメントを符号化するセグメント符号化装置103には,システムに与えられた初期バッファ位置Bstartが初期バッファ位置として入力される。次のセグメント符号化装置104には,例えばセグメント分割部102が定めた初期バッファ位置Bstart2が入力され,さらに次のセグメント符号化装置105には,初期バッファ位置Bstart3が入力される。この初期バッファ位置Bstart2は,先頭のセグメント符号化装置103に,終端バッファ位置Bendとして入力され,また,初期バッファ位置Bstart3は,2番目のセグメント符号化装置104に,終端バッファ位置Bendとして入力される。3番目のセグメント符号化装置105には,次のセグメントの初期バッファ位置Bstart4が終端バッファ位置Bendとして入力される。
That is, an initial buffer position Bstart given to the system is input as an initial buffer position to the
これらの初期バッファ位置Bstart2,Bstart3,Bstart4,…については,セグメント分割部102で映像の特徴量から求めてもよいし,全セグメントで同じ固定値を用いるようにしてもよい。
These initial buffer positions Bstart2, Bstart3, Bstart4,... May be obtained from the video feature quantity by the
図2は,並列エンコードシステム100の処理フローチャートである。並列エンコードシステム100は,まず,符号化対象映像の原画像を原画像保存部101に保存する(ステップS101)。次に,セグメント分割部102は,原画像保存部101に保存された映像をn個のセグメントに分割する(ステップS102)。なお,セグメント符号化装置の個数をmとすると,n=mでもよいし,n>mであってもよい。n>mの場合には,m+1番目のセグメント以降は,先頭のセグメント符号化装置103から,同様に順番に符号化していくことになる。
FIG. 2 is a process flowchart of the
次に,セグメント分割部102は,各セグメント映像の特徴量等から各セグメントの初期バッファ位置Bstart2,Bstart3,…を決定する(ステップS103)。なお,初期バッファ位置は全セグメントで予め決められた固定値であってもよい。
Next, the
各セグメント符号化装置103,104,105,…は,詳しくは後述する本発明の実施の形態に係るセグメント符号化方法に従って,分割された各セグメントを符号化する(ステップS104)。最後に,ストリーム結合部106は,各セグメント符号化装置103,104,105,…が出力するセグメントの符号化ストリームを結合し,1つのストリームを生成する(ステップS105)。
Each of the
図3は,本発明の他の適用例である部分的再エンコードシステムの構成例を示す図である。 FIG. 3 is a diagram showing a configuration example of a partial re-encoding system as another application example of the present invention.
図3に示す部分的再エンコードシステム110は,原画像をもとに符号化した符号化ストリームについて,指定された切り出し開始時刻から切り出し終了時刻までの区間だけを再符号化するシステムである。部分的再エンコードシステム110は,原画像を保存する原画像保存部111と,切り出し開始時刻と切り出し終了時刻のバッファ位置を,それぞれ初期バッファ位置Bstart,終端バッファ位置Bendとして符号化ストリームから求めるストリーム解析部112と,原画像保存部111にある原画像のうち,切り出し開始時刻から切り出し終了時刻までの区間の画像をセグメント映像として切り出すセグメント切り出し部113と,切り出されたセグメント映像を符号化するセグメント符号化装置114と,セグメント符号化装置114の符号化結果であるストリームを,切り出し開始時刻より前のストリームと切り出し終了時刻より後のストリームの間に挿入して,ストリームを結合するストリーム結合部115とを備える。
The
図4は,部分的再エンコードシステム110の処理フローチャートである。部分的再エンコードシステム110は,まず,符号化対象映像の原画像を原画像保存部111に保存する(ステップS111)。一方,ストリーム解析部112は,既に符号化されている符号化ストリームを解析し,符号化ストリームから切り出し開始時刻のバッファ位置および切り出し終了時刻のバッファ位置を,それぞれ初期バッファ位置Bstart,終端バッファ位置Bendとして導出する(ステップS112)。
FIG. 4 is a process flowchart of the
セグメント切り出し部113は,原画像保存部111に保存された原画像のうち,指定された切り出し開始時刻から切り出し終了時刻までの原画像をセグメント映像として抽出する(ステップS113)。セグメント符号化装置114は,詳しくは後述する本発明の実施の形態に係るセグメント符号化方法に従って,抽出されたセグメント映像を符号化する(ステップS114)。最後に,ストリーム結合部115は,セグメント符号化装置114の符号化結果であるストリームと,切り出し前後のストリームとを結合して,1本の符号化ストリームを生成する(ステップS115)。
The
本発明は,以上説明したような並列エンコードシステム100や,部分的再エンコードシステム110におけるセグメント符号化装置に適用される。以下,その実施の形態について詳しく説明する。
The present invention is applied to the segment encoding apparatus in the
図5は,本発明の実施の形態に係るセグメント符号化装置の構成図である。セグメント符号化装置1は,符号化対象の原画像を記憶する原画像保存部10と,符号化対象のセグメント長を検出するセグメント長検出部11と,仮目標レートを計算する仮レート計算部12と,仮想バッファサイズを計算する仮想バッファサイズ計算部13と,バッファ推移を計算し,デコード用時刻を算出するバッファ推移計算部14と,符号化時の符号量を制御する符号量制御部15と,原画像を符号化する符号化部16と,符号化情報にデコード用時刻情報を付加する時刻情報付加部17と,ストリームの終端を調整する終端調整部18とを備える。
FIG. 5 is a configuration diagram of the segment coding apparatus according to the embodiment of the present invention. The
上記構成において,特にセグメント長検出部11,仮レート計算部12,仮想バッファサイズ計算部13,バッファ推移計算部14の部分が本発明に特有な部分である。
In the above configuration, the segment length detection unit 11, the provisional
符号量制御部15は,従来のセグメントエンコード未対応の符号量制御部と同じものでよい。ただし,デコード用時刻情報を出力する端子は必要ない。そのため,符号量制御部15では,デコード用時刻情報に関連する計算は必ずしもする必要はない。
The code
仮レート計算部12は,目標レートT[bit/sec]と終端バッファ位置Bend[bits],セグメント長Ni[sec]から,仮目標レートTt[bit/sec]を計算する。ここで,仮目標レートTtを,例えば
Tt=T−Bend/Ni
とすることで,終了時のバッファ位置が,終端バッファ位置Bendよりも高くなることが保証される。安全を見越して,この値に安全係数を掛けたり,マージンを引いた,より小さい値を使用することもできる。
The temporary
This guarantees that the buffer position at the end is higher than the end buffer position Bend. In anticipation of safety, this value can be multiplied by a safety factor or a smaller value with a margin subtracted.
仮想バッファサイズ計算部13は,シーケンス結合時のバッファサイズBSと終端バッファ位置Bendから仮想バッファサイズBShを計算する。ここで,仮想バッファサイズBShを,例えば
BSh=BS−Bend
とすることで,シーケンス結合時のバッファサイズがBS以下になることが保証される。安全を見越して,この値に安全係数を掛けたり,マージンを引いた,より小さい値を使用することもできる。
The virtual buffer
By doing so, it is guaranteed that the buffer size at the time of sequence combination is equal to or less than BS. In anticipation of safety, this value can be multiplied by a safety factor or a smaller value with a margin subtracted.
バッファ推移計算部14は,セグメントエンコード未対応の「符号量制御部」と同じものでよい。ただし,量子化幅を出力する端子は必要ない。そのため,量子化幅の算出に関連する処理は必ずしもする必要はない。
The buffer
図6は,図5に示すセグメント符号化装置1の処理フローチャートである。以下,セグメント符号化装置1が行う処理を,図6に従って説明する。まず,符号化対象の原画像を入力し,原画像保存部10に保存する(ステップS10)。セグメント長検出部11は,符号化対象のセグメント長Niを検出する(ステップS11)。
FIG. 6 is a process flowchart of the
次に,あらかじめ定められた計算式により,仮レート計算部12において,仮目標レートTtを計算し(ステップS12),仮想バッファサイズ計算部13において,仮想バッファサイズBShを算出する(ステップS13)。符号量制御部15では,仮目標レートTt,初期バッファ位置Bstart,仮想バッファサイズBShをもとに,量子化幅の初期値を決定する(ステップS14)。
Next, the temporary target rate Tt is calculated by the temporary
その後,全フレームについて,以下のステップS15〜S19の処理を反復する(ステップS15)。反復処理の内容は,以下のとおりである。まず,求めた量子化幅をもとに,符号化部16において1フレームを符号化する(ステップS16)。バッファ推移計算部14では,符号化における発生符号量とその履歴,目標レートT,初期バッファ位置Bstart,バッファサイズBSから,デコード用時刻情報を算出して,時刻情報付加部17へ送信する(ステップS17)。
Thereafter, the following steps S15 to S19 are repeated for all frames (step S15). The contents of the iteration process are as follows. First, one frame is encoded by the
一方,符号量制御部15では,,同じく発生符号量とその履歴,仮目標レートTt,初期バッファ位置Bstart,仮想バッファサイズBShから,次フレームの量子化幅を算出し,符号化部16に送る(ステップS18)。なお,この符号量制御部15において,仮目標レートTt,仮想バッファサイズBSh等を用いて量子化幅を算出する処理は,従来の符号量制御において,目標レートT,バッファサイズBS等を用いて量子化幅を算出する処理と同様であるので,ここでのこれ以上の詳しい説明は省略する。時刻情報付加部17では,符号化部16からの符号化情報に,バッファ推移計算部14からのデコード用時刻情報を付加してストリームを生成する(ステップS19)。
On the other hand, the code
以上の操作を,全フレームに対して反復する(ステップS20)。最後に,終端調整部18において,終端バッファ位置がBendになるように,無効データを挿入する終端バッファ位置調整処理を行う(ステップS21)。
The above operation is repeated for all frames (step S20). Finally, the
図7は,本実施の形態におけるバッファ推移の例を説明する図である。本来の符号化ストリームの符号化条件を,符号化セットAとする。すなわち,符号化セットAは,バッファサイズBS[bits],目標レートT[bits/sec],初期バッファ位置Bstart[bits],セグメント長Ni[sec]であったとする。 FIG. 7 is a diagram for explaining an example of buffer transition in the present embodiment. The encoding condition of the original encoded stream is an encoding set A. That is, it is assumed that the encoding set A has a buffer size BS [bits], a target rate T [bits / sec], an initial buffer position Bstart [bits], and a segment length Ni [sec].
本実施の形態では,図7(A)に示すように,符号化セットAに対して,符号化セットBの設定でセグメントの符号化を行う。このように,セグメント符号化装置1が符号化セットBの設定でセグメントを符号化すると,バッファサイズBSから終端バッファ位置Bendを引いた大きさの仮想バッファサイズBShで符号化を行うため,同じく符号化セットBの設定でバッファ推移のグラフを描いた場合のグラフの存在範囲は,図7(B)に示すG1のようになる。
In the present embodiment, as shown in FIG. 7A, the encoding of the segment is performed by setting the encoding set B for the encoding set A. As described above, when the
同様に,符号化セットBの設定で符号化し,符号化セットAの設定でバッファ推移のグラフを描くと,グラフの存在範囲は,図7(C)に示すG2のようになる。これから明らかなように,本実施の形態では,バッファ終端の位置が必ず終端バッファ位置Bendよりも上にくる。したがって,次のセグメントの初期バッファ位置を終端バッファ位置Bendよりも下に設定することで,バッファの破綻を生じさせることのないストリームの結合を実現できることになる。 Similarly, when encoding is performed with the setting of encoding set B and a graph of buffer transition is drawn with the setting of encoding set A, the existence range of the graph becomes G2 shown in FIG. 7C. As is clear from this, in the present embodiment, the position of the buffer end is always above the end buffer position Bend. Therefore, by setting the initial buffer position of the next segment below the end buffer position Bend, it is possible to realize stream combination that does not cause buffer failure.
以上のセグメント符号化の処理は,コンピュータとソフトウェアプログラムとによって実現することができ,そのプログラムをコンピュータ読み取り可能な記録媒体に記録することも,ネットワークを通して提供することも可能である。 The segment encoding process described above can be realized by a computer and a software program, and the program can be recorded on a computer-readable recording medium or provided through a network.
1 セグメント符号化装置
10 原画像保存部
11 セグメント長検出部
12 仮レート計算部
13 仮想バッファサイズ計算部
14 バッファ推移計算部
15 符号量制御部
16 符号化部
17 時刻情報付加部
18 終端調整部
DESCRIPTION OF
Claims (8)
所定の目標レートと与えられた終端バッファ位置とセグメント長とから,前記目標レートよりも少ない仮目標レートを算出する過程と,
所定のバッファサイズと前記終端バッファ位置とから,前記バッファサイズよりも小さい仮想バッファサイズを算出する過程と,
前記仮目標レートと前記仮想バッファサイズとを用いて,前記セグメントの各フレームをCBRモードで符号化する過程と,
符号化結果の発生符号量をもとに,前記目標レートと前記バッファサイズとからデコード用時刻情報を算出する過程と,
前記符号化結果に前記デコード用時刻情報を付加して,前記セグメントの符号化ストリームを生成する過程とを有する
ことを特徴とするセグメント符号化方法。 A segment encoding method for encoding a segment so that a buffer failure does not occur when an encoded stream of a segment obtained by cutting out a part of a sequence of an image is combined with a stream before and after the segment,
Calculating a provisional target rate less than the target rate from a predetermined target rate, a given end buffer position and a segment length;
Calculating a virtual buffer size smaller than the buffer size from a predetermined buffer size and the end buffer position;
Encoding each frame of the segment in CBR mode using the provisional target rate and the virtual buffer size;
A process of calculating decoding time information from the target rate and the buffer size based on the generated code amount of the encoding result;
A step of adding the decoding time information to the encoding result to generate an encoded stream of the segment.
前記仮目標レートを,前記所定の目標レートから前記終端バッファ位置をセグメント長で割った値を引いた値以下の値に設定する
ことを特徴とするセグメント符号化方法。 In the segment encoding method of Claim 1,
The segment encoding method, wherein the temporary target rate is set to a value equal to or less than a value obtained by subtracting a value obtained by dividing the end buffer position by a segment length from the predetermined target rate.
前記仮想バッファサイズを,前記所定のバッファサイズから前記終端バッファ位置を引いた値以下の値に設定する
ことを特徴とするセグメント符号化方法。 In the segment encoding method according to claim 1 or 2,
The segment encoding method, wherein the virtual buffer size is set to a value equal to or smaller than a value obtained by subtracting the end buffer position from the predetermined buffer size.
所定の目標レートと与えられた終端バッファ位置とセグメント長とから,前記目標レートよりも少ない仮目標レートを算出する手段と,
所定のバッファサイズと前記終端バッファ位置とから,前記バッファサイズよりも小さい仮想バッファサイズを算出する手段と,
前記仮目標レートと前記仮想バッファサイズとを用いて,前記セグメントの各フレームをCBRモードで符号化する手段と,
符号化結果の発生符号量をもとに,前記目標レートと前記バッファサイズとからデコード用時刻情報を算出する手段と,
前記符号化結果に前記デコード用時刻情報を付加して,前記セグメントの符号化ストリームを生成する手段とを備える
ことを特徴とするセグメント符号化装置。 A segment encoding apparatus for encoding a segment so that a buffer failure does not occur when an encoded stream of a segment obtained by extracting a part of an image sequence is combined with a stream before and after the segment,
Means for calculating a provisional target rate less than the target rate from a predetermined target rate, a given end buffer position and a segment length;
Means for calculating a virtual buffer size smaller than the buffer size from a predetermined buffer size and the end buffer position;
Means for encoding each frame of the segment in CBR mode using the temporary target rate and the virtual buffer size;
Means for calculating decoding time information from the target rate and the buffer size based on the generated code amount of the encoding result;
Means for adding the decoding time information to the encoding result and generating an encoded stream of the segment.
符号化対象の画像のシーケンスを複数のセグメントに分割するセグメント分割部と,
前記セグメント分割部により分割された各セグメントをそれぞれ符号化する,請求項4記載の複数のセグメント符号化装置と,
前記複数のセグメント符号化装置が符号化したセグメントのストリームを結合するストリーム結合部とを備える
ことを特徴とする並列エンコードシステム。 A parallel encoding system that divides a sequence of images into multiple segments and encodes each segment in parallel,
A segment division unit for dividing a sequence of images to be encoded into a plurality of segments;
A plurality of segment encoding devices according to claim 4, each encoding each segment divided by said segment dividing unit;
A parallel encoding system, comprising: a stream combination unit that combines the stream of segments encoded by the plurality of segment encoding apparatuses.
前記符号化ストリームの原画像のシーケンスから,再符号化する映像部分のセグメントを切り出すセグメント切り出し部と,
前記符号化ストリームを解析し,再符号化の対象となった前記符号化ストリームの一部分の初期バッファ位置と終端バッファ位置とを求めるストリーム解析部と,
前記ストリーム解析部が求めた初期バッファ位置と終端バッファ位置とをもとに,前記セグメント切り出し部により切り出されたセグメントを符号化する,請求項4記載のセグメント符号化装置と,
前記セグメント符号化装置が再符号化したセグメントのストリームと,前記符号化ストリームにおける再符号化した部分を除いた部分のストリームとを結合するストリーム結合部とを備える
ことを特徴とする部分的再エンコードシステム。 A partial re-encoding system for re-encoding a portion of an encoded stream,
A segment cutout unit for cutting out a segment of a video part to be re-encoded from the sequence of original images of the encoded stream;
A stream analysis unit that analyzes the encoded stream and obtains an initial buffer position and an end buffer position of a part of the encoded stream that is a target of re-encoding;
The segment encoding device according to claim 4, wherein the segment cut out by the segment cutout unit is encoded based on the initial buffer position and the end buffer position obtained by the stream analysis unit;
A partial re-encoding comprising: a stream combining unit that combines a stream of segments re-encoded by the segment encoding device and a stream of a part excluding the re-encoded part of the encoded stream. system.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2009005366A JP4928569B2 (en) | 2009-01-14 | 2009-01-14 | Segment encoding method, segment encoding apparatus, segment encoding program and recording medium thereof, parallel encoding system, partial re-encoding system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2009005366A JP4928569B2 (en) | 2009-01-14 | 2009-01-14 | Segment encoding method, segment encoding apparatus, segment encoding program and recording medium thereof, parallel encoding system, partial re-encoding system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2010166197A JP2010166197A (en) | 2010-07-29 |
| JP4928569B2 true JP4928569B2 (en) | 2012-05-09 |
Family
ID=42582042
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2009005366A Active JP4928569B2 (en) | 2009-01-14 | 2009-01-14 | Segment encoding method, segment encoding apparatus, segment encoding program and recording medium thereof, parallel encoding system, partial re-encoding system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4928569B2 (en) |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3312597B2 (en) * | 1997-06-19 | 2002-08-12 | 日本ビクター株式会社 | Variable length coding method |
| JP2008109637A (en) * | 2006-09-25 | 2008-05-08 | Toshiba Corp | Video encoding apparatus and method |
-
2009
- 2009-01-14 JP JP2009005366A patent/JP4928569B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2010166197A (en) | 2010-07-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2009272706A (en) | Moving image transcoding apparatus and its method | |
| RU2420913C1 (en) | Method and device for finding motion vector, programme and recording medium for storing programme | |
| US8406292B2 (en) | Moving picture editing apparatus | |
| US8411739B2 (en) | Bitstream conversion method, bitstream conversion apparatus, bitstream connecting apparatus, bitstream splitting program, bitstream conversion program, and bitstream connecting program | |
| US20080075164A1 (en) | Motion picture encoding apparatus and method | |
| JP2008283560A (en) | Image processing apparatus and method | |
| JP2017200176A (en) | Conversion from open group of pictures to closed group of pictures in interframe video compression | |
| KR101121613B1 (en) | Encoding device, encoding control method, and computer?readable recording medium having encoding control program recorded thereon | |
| US20090097567A1 (en) | Encoding apparatus and encoding method | |
| JP2014135741A (en) | Video encoding control method and device | |
| Slowack et al. | Distributed video coding with feedback channel constraints | |
| JP6344386B2 (en) | Time-series data encoding apparatus, method and program, and time-series data re-encoding apparatus, method and program | |
| JP4928569B2 (en) | Segment encoding method, segment encoding apparatus, segment encoding program and recording medium thereof, parallel encoding system, partial re-encoding system | |
| KR101703133B1 (en) | Method and Apparatus for Real-time Joint Source-Channel Coding | |
| JP5472094B2 (en) | Moving image conversion apparatus, moving image distribution system, moving image conversion method, and program | |
| JP5189618B2 (en) | Video encoding method, video encoding apparatus, and video encoding program | |
| KR101500300B1 (en) | Selective Low-Power Video Codec with Interaction Between Encoder and Decoder, and an Encoding/Decoding Method Thereof | |
| KR102192980B1 (en) | Image processing device of learning parameter based on machine Learning and method of the same | |
| WO2014006959A1 (en) | Video prediction encoding device, video prediction encoding method, video prediction encoding program, video prediction decoding device, video prediction decoding method, and video prediction decoding program | |
| WO2006040896A1 (en) | Moving picture re-encoder, moving picture editor, program, and recording medium | |
| JP4609411B2 (en) | Moving picture coding apparatus and moving picture coding program | |
| KR101145399B1 (en) | Apparatus and Method for High-speed Multi-pass Encoding | |
| JP2009246489A (en) | Video-signal switching apparatus | |
| JP4373283B2 (en) | Video / audio decoding method, video / audio decoding apparatus, video / audio decoding program, and computer-readable recording medium recording the program | |
| JP4878051B2 (en) | Encoded stream transmission method, encoded stream transmission apparatus, encoded stream transmission control program, and recording medium therefor |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20101221 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20111130 |
|
| 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: 20120207 |
|
| 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: 20120210 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150217 Year of fee payment: 3 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 4928569 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| 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 |