JP2008278012A - Bitstream replacing device - Google Patents

Bitstream replacing device Download PDF

Info

Publication number
JP2008278012A
JP2008278012A JP2007117267A JP2007117267A JP2008278012A JP 2008278012 A JP2008278012 A JP 2008278012A JP 2007117267 A JP2007117267 A JP 2007117267A JP 2007117267 A JP2007117267 A JP 2007117267A JP 2008278012 A JP2008278012 A JP 2008278012A
Authority
JP
Japan
Prior art keywords
bit stream
pcr
replacement
bitstream
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2007117267A
Other languages
Japanese (ja)
Inventor
Daisuke Morimoto
大介 森本
Takashi Hiraoka
隆 平岡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2007117267A priority Critical patent/JP2008278012A/en
Publication of JP2008278012A publication Critical patent/JP2008278012A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a bitstream replacing device capable of performing smooth replacement free of a screen shock in video reproduction when a bitstream is replaced. <P>SOLUTION: Bitstreams of at least two systems are input, and alternated and output to replace the bitstream of the first system with the bitstream of the second system. A code sequence thinning-out means thins out a code sequence for the bitstream of the second system according to thinning-out control information. A code sequence delay means selectively delay the transmission timing of a prescribed code sequence in the bitstream for the output of the code sequence thinning-out means according to delay control information. For example, a main video bitstream of a digital broadcast is replaced with a CM video bitstream. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、映像信号を符号化したビットストリームの一部を、別の映像信号を符号化したビットストリームに差し替えるビットストリーム差替装置に関する。   The present invention relates to a bit stream replacement device that replaces a part of a bit stream obtained by encoding a video signal with a bit stream obtained by encoding another video signal.

近年、BS、CS、地上デジタル放送等の高精細度テレビジョン信号のデジタル化技術が実用化されている。このデジタル放送においては、MPEG2(Moving Picture Coding Experts Group 2)で規格されている符号化方式により符号化されたビットストリームの切替、同期化、多重化などの信号処理を施すことが必要不可欠であり、そのためのいくつかの技術が提案されている。   In recent years, digitizing techniques for high-definition television signals such as BS, CS, and terrestrial digital broadcasting have been put into practical use. In this digital broadcasting, it is indispensable to perform signal processing such as switching, synchronization, and multiplexing of bitstreams encoded by the encoding method standardized by MPEG2 (Moving Picture Coding Experts Group 2). Several techniques have been proposed for this purpose.

例えば、従来提案されているビットストリーム切替システムは、2系統のビットストリームを切り替える場合にそれぞれのGOP(Group Of Picture)の位相を事前に合わせることにより、画面ショックを生じることの無くスムースに切替えを行っている(特許文献1参照)。   For example, the conventionally proposed bitstream switching system allows smooth switching without causing screen shock by matching the phase of each GOP (Group Of Picture) in advance when switching two bitstreams. (See Patent Document 1).

また別の従来技術では、2系統のビットストリームを切り替える場合にバッファ量を調節するためピクチャーフレームを間引きすることが提案されており、これにより切替時の再生画像の途切れを防いでいる(特許文献2参照)。
特開2001−145022号公報 特開2001−285868号公報
In another prior art, it has been proposed to thin out picture frames in order to adjust the buffer amount when switching two bit streams, thereby preventing interruption of a reproduced image at the time of switching (Patent Document). 2).
Japanese Patent Laid-Open No. 2001-145022 JP 2001-285868 A

しかしながら、特許文献1におけるビットストリーム切替システムでは、上記のように2系統のビットストリームを切り替える場合にそれぞれのGOPの位相を事前に合わせることが提案されているが、実際に映像再生時に画面ショックが生じることの無いスムースな切替えを実現するためにはGOPの位相を合わせるだけではなくストリーム中に含まれるPTS(Presentation Time Stamp)と呼ばれる再生出力の時刻管理情報やDTS(Decoding Time Stamp)と呼ばれる復号の時刻管理情報も切替前後でシーケンシャルに連続している必要がある。2系統のビットストリームが同じエンコーダでエンコードされている場合についてはGOPの位相を合わせるだけで比較的スムースに切替えが可能だが、異なるエンコーダを用いた場合、GOPの位相を合わせていても再生時刻が前後するなど不整合が生じる場合があり、現実にはスムースな切替えは難しいという問題がある。   However, in the bit stream switching system in Patent Document 1, it has been proposed that the phases of the GOPs be matched in advance when switching between the two systems of bit streams as described above. In order to realize smooth switching that does not occur, not only the phase of GOP is matched, but also reproduction output time management information called PTS (Presentation Time Stamp) included in the stream and decoding called DTS (Decoding Time Stamp) The time management information must also be sequentially continuous before and after switching. When two bitstreams are encoded by the same encoder, it is possible to switch to a relatively smooth state by simply matching the GOP phase. However, when different encoders are used, the playback time can be adjusted even if the GOP phases are matched. There are cases where inconsistencies occur, such as back and forth, and in reality there is a problem that smooth switching is difficult.

また、特許文献2では、上述したように2系統のビットストリームを切り替える場合にバッファ量を調節するためにピクチャーフレームを間引くことが提案されているが、間引きを行うためその期間の時間方向の解像度が下がってしまうという問題がある。   In Patent Document 2, as described above, when switching between two bit streams, it is proposed to thin out picture frames in order to adjust the buffer amount. However, in order to perform thinning, resolution in the time direction during that period is proposed. There is a problem that goes down.

本発明は、従来の問題を解決するためになされたもので、その目的は、映像信号を符号化したビットストリームの一部を別の映像信号を符号化したビットストリームに差し替える場合に、映像再生時に画面ショックの発生をできるだけ抑えるとともに時間方向の解像度を確保した、実用上スムースな切替えを行い得るビットストリーム差替装置を提供することにある。   The present invention has been made in order to solve the conventional problems, and its purpose is to reproduce a video when a part of a bit stream obtained by encoding a video signal is replaced with a bit stream obtained by encoding another video signal. It is an object of the present invention to provide a bitstream replacement device that can suppress the occurrence of screen shock as much as possible and ensure the resolution in the time direction and can perform practically smooth switching.

本発明のビットストリーム差替装置は、少なくとも2系統のビットストリームが入力され、そのうちのいずれかを切り替えて選択的に出力することにより、第1の系統のビットストリームを第2の系統のビットストリームへ差し替える装置であって、前記第2の系統のビットストリームに対し間引制御情報に応じて符号列の間引きを実施する符号列間引手段と、前記符号列間引手段の出力に対し遅延制御情報に応じてビットストリーム中の所定の符号列の伝送タイミングを選択的に遅延させる符号列遅延手段とを有している。   The bit stream replacement device of the present invention receives at least two types of bit streams and selectively outputs one of them by switching one of the two types of bit streams, thereby converting the first type of bit stream into the second type of bit stream. A code sequence decimation unit that performs decimation of a code string in accordance with decimation control information with respect to the bit stream of the second system, and delay control for an output of the code sequence decimation unit Code string delay means for selectively delaying the transmission timing of a predetermined code string in the bit stream according to the information.

この構成により、下記のようにスムースな画像切替を実現できる。すなわち、第1の系統のビットストリームと第2の系統のビットストリームを切り替える際に単純にGOPの単位にて切替えを実施した場合には、第1の系統のビットストリームの後端のフレームと第2の系統のビットストリームの前端のフレームが時間的に重なってしまう。このような場合であっても、第2の系統のビットストリームの前端にて、第2の系統のビットストリームの映像再生には不要な符号列を間引処理によってビットストリーム上で廃棄するとともに、間引きされていない符号列をビットストリーム上での時間軸方向の位置を遅らせる。これにより、第1の系統のビットストリームの後端のフレームと第2の系統のビットストリームの前端のフレームが時間的に重なることを避け、また、間引きによる時間軸方向の解像度低下も避けることができ、スムースな画像切替えを実現することができる。   With this configuration, smooth image switching can be realized as described below. That is, when switching between the first system bit stream and the second system bit stream is simply performed in units of GOPs, the rear end frame of the first system bit stream and the second system bit stream The front end frames of the two systems of bit streams overlap in time. Even in such a case, at the front end of the second system bit stream, the code stream unnecessary for video reproduction of the second system bit stream is discarded on the bit stream by thinning-out processing, The position in the time axis direction on the bit stream of the code string that has not been thinned out is delayed. As a result, the rear end frame of the first system bit stream and the front end frame of the second system bit stream are prevented from overlapping in time, and resolution degradation in the time axis direction due to thinning is also avoided. Thus, smooth image switching can be realized.

また、本発明のビットストリーム切替装置は、前記ビットストリームの差替タイミング情報に応じて前記間引制御情報および前記遅延制御情報を生成して前記符号列間引手段および前記符号列遅延手段にそれぞれ供給する差替制御部を有し、前記差替制御部は、前記間引制御情報として、前記第2の系統のビットストリームの前端部分におけるフレーム間双方向予測符号化によるフレームの符号列を間引く制御情報を供給し、前記遅延制御情報として、前記第2の系統のビットストリームの前端部分におけるフレーム内符号化によるフレームの符号列を遅延させる制御情報を供給する。   Further, the bit stream switching device of the present invention generates the thinning control information and the delay control information according to the replacement timing information of the bit stream, and sends them to the code string thinning means and the code string delay means, respectively. A replacement control unit for supplying, and the replacement control unit thins out a code string of a frame by inter-frame bi-directional predictive coding at a front end portion of the bit stream of the second system as the thinning-out control information. Control information is supplied, and as the delay control information, control information for delaying a code string of a frame by intraframe encoding at the front end portion of the bit stream of the second system is supplied.

この構成により、第2の系統のビットストリームの前端のフレームにて、第2の系統のビットストリームの映像再生には不要なフレーム間双方向符号化によるフレームをビットストリーム上で廃棄するとともに、フレーム内符号化によるフレームのビットストリーム上での時間軸方向の位置を遅らせる。フレーム内符号化によるフレームは、直後のフレーム間順方向予測符号化によるフレームの前に遅らせることが好適である。これにより、第1の系統のビットストリームの後端のフレームと第2の系統のビットストリームの前端のフレームが時間的に重なることを避け、スムースな画像切替えを実現することができる。   With this configuration, in the front end frame of the second system bit stream, the frame by the inter-frame bidirectional encoding which is not necessary for the video reproduction of the second system bit stream is discarded on the bit stream, and the frame The position in the time axis direction on the bit stream of the frame by the inner coding is delayed. It is preferable that the frame by intra-frame coding is delayed before the frame by the immediately subsequent inter-frame forward predictive coding. Thereby, it is possible to avoid the temporally overlapping of the rear end frame of the first system bit stream and the front end frame of the second system bit stream, thereby realizing smooth image switching.

また、本発明のビットストリーム差替装置において、前記第1の系統のビットストリームが本編映像のビットストリームであり、前記第2の系統のビットストリームがCM映像のビットストリームである。この構成により、本編映像からCM映像へのスムースな画像切替えを実現できる。   In the bit stream replacement device of the present invention, the first system bit stream is a main video bit stream, and the second system bit stream is a CM video bit stream. With this configuration, smooth image switching from the main video to the CM video can be realized.

また、本発明のビットストリーム差替装置は、前記符号列遅延手段の後段に設けられたビットストリーム切替手段と、前記ビットストリーム切替手段の後段に設けられたPCR処理部とを具備し、前記PCR処理部は、前記符号列間引手段で間引かれ空白となった期間にPCRパケットを付加する。この構成により、MPEG規格におけるPCRパケットの到着間隔を遵守したビットストリームを提供できる。   Further, the bit stream replacement device of the present invention comprises a bit stream switching means provided at the subsequent stage of the code string delay means, and a PCR processing unit provided at the subsequent stage of the bit stream switching means, and the PCR The processing unit adds the PCR packet during a period when the code string thinning unit thins out and becomes blank. With this configuration, a bit stream that complies with the arrival interval of PCR packets in the MPEG standard can be provided.

また、本発明のビットストリーム差替装置は、前記符号列遅延手段の後段に設けられたビットストリーム切替手段と、前記ビットストリーム切替手段の後段に設けられたPCR処理部とを具備し、前記PCR処理部は、前記第2の系統のビットストリームの後端のフレームのPCR値と、その後に続く前記第1の系統のビットストリームの前端のフレームのPCR値とが連続した値となるよう前記第1の系統のビットストリームの前端のフレーム以降のPCR値を書き換える。   Further, the bit stream replacement device of the present invention comprises a bit stream switching means provided at the subsequent stage of the code string delay means, and a PCR processing unit provided at the subsequent stage of the bit stream switching means, and the PCR The processing unit is configured so that a PCR value of a rear end frame of the second stream of bit streams and a PCR value of a front end frame of the first stream of bit streams subsequent thereto are continuous values. The PCR value after the front end frame of the bit stream of one system is rewritten.

この構成により、第2の系統のビットストリームの後端のフレームのPCR値と第1の系統のビットストリームの前端のフレームのPCR値にMPEG規格から逸脱するような大きな差がある場合、第2の系統のビットストリームの後端のフレームのPCR値と第1の系統のビットストリームの前端のフレームのPCR値が連続するように第1の系統のビットストリームの前端のフレーム以降のPCR値を書き換えることで、MPEG規格におけるPCRパケットのジッタ誤差を遵守したビットストリームを提供できる。   With this configuration, if there is a large difference between the PCR value of the rearmost frame of the second system bitstream and the PCR value of the frontmost frame of the first system bitstream that deviates from the MPEG standard, The PCR values after the front end frame of the first system bit stream are rewritten so that the PCR value of the rear end frame of the first system bit stream and the PCR value of the front end frame of the first system bit stream are continuous. Thus, it is possible to provide a bit stream complying with the jitter error of the PCR packet in the MPEG standard.

また、本発明のビットストリーム差替装置は、前記第1の系統のビットストリームと前記第2の系統のビットストリーム両者のバッファ充足度であるVBVバッファ量を計測比較するVBVバッファ比較部と、前記VBVバッファ比較部の出力により制御されるレート算出手段と、前記レート算出手段出力により制御され、前記第2の系統のビットストリームに対しレート変更を行うレート変更手段とを具備する。   The bit stream replacement device according to the present invention includes a VBV buffer comparison unit that measures and compares a VBV buffer amount that is a buffer fullness of both the first system bit stream and the second system bit stream, A rate calculation unit controlled by an output of the VBV buffer comparison unit; and a rate change unit controlled by the output of the rate calculation unit and configured to change the rate of the bit stream of the second system.

この構成により、第2の系統のビットストリーム期間内においては通常の設定レートよりも高いレートでビットストリーム伝送することにより、所定の期間内にビットストリームを出し切ることができ、その結果受信機上にてスムースな表示を実現することが可能になる。   With this configuration, the bit stream can be transmitted within a predetermined period by transmitting the bit stream at a rate higher than the normal setting rate within the bit stream period of the second system, and as a result, on the receiver. And smooth display can be realized.

また、本発明のビットストリーム差替装置は、前記符号列間引手段の後段に設けられ、前記第2の系統のビットストリームの後端にて前記第1の系統のビットストリームに切り替わる境界に、TSパケットにおけるAdaptation Field 領域に存在するdiscontinuity_indicatorの値を「1」に設定したTSパケットを挿入するパケット挿入器を有する。   Further, the bit stream replacement device of the present invention is provided at a subsequent stage of the code string thinning means, and at a boundary where the bit stream of the second system is switched to the first system bit stream at the rear end of the second system bit stream, It has a packet inserter for inserting a TS packet in which the value of discontinuity_indicator existing in the Adaptation Field area in the TS packet is set to “1”.

この構成により、符号列間引手段の後段に第2の系統のビットストリームの後端から第1の系統のビットストリームに切り替える場合のその境界に、TSパケットにおけるAdaptation Field 領域に存在するdiscontinuity_indicatorの値を「1」に設定したTSパケットを挿入した後、引き続き次のビットストリームをスルーさせる構成とすることで、複数系統のビットストリームの切替えの際に両系のcontinuity_counter値が常に同期した状態とすることができ、本編映像ビットストリーム中のcontinuity_counterの値を両系統で必ず同じ値にすることができる。これにより、システムの冗長化を考慮した際に複数系統の切替システムが存在する場合でも、両系統にてcontinuity_counterの値を同じ値にすることができ、複数系統の系切替えを実施した際においても受信機側での画像ショックの発生を防ぐことができるビットストリームを提供できる。   With this configuration, the value of discontinuity_indicator existing in the Adaptation Field area in the TS packet at the boundary when switching from the rear end of the second stream of bit streams to the first stream of bit streams after the code stream decimation means After inserting the TS packet set to "1", the continuity_counter value of both systems is always synchronized when switching between the multiple system bit streams by continuously passing through the next bit stream. Therefore, the continuity_counter value in the main video bitstream can be always set to the same value in both systems. This allows the continuity_counter value to be the same in both systems even when there are multiple system switching systems when considering system redundancy. It is possible to provide a bit stream that can prevent image shock on the receiver side.

また、本発明のビットストリーム差替装置は、入力ビットストリームに含まれるPCRの値の進度を算出するPCR進度算出手段と、前記PCR進度算出手段にて求められたPCR進度を入力として別途用意された基準クロックの制御を行うクロック制御部とを具備し、前記PCR進度算出手段は入力ビットストリームに含まれるPCRの値と入力ビットストリームのパケットの到着時刻からPCR値の進度を算出し、そのPCRの進度が別途定められた基準値に合致するように前記クロック制御部が基準クロックを制御する。   In addition, the bitstream replacement device of the present invention is separately provided with a PCR progress calculation means for calculating the progress of the PCR value included in the input bitstream, and the PCR progress obtained by the PCR progress calculation means as inputs. A PCR controller that controls the reference clock, and the PCR progress calculating means calculates the progress of the PCR value from the PCR value included in the input bit stream and the arrival time of the packet of the input bit stream, and the PCR The clock control unit controls the reference clock so that the degree of advance matches a reference value determined separately.

この構成により、MPEG2符号化方式によるトランスポートストリームに含まれるPCRの値の進度を算出し、PCR進度を元に本システムの基準クロックを制御する。PCRの進度が基準値に合致するようシステムの原発振器に対して制御が行われてよい。これにより、入力されるトランスポートストリームに含まれるPCRの進度とシステムの内部クロックの進度を合致させることができ、PCR誤差を減らすことが可能になる。   With this configuration, the progress of the PCR value included in the transport stream based on the MPEG2 encoding method is calculated, and the reference clock of the present system is controlled based on the PCR progress. Control may be performed on the original oscillator of the system so that the progress of the PCR matches the reference value. As a result, the progress of the PCR included in the input transport stream and the progress of the internal clock of the system can be matched, and the PCR error can be reduced.

また、本発明の別の態様は、少なくとも2系統のビットストリームが入力され、そのうちのいずれかを切り替えて選択的に出力することにより、第1の系統のビットストリームを第2の系統のビットストリームへ差し替えるビットストリーム差替方法であって、前記第2の系統のビットストリームに対し間引制御情報に応じて符号列の間引きを実施し、間引処理が行われた前記ビットストリームに対し遅延制御情報に応じてビットストリーム中の所定の符号列の伝送タイミングを選択的に遅延させる。この方法によっても上述した本発明の利点が得られる。   According to another aspect of the present invention, at least two systems of bit streams are input, and one of them is switched and selectively output, whereby the first system bit stream is converted to the second system bit stream. A bit stream replacement method for replacing the bit stream with respect to the second stream of bit streams according to thinning control information, and delay control for the bit stream subjected to the thinning process The transmission timing of a predetermined code string in the bit stream is selectively delayed according to the information. This method also provides the advantages of the present invention described above.

本発明は、上記のようにビットストリーム中の重要性の少ないフレームの削除等を行い、また、ビットストリーム中の空白期間のパケット追加を行うことにより、2系統のビットストリームを切り替える場合に、映像再生時に画面ショックの発生をできるだけ抑えるとともに時間方向の解像度を確保した、スムースな切替えを行い得るという効果を有するビットストリーム差替装置を提供することができる。   As described above, the present invention deletes a less important frame in a bit stream as described above, and adds a packet during a blank period in the bit stream to switch between two bit streams. It is possible to provide a bitstream replacement device that has an effect that smooth switching can be performed while suppressing occurrence of a screen shock as much as possible during reproduction and ensuring resolution in the time direction.

以下、この発明の実施形態について図面を参照して詳細に説明する。
図1は、本発明の実施の形態に関わるビットストリーム差替装置の主要部分の構成を示しており、図2は同ビットストリーム差替装置の全体構成を示す図である。特に限定するわけではないが、本実施の形態ではテレビジョン番組における本編映像をCM映像に差し替える形で説明する。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 1 shows the configuration of the main part of the bitstream replacement device according to the embodiment of the present invention, and FIG. 2 shows the overall configuration of the bitstream replacement device. Although not particularly limited, the present embodiment will be described by replacing the main video in a television program with a CM video.

まず、図2を参照してビットストリーム差替装置の全体構成を説明する。図2に示すように、ビットストリーム差替装置は、第1入力TS1(本編)が入力される第1TS分配器2および第2入力TS6(CM)が入力される第2TS分配器7を備える。第1TS分配器2および第2TS分配器7の各々は、第1入力バッファ3および第2入力バッファ8に接続されている。そして、第1入力バッファ3は、第1CM差替部4、第1出力バッフ5を介してTS切替器12に接続されている。また、第2入力バッファ8は、第2CM差替部9、第2出力バッファ10を介してTS切替部12に接続されている。そして、TS切替部12から出力TS13(差替後)が出力される。   First, the overall configuration of the bitstream replacement device will be described with reference to FIG. As shown in FIG. 2, the bitstream replacement device includes a first TS distributor 2 to which a first input TS1 (main part) is input and a second TS distributor 7 to which a second input TS6 (CM) is input. Each of the first TS distributor 2 and the second TS distributor 7 is connected to the first input buffer 3 and the second input buffer 8. The first input buffer 3 is connected to the TS switch 12 via the first CM replacement unit 4 and the first output buffer 5. The second input buffer 8 is connected to the TS switching unit 12 via the second CM replacement unit 9 and the second output buffer 10. Then, the TS switching unit 12 outputs the output TS13 (after replacement).

図2において、第1入力TS6(本編)は、テレビジョン番組における本編映像を伝送するためのMPEG2符号化されたトランスポートストリーム(以下、TS)と呼ばれる本編映像ビットストリームである。。第2入力TS6(CM)は、第1入力TS1と同様にテレビジョン番組において、CM映像をMPEG2符号化したCM映像ビットストリームである。第1TS分配器2は、入力された本編映像ビットストリームを分配して、第1入力バッファ3および第2入力バッファ8へ供給する。第2TS分配器7は、入力されたCM映像ビットストリームを分配して、第1入力バッファ3および第2入力バッファ8へ供給する。   In FIG. 2, a first input TS6 (main part) is a main part video bit stream called an MPEG2-encoded transport stream (hereinafter, TS) for transmitting a main part picture in a television program. . Similarly to the first input TS1, the second input TS6 (CM) is a CM video bitstream obtained by MPEG2 encoding a CM video in a television program. The first TS distributor 2 distributes the inputted main video bit stream and supplies it to the first input buffer 3 and the second input buffer 8. The second TS distributor 7 distributes the input CM video bit stream and supplies it to the first input buffer 3 and the second input buffer 8.

第1入力バッファ3は、第1TS分配器2にて分配された本編映像ビットストリームと、第2TS分配器7にて分配されたCM映像ビットストリームを入力し、それぞれを一時的に蓄積するとともにビットストリームを構成するパケットの到着時刻等を抽出・管理する。   The first input buffer 3 inputs the main video bit stream distributed by the first TS distributor 2 and the CM video bit stream distributed by the second TS distributor 7, and temporarily stores each bit. Extracts and manages the arrival times of packets making up the stream.

第1CM差替部4は、CM差替えを行う構成であって、CM差替タイミング情報11に基づき、第1入力バッファ3より出力される本編映像ビットストリームとCM映像ビットストリームとを切り替え、差替済ビットストリームとして第1出力バッファ5へ出力する。第1出力バッファ5は、差替済ビットストリームを一時的に蓄積するとともに、ビットストリームを構成するパケットを定められたレートで送出させる。 The first CM replacement unit 4 is configured to perform CM replacement, and switches between the main video bit stream and the CM video bit stream output from the first input buffer 3 based on the CM replacement timing information 11 and replaces them. It outputs to the 1st output buffer 5 as a finished bit stream. The first output buffer 5 temporarily stores the replaced bit stream and sends out the packets constituting the bit stream at a predetermined rate.

一方、第2入力バッファ8、第2CM差替部9および第2出力バッファ10は、それぞれ、前述の第1入力バッファ3、第1CM差替部4および第1出力バッファ5と同様の構成であり、同様に動作する。第1出力バッファ5より出力される差替済ビットストリームおよび第2出力バッファ10より出力される差替済ビットストリームは、TS切替器12に入力され、ここでどちらかのビットストリームが選択され、出力TS(差替後)13として出力される。   On the other hand, the second input buffer 8, the second CM replacement unit 9 and the second output buffer 10 have the same configurations as the first input buffer 3, the first CM replacement unit 4 and the first output buffer 5, respectively. Works the same way. The replaced bit stream output from the first output buffer 5 and the replaced bit stream output from the second output buffer 10 are input to the TS switch 12, where either bit stream is selected, The output TS (after replacement) 13 is output.

上記のように、本実施の形態では、同構成の系統が複数設けられている。これは、システムの信頼性を確保するためであり、片方の系統で異常が発生した場合には、TS切替器12を用いて他方の系統に出力系統が切り替えられる。   As described above, in the present embodiment, a plurality of systems having the same configuration are provided. This is to ensure the reliability of the system. When an abnormality occurs in one system, the output system is switched to the other system using the TS switch 12.

次に、第1CM差替部4および第2CM差替部9の詳細構成について、図1を参照しながら説明する。   Next, detailed configurations of the first CM replacement unit 4 and the second CM replacement unit 9 will be described with reference to FIG.

図1は、図2における第1CM差替部4あるいは第2CM差替部9の詳細構成を示したものである。前述したように、第1CM差替部4および第2CM差替部9は同様の構成であり、したがって各々が図1の構成を有している。以下では、第1CM差替部4および第2CM差替部9を区別せずに、単にCM差替部という。図1に示すように、CM差替部には、本編映像ビットストリーム21およびCM映像ビットストリーム25が入力され、それらビットストリームが差し替えられる。   FIG. 1 shows a detailed configuration of the first CM replacement unit 4 or the second CM replacement unit 9 in FIG. As described above, the first CM replacement unit 4 and the second CM replacement unit 9 have the same configuration, and therefore each has the configuration of FIG. Below, the 1st CM replacement part 4 and the 2nd CM replacement part 9 are simply called CM replacement part, without distinguishing. As shown in FIG. 1, the main video bitstream 21 and the CM video bitstream 25 are input to the CM replacement unit, and these bitstreams are replaced.

本編映像ビットストリーム21は、第1符号列間引部22に入力される。第1符号列間引部22には、CM差替タイミング情報11に基づきCM差替制御部29で生成された制御信号が入力されている。この制御信号に従い、第1符号列間引部22は、CM差替処理にて不要となる符号列を間引く処理を行う。ここで、CM差替えで不要となる符号列を間引く処理を行った場合、その間引き処理によりビットストリームに含まれる連続性指標であるcontinuity_counterの値が不連続となる。このため、第1符号列間引部22の出力を第1DI付加部23に入力する。第1DI付加部23は、continuity_counterの値が不連続となった部分にAdaptarion Field領域におけるdiscontinuity_indicatorが1であるTSパケットを挿入する。これにより、そのパケット以前のデータとそのパケット以降のデータが連続していないことを規格上示すことができ、連続性が保てなくともMPEG規格違反にならないように処理する。そして第1DI付加部23の出力は第1符号列遅延部24に送られる。第1符号列遅延部24においても、CM差替タイミング情報11に基づきCM差替制御部29で生成された制御信号が入力されている。ここで、第1符号列遅延部24が、CM差替制御部29からの制御信号に従ってビットストリーム中の所定の符号列の伝送タイミングを選択的に遅延させた後、その出力は符号列スイッチ33に入力される。   The main video bitstream 21 is input to the first code string thinning unit 22. A control signal generated by the CM replacement control unit 29 based on the CM replacement timing information 11 is input to the first code string thinning unit 22. In accordance with this control signal, the first code string thinning unit 22 performs a process of thinning out a code string that is unnecessary in the CM replacement process. Here, when a process of thinning out a code string that is unnecessary for CM replacement is performed, the value of continuity_counter, which is a continuity index included in the bitstream, becomes discontinuous by the thinning process. For this reason, the output of the first code string thinning unit 22 is input to the first DI adding unit 23. The first DI adding unit 23 inserts a TS packet having a discontinuity_indicator of 1 in the Adaptation Field area in a portion where the value of continuity_counter is discontinuous. Thereby, it can be indicated in the standard that the data before the packet and the data after the packet are not continuous, and processing is performed so as not to violate the MPEG standard even if the continuity cannot be maintained. The output of the first DI adding unit 23 is sent to the first code string delay unit 24. Also in the first code string delay unit 24, the control signal generated by the CM replacement control unit 29 based on the CM replacement timing information 11 is input. Here, after the first code string delay unit 24 selectively delays the transmission timing of a predetermined code string in the bit stream in accordance with the control signal from the CM replacement control unit 29, the output is the code string switch 33. Is input.

一方、CM映像ビットストリーム25は、第2符号列間引部26に入力される。第2符号列間引部26は、CM差替制御部29から入力される制御信号に従って動作し、差替えに際して不要となる符号列を間引き、間引後のビットストリームを第2DI付加部27に入力する。第2DI付加部27は、continuity_counterの値が不連続となった部分にAdaptarion Field領域におけるdiscontinuity_indicatorが1であるTSパケットを挿入する。そして第2符号列遅延部28が、CM差替制御部29からの制御信号に従ってビットストリーム中の所定の符号列の伝送タイミングを選択的に遅延させる。第2符号列遅延部28の出力はレート変換部32にて所定の値にレート変換された後、符号列スイッチ33に入力される。   On the other hand, the CM video bitstream 25 is input to the second code string thinning unit 26. The second code string thinning unit 26 operates in accordance with the control signal input from the CM replacement control unit 29, thins out a code string that is not necessary for replacement, and inputs the thinned bit stream to the second DI adding unit 27. To do. The second DI adding unit 27 inserts a TS packet having a discontinuity_indicator of 1 in the Adaptation Field area at a portion where the value of continuity_counter becomes discontinuous. Then, the second code string delay unit 28 selectively delays the transmission timing of a predetermined code string in the bitstream according to the control signal from the CM replacement control unit 29. The output of the second code string delay unit 28 is rate-converted to a predetermined value by the rate converter 32 and then input to the code string switch 33.

符号列スイッチ33においても、CM差替タイミング情報11に基づきCM差替制御部29で生成された制御信号が入力されている。符号列スイッチ33にて、CM差替タイミング情報により本編映像ビットストリームとCM映像ビットストリームが選択、切り替えられ、差替済ビットストリームとして出力される。   Also in the code string switch 33, the control signal generated by the CM replacement control unit 29 based on the CM replacement timing information 11 is input. In the code string switch 33, the main video bit stream and the CM video bit stream are selected and switched based on the CM replacement timing information, and output as a replaced bit stream.

符号列スイッチ33は、差替済ビットストリームをPCR処理部34に出力する。PCR処理部34は、差替済ビットストリームにて、本編映像ビットストリームとCMビットストリームを切り替えた際にストリームに空白期間が生じている場合、その空白期間を埋めるようにPCRパケットを挿入する。   The code string switch 33 outputs the replaced bit stream to the PCR processing unit 34. In the replaced bit stream, when the main video bit stream and the CM bit stream are switched in the replacement bit stream, the PCR processing unit 34 inserts a PCR packet so as to fill the blank period.

また、PCR処理部34は、CM映像ビットストリームの後端のフレームのPCR値と、本編映像ビットストリームの前端のフレームのPCR値とが連続した値となるよう本編映像ビットストリームの前端のフレーム以降のPCR値を書き換える処理も行う。   In addition, the PCR processing unit 34 performs the subsequent frame of the main video bitstream so that the PCR value of the rear frame of the CM video bitstream and the PCR value of the front frame of the main video bitstream are continuous. The process of rewriting the PCR value is also performed.

PCR処理部34の次段には空フレーム付加部35が設けられている。空フレーム付加部35は、差替済ビットストリームを復号した際に復号された映像信号のフレームに空き期間が発生する場合には受信機動作が不安定となるので、フレームの空き期間を埋めるようにビットストリームに対して空フレームと呼ばれる動きベクトルゼロの映像情報を挿入する。そして、空フレーム付加部35を経たビットストリームが、差替済ビットストリーム36としてCM差替部から出力する。   An empty frame adding unit 35 is provided at the next stage of the PCR processing unit 34. The empty frame adding unit 35 fills the empty period of the frame because the receiver operation becomes unstable when an empty period occurs in the frame of the decoded video signal when the replaced bit stream is decoded. The video information of zero motion vector called empty frame is inserted into the bit stream. Then, the bit stream that has passed through the empty frame adding unit 35 is output as a replaced bit stream 36 from the CM replacing unit.

また、VBV(Video Buffering Verifier)バッファ比較部30では、本線映像ビットストリーム21とCM映像ビットストリーム25の両者のVBVバッファ量を比較する。その比較結果により、レート算出部31においてバッファ量の大小に応じCM差替期間におけるレートを算出する。そしてレート算出部31の出力がレート変換部32に入力され、レート変換部32にて、CM映像ビットストリームのレートが変換される。レート変換部32では、CM映像ビットストリーム期間内に通常の設定レートよりも高いレートでビットストリーム伝送するようにレートが変換され、これにより、所定の期間内にCM映像ビットストリームが出し切られる。   A VBV (Video Buffering Verifier) buffer comparison unit 30 compares the VBV buffer amounts of both the main video bitstream 21 and the CM video bitstream 25. Based on the comparison result, the rate calculation unit 31 calculates the rate in the CM replacement period according to the size of the buffer. The output of the rate calculation unit 31 is input to the rate conversion unit 32, and the rate conversion unit 32 converts the rate of the CM video bitstream. The rate conversion unit 32 converts the rate so that the bit stream is transmitted at a rate higher than the normal set rate within the CM video bit stream period, and thereby the CM video bit stream is completely cut out within the predetermined period.

CM差替制御部29は、CM差替部によるCM差替えを制御する構成である。CM差替制御部29には、外部からCM差替タイミング情報11が入力される。CM差替タイミング情報11は外部から切替えを指示する信号である。CM差替制御部29は、上述の説明の中で述べたように、CM差替タイミング情報11に基づいて制御信号を生成し、第1符号列間引部22、第2符号列間引部26、第1符号列遅延部24、第2符号列遅延部28および符号列スイッチ33といった各制御対象に供給する。   The CM replacement control unit 29 is configured to control CM replacement by the CM replacement unit. CM replacement timing information 11 is input to the CM replacement control unit 29 from the outside. The CM replacement timing information 11 is a signal for instructing switching from the outside. As described in the above description, the CM replacement control unit 29 generates a control signal based on the CM replacement timing information 11, and the first code string thinning unit 22 and the second code string thinning unit. 26, the first code string delay unit 24, the second code string delay unit 28, and the code string switch 33.

CM差替制御部29が第1符号列間引部22および第2符号列間引部26に供給する制御信号を、間引制御情報という。間引制御情報は、符号列の間引を制御する信号であり、具体的には、後述にて詳細に説明するように、差替後のビットストリームの前端部分におけるBフレームの符号列を間引く制御情報である。また、CM差替制御部29が第1符号列遅延部24および第2符号列遅延部28に供給する制御信号を、遅延制御情報という。遅延制御情報は、間引処理後の出力に対しビットストリーム中の所定の符号列の伝送タイミングを選択的に遅延させる信号であり、具体的には、後述にて詳細に説明するように、差替後のビットストリームの前端部分におけるIフレームの符号列を、直後のPフレームの前まで遅延させる制御情報である。さらに、CM差替制御部29が符号列スイッチ33に供給する制御信号を、切替制御情報という。切替制御情報は、本編映像ストリームとCM映像ストリームとをCM差替タイミング情報に従って切り替える信号である。   A control signal that the CM replacement control unit 29 supplies to the first code string thinning unit 22 and the second code string thinning unit 26 is referred to as thinning control information. The decimation control information is a signal for controlling decimation of the code sequence. Specifically, as will be described in detail later, the decimation control sequence of the B frame at the front end portion of the bit stream after replacement is thinned out. Control information. A control signal supplied from the CM replacement control unit 29 to the first code string delay unit 24 and the second code string delay unit 28 is referred to as delay control information. The delay control information is a signal that selectively delays the transmission timing of a predetermined code string in the bit stream with respect to the output after the thinning process, and specifically, as described in detail later, This is control information for delaying the I-frame code string in the front end portion of the replaced bitstream until the immediately preceding P-frame. Further, a control signal that the CM replacement control unit 29 supplies to the code string switch 33 is referred to as switching control information. The switching control information is a signal for switching between the main video stream and the CM video stream according to the CM replacement timing information.

以上に、本実施の形態に係るビットストリーム差替装置の構成について説明した。次に、ビットストリーム差替装置の動作を説明する。   The configuration of the bitstream replacement device according to the present embodiment has been described above. Next, the operation of the bitstream replacement device will be described.

図3は、ビットストリーム差替装置での差替処理の対象になるビットストリームを示している。図3では、上から順に、本編映像の原画像(101)、本編映像のMPEG2符号化後のビットストリーム(102)、CM映像の原画像(201)、CM映像のMPEG2符号化後のビットストリーム(202)を示している。各信号の横方向の位置はそれぞれのタイミングに合わせてずらされている(他の図も同様)。   FIG. 3 shows a bit stream to be subjected to replacement processing in the bit stream replacement device. In FIG. 3, in order from the top, the original video (101) of the main video, the bitstream (102) after MPEG2 encoding of the main video, the original image (201) of CM video, and the bitstream of the CM video after MPEG2 encoding (202). The horizontal position of each signal is shifted in accordance with the timing (the same applies to other drawings).

図中で、I、P、Bは、MPEG2符号化方式におけるGOP構造中のフレームを指しており、それぞれ、フレーム内符号化によるIフレーム、フレーム間順方向予測符号化によるPフレーム、双方向予測符号化によるBフレームを表わしている。I,P,Bに続く数字は時間軸の順序を表わしており、数字が小さくなるほど過去を表す。図示のように、MPEG符号化後のビットストリームは、I2、B0、B1、P5といった順番に符号列が配置され、原画像と比べると符号列の順番が入れ替わっている。   In the figure, I, P, and B indicate frames in the GOP structure in the MPEG2 encoding system, and are respectively an I frame by intraframe encoding, a P frame by interframe forward prediction encoding, and bidirectional prediction. The B frame by encoding is represented. The numbers following I, P, and B indicate the order of the time axis, and the smaller the number, the more the past. As shown in the figure, in the bit stream after MPEG encoding, code sequences are arranged in the order of I2, B0, B1, and P5, and the order of the code sequences is changed compared to the original image.

次に、図4および図5は、本実施の形態におけるビットストリームの差替えの基本動作を示している。図4には本編映像とCM映像の重複が生じてしまう状況を示し、そのような重複を防ぐ本発明の間引および遅延処理を図5に示している。   Next, FIG. 4 and FIG. 5 show the basic operation of bitstream replacement in the present embodiment. FIG. 4 shows a situation where duplication of the main video and CM video occurs, and FIG. 5 shows the thinning and delay processing of the present invention for preventing such duplication.

ここで、間引および遅延処理を説明する前に、まず、切替前の本編映像の終了位置について説明しておくと、図4の例では、本編映像のビットストリーム102がPフレーム単位で終了しており、具体的にはP8で終了する。この理由は下記の通りである。TSの状態で本編映像をCM映像に差し替えようとする場合、通常は従来技術のようにGOP単位での切替えが行われる。しかしながら、GOPは通常0.5秒単位(15フレーム)で構成されているため、CM差替えのように開始時刻が重要な用途においてはタイミングを合わせることは難しい。このため、本発明では、GOP単位での制御ではなく、GOP内のPフレームを単位として差替前の映像を終了させ、次に差替後の映像をIフレームから開始させる構成としている。これにより、たとえば、GOPがIBBPBBPBBPBBPBBといった構成であれば、Pフレームが2フレームおきに現れるので、CMの開始タイミングの誤差は最大2フレーム以内に抑えることができる。   Before explaining the thinning and delay processing, first, the end position of the main video before switching will be described. In the example of FIG. 4, the bit stream 102 of the main video ends in units of P frames. Specifically, the process ends at P8. The reason is as follows. When replacing the main video with a CM video in the TS state, switching is usually performed in units of GOPs as in the prior art. However, since the GOP is normally configured in units of 0.5 seconds (15 frames), it is difficult to match the timing in applications where the start time is important, such as CM replacement. For this reason, the present invention is configured not to control in units of GOP but to end the video before replacement in units of P frames in the GOP and then start the video after replacement from the I frame. Thus, for example, if the GOP has a configuration such as IBBPBBPBBPBBPBB, since P frames appear every two frames, an error in the CM start timing can be suppressed to a maximum of two frames.

次に、切替部分でCM映像ビットストリーム202の処理を説明する。本実施の形態では、TSの状態でビットストリームを差し替えるため、本編映像のビットストリーム102とCM映像のビットストリーム202がその切替えの対象となるが、これをそのまま切り替えた場合、図4に符号301で示すように、本編映像のビットストリーム102の後端のフレームとCM映像のビットストリーム202の前端のフレームが時間的に重なってしまう場合がある。この場合、符号302で示すように、Iフレームが伝送されないためにCM開始位置から再生できなくなってしまう。   Next, processing of the CM video bitstream 202 at the switching part will be described. In this embodiment, since the bit stream is replaced in the TS state, the main video bit stream 102 and the CM video bit stream 202 are to be switched. When this is switched as it is, reference numeral 301 in FIG. As shown in FIG. 3, the rear end frame of the main video bit stream 102 and the front end frame of the CM video bit stream 202 may overlap in time. In this case, as indicated by reference numeral 302, since the I frame is not transmitted, it cannot be reproduced from the CM start position.

この対処としてはCM映像のビットストリーム202の開始時刻を送らせることが考えられるが、これを実施するとCM差替後の復号画像においてCM開始の時刻がずれることになり、CM編成の観点から好ましくない。   As a countermeasure, it is conceivable to send the start time of the bit stream 202 of the CM video. However, if this is performed, the CM start time is shifted in the decoded image after the CM replacement, which is preferable from the viewpoint of CM organization. Absent.

この問題を解決するため、本実施の形態では、図5に示すように、単にCM映像のビットストリーム202の前端のフレームにて、CM再生には不要なB1およびB2フレームをビットストリーム上で廃棄するとともに、I2フレームのビットストリーム上での時間軸方向の位置を直後のP5フレームの前に遅らせる。そして、上記の間引および遅延後のCM映像のビットストリームへと、図1の符号列スイッチ33にて切替えが行われて、差替済ビットストリームが得られる。図5では、符号401が、重なりを回避した状態でのCM差替時のビットストリームであり、符号402が、CM差替後の復号画像である。   In order to solve this problem, in this embodiment, as shown in FIG. 5, the B1 and B2 frames unnecessary for CM playback are discarded on the bitstream in the front end frame of the CM video bitstream 202. At the same time, the position in the time axis direction on the bit stream of the I2 frame is delayed before the immediately following P5 frame. Then, switching to the bit stream of the CM video after the decimation and delay is performed by the code string switch 33 in FIG. 1, and a replacement bit stream is obtained. In FIG. 5, reference numeral 401 denotes a bit stream at the time of CM replacement in a state where overlap is avoided, and reference numeral 402 denotes a decoded image after CM replacement.

上記のような処理により、本編映像のビットストリーム102の後端のフレームとCM映像のビットストリーム202の前端のフレームが時間的に重なることを防ぐことができ、スムースな画像切替えを実現することができる。   Through the processing as described above, the rear end frame of the main video bit stream 102 and the front end frame of the CM video bit stream 202 can be prevented from overlapping in time, and smooth image switching can be realized. it can.

また、上記の差替動作において、I2フレームのビットストリーム上での時間軸方向の位置を変更する際には、I2フレームにPCRが含まれる場合、その値についても時間軸方向に位置を変更した分だけ変更される。   In the above replacement operation, when the position in the time axis direction on the bit stream of the I2 frame is changed, when the PCR is included in the I2 frame, the value is also changed in the time axis direction. It is changed by minutes.

なお、上記の説明では、本編映像およびCM映像のビットストリームが本発明における第1および第2の系統のビットストリームに相当する場合を例として取り上げており、本編映像からCM映像への切替時に、CM映像のビットストリームの前端に間引と遅延が施され、この処理は図2の第2符号列間引部26および第2符号列遅延部28により行われる。これに対して、CM映像から本編映像への切替時にも本発明が適用されてよく、この場合には、図2の第1符号列間引部22および第1符号列遅延部24が、CM映像の後に切り替わる本編映像のビットストリームの前端に対して間引および遅延処理を行う。処理の詳細な内容は上述と同様である。このように本発明は本編映像からCM映像への切替えだけでなくCM映像から本編映像への切替えにも適用されてよい(以下、同じ)。   In the above description, the case where the bit stream of the main video and the CM video corresponds to the bit streams of the first and second systems in the present invention is taken as an example, and at the time of switching from the main video to the CM video, Thinning and delay are performed on the front end of the bit stream of the CM video, and this processing is performed by the second code string thinning unit 26 and the second code string delay unit 28 in FIG. On the other hand, the present invention may be applied when switching from the CM video to the main video. In this case, the first code stream thinning unit 22 and the first code stream delay unit 24 in FIG. Thinning and delay processing are performed on the front end of the bit stream of the main video that switches after the video. The detailed contents of the processing are the same as described above. As described above, the present invention may be applied not only to switching from the main video to the CM video but also to switching from the CM video to the main video (hereinafter the same).

次に、図6および図7を参照し、本実施の形態に係るビットストリーム差替装置の第2の動作例について説明する。ここでは、図2のPCR処理部34によるPCRパケット挿入の動作が説明される。また、図2のレート変換部32等によるレート変換の動作が説明される。   Next, a second operation example of the bitstream replacement device according to this embodiment will be described with reference to FIG. 6 and FIG. Here, the operation of inserting a PCR packet by the PCR processing unit 34 in FIG. 2 will be described. The rate conversion operation by the rate conversion unit 32 and the like in FIG. 2 will be described.

図6では、前出の図4との相違点として、本編映像のビットストリームの受信タイミングと本編映像の再生時刻との関係が、CM映像のビットストリーム情報の受信タイミングとCM期間の再生時刻との関係より相対的に遅くなっている。このことが図6においては横方向(時間軸方向)のずれ量で表されており、受信タイミングと再生時刻の横方向のずれが本編映像とCM映像で異なっており、本編映像の方が大きい。この違いは映像のMPEG2符号化時の設定の違いにより発生し、MPEG2規格内におけるバッファの範囲内であれば許容されるべきものである。   In FIG. 6, as a difference from FIG. 4 described above, the relationship between the reception timing of the main video bit stream and the playback time of the main video is the relationship between the reception timing of the CM video bit stream information and the playback time of the CM period. It is relatively slower than the relationship. This is represented in FIG. 6 by the amount of deviation in the horizontal direction (time axis direction), and the deviation in the horizontal direction of the reception timing and playback time differs between the main video and the CM video, and the main video is larger. . This difference occurs due to a difference in setting when MPEG2 video is encoded, and should be allowed within the buffer range in the MPEG2 standard.

この場合、図6に符号312で示すように、CM差替えの差替先端のフレームにおいては、CM差替後の復号画像において本編終了時のP8フレームとCM開始時のI2フレームを隣接させることは容易である。しかし、符号311を付して示すように、ビットストリーム情報で考えた場合には、本編終了時のB7フレームからCM開始時のI2フレームまでの間、TSの空白期間ができることになり、PCR(Program Clock Reference)パケットの到着間隔がMPEG規格で規定されている範囲から外れる場合が考えられ、受信機の動作上好ましくない。   In this case, as indicated by reference numeral 312 in FIG. 6, in the frame at the leading edge of the CM replacement, the P8 frame at the end of the main part and the I2 frame at the start of the CM are adjacent to each other in the decoded image after the CM replacement. Easy. However, as indicated by reference numeral 311, when considering bit stream information, a TS blank period is generated from the B7 frame at the end of the main part to the I2 frame at the start of CM, and PCR ( Program Clock Reference) The packet arrival interval may be out of the range defined by the MPEG standard, which is not preferable for the operation of the receiver.

また、CM差替えの差替後端においては、符号311に示すようにTS上でCMのパケット位置と本編のパケット位置の重なりを防ぐと、フレームを伝送できない期間が生じ、符号312に示すようにCM差替後の復号画像後端においてCM映像最後のP5フレームから本編開始時のI2フレームまでの間に空白ができることになり、この期間は受信機が不安定動作状態になり、受信機で異常な動作が起こる恐れがあり好ましくない。   Further, at the rear end of the CM replacement, as shown by reference numeral 311, if the overlap between the CM packet position and the main packet position on the TS is prevented, a period during which the frame cannot be transmitted occurs. At the rear end of the decoded image after CM replacement, a blank will be generated from the last P5 frame of the CM video to the I2 frame at the start of the main part. During this period, the receiver is in an unstable operation state, and the receiver is abnormal. This is not preferable because there is a risk that the operation will occur.

この対策のための本発明の処理が図7に示されている。本発明では、符号411で示すように、切替時のビットストリームの空白期間にPCRパケットを新たに作成し重畳させて、空白期間を無くす処理が行われる。PCRパケットはPCRのみの空情報であり、この処理は図2のPCR処理部34により行われる。これによりPCRの送出間隔の規格を遵守するとともに受信機の異常動作の発生を防ぐことができる。   The process of the present invention for this countermeasure is shown in FIG. In the present invention, as indicated by reference numeral 411, a process for eliminating a blank period is performed by newly creating and superimposing a PCR packet in a blank period of a bit stream at the time of switching. The PCR packet is empty information of only PCR, and this processing is performed by the PCR processing unit 34 in FIG. As a result, it is possible to comply with the standard of the PCR transmission interval and to prevent an abnormal operation of the receiver.

また、CM差替後の復号画像後端においてCM映像終了時フレームから本編開始時のフレームまでの間に空白ができることを防ぐため、符号411に示すようにレート変換部32等が動作してCM期間内においては通常の設定レートよりも高いレートでCM差替時にビットストリーム伝送することにより、CM映像のために所定のデータ伝送量を確保する。これにより、CM期間内にCMビットストリームを出し切ることができ、その結果受信機上にて符号412に示すようにB6、B7、P8フレームを表示させて、CM終了部分の空白発生を防ぐことが可能になる。それでもなおCM後端のP8フレームと本編前端のI2フレームとの間に再生画像の表示タイミングで空き(隙間)が生じる場合には、空フレーム付加部35が、図示のように、CM期間の後端に動きベクトルがゼロの空フレームを挿入することにより、受信機動作を安定させて、受信機の誤動作を防ぐ。このとき、必要であればPCRの送出間隔の規格を遵守するため、前述と同様にPCRパケットを新たに挿入する。   In addition, in order to prevent a blank from occurring at the rear end of the decoded image after CM replacement between the frame at the end of the CM video and the frame at the start of the main part, the rate conversion unit 32 and the like operate as shown by reference numeral 411. During the period, a predetermined data transmission amount is secured for the CM video by transmitting the bit stream at the time of CM replacement at a rate higher than the normal set rate. As a result, it is possible to complete the CM bit stream within the CM period, and as a result, B6, B7, and P8 frames are displayed on the receiver as indicated by reference numeral 412 to prevent the occurrence of blanks at the CM end portion. It becomes possible. If there is still a gap (gap) at the playback image display timing between the P8 frame at the rear end of the CM and the I2 frame at the front end of the main part, the empty frame adding section 35, as shown in FIG. Inserting an empty frame with zero motion vector at the end stabilizes the receiver operation and prevents malfunction of the receiver. At this time, if necessary, a PCR packet is newly inserted in the same manner as described above in order to comply with the standard of the PCR transmission interval.

次に、第1DI付加部23および第2DI付加部27によるTSパケットの挿入動作について説明する。   Next, an operation of inserting a TS packet by the first DI adding unit 23 and the second DI adding unit 27 will be described.

本実施の形態でも示しているとおり、一般にCM差替えを行う場合、その経済的重要性に鑑みシステムの冗長性を持たせることが行われる。このような構成では、系統を複数用意してそれらに同じ処理を行わせておき、ある系統に異常が発生したら他の系統に切り替えるというのが一般的な使い方である。この場合、系統を切り替えた際に受信機側でショックを生じないようにするには、各系統がクロックレベルで完全に同期され全く同じ信号が同時に出力されている必要があるが、完全な同期運転を実現しようとすると回路規模が大きくなることからシステムの価格が上昇するという問題があった。   As shown in the present embodiment, in general, when CM replacement is performed, system redundancy is provided in view of its economic importance. In such a configuration, it is a general usage to prepare a plurality of systems, cause them to perform the same processing, and switch to another system when an abnormality occurs in one system. In this case, in order to prevent shock at the receiver side when the system is switched, each system must be completely synchronized at the clock level and the same signal must be output at the same time. There is a problem that the price of the system increases because the circuit scale increases when the operation is realized.

上記のような回路規模の増大を回避可能にするために本実施の形態では下記のような処理が行われる。ここで、ビットストリームはTSパケット単位で時間軸方向に離散的に伝送されているため、TSパケットが伝送されていないタイミング、あるいはNULLパケットと呼ばれる無効パケットが伝送されているタイミングで系の切替えを実施し、かつ両系統がほぼ同じタイミングで信号を送出している場合には、受信機から見れば特に異常を検知できない。   In order to avoid an increase in circuit scale as described above, the following processing is performed in the present embodiment. Here, since the bit stream is discretely transmitted in the time axis direction in units of TS packets, the system is switched at the timing when TS packets are not transmitted or when invalid packets called NULL packets are transmitted. When the system is implemented and both systems transmit signals at almost the same timing, no abnormality can be detected from the viewpoint of the receiver.

そこで、本発明ではCM映像から本編映像に切り替える場合のその境界に、TSパケットにおけるAdaptation Field 領域に存在するdiscontinuity_indicatorの値を「1」に設定したTSパケットを挿入した後、引き続き本編映像ビットストリームをスルーさせて出力する構成とする。   Therefore, in the present invention, a TS packet in which the discontinuity_indicator value existing in the Adaptation Field area in the TS packet is set to “1” is inserted at the boundary when switching from the CM video to the main video, and then the main video bitstream is continued. The output is made through.

図8はCM差替時の両系のcontinuity_counter値について示したもので、符号501はCM映像期間から本編映像期間へ切り替わる際の通常の動作を示しており、符号502は、本発明におけるCM映像期間から本編映像期間へ切り替わる際の動作を示している。図中の1系、2系は、図1の2つの系統に相当する。   FIG. 8 shows the continuity_counter values of both systems at the time of CM replacement. Reference numeral 501 indicates a normal operation when switching from the CM video period to the main video period, and reference numeral 502 indicates the CM video in the present invention. The operation at the time of switching from the period to the main video period is shown. System 1 and system 2 in the figure correspond to the two systems in FIG.

図8の例では、符号501により示すように、CM映像期間にて1系と2系のcontinuity_counter値が合致していないため、引き続き出力される本編映像期間についてもcontinuity_counter値が1系と2系で合致していない。   In the example of FIG. 8, as indicated by reference numeral 501, the continuity_counter values of the 1st system and the 2nd system do not match in the CM video period. It does not agree with.

一方、本実施の形態の処理を表す符号502では、CM期間中に両系統のcontinuity_counter値がたとえずれていても、CMから本編に戻る際に一旦discontinuity_indicatorの値を「1」に設定したTSパケットを挿入してから元々本編に付与されていたcontinuity_counter値で引き続き本編TSを送出する。これにより、受信機に当該TSのcontinuity_counter値の不連続については規格上問題ないと認識させ、本編映像ビットストリーム中のcontinuity_counterの値を強制的に両系統で必ず同じ値にすることができ、その効果として系切替えを実施した際においても受信機側でのショックの発生を防ぐことができる。   On the other hand, with reference numeral 502 representing the processing of the present embodiment, even if the continuity_counter values of both systems are different during the CM period, the TS packet in which the discontinuity_indicator value is once set to “1” when returning from the CM to the main part. The main part TS is continuously transmitted with the continuity_counter value originally assigned to the main part since the insertion. This allows the receiver to recognize that the discontinuity of the continuity_counter value of the TS is not a problem in the standard, and the continuity_counter value in the main video bitstream can be forcibly set to the same value in both systems. As an effect, it is possible to prevent occurrence of a shock on the receiver side even when system switching is performed.

次に、PCR処理部34によるPCR値の書換処理について説明する。この書換処理は、上述のCM差替えを行う場合、本編期間とCM期間でPCR値の連続性を確保する必要があることにも注意し、このような要求に応えるものである。   Next, PCR value rewriting processing by the PCR processing unit 34 will be described. This rewriting process satisfies such a request by paying attention to the necessity of ensuring the continuity of the PCR value during the main period and the CM period when the above-described CM replacement is performed.

図9及び図10は、経過時刻とPCRのカウンター値との関係を示したものである。まず、図9を用いて、本実施の形態のPCR書換を行わない場合について説明する。本編期間とCM期間ではそれぞれ符号化する符号器が異なる場合が考えられるが、その場合には、本編期間(a)とCM期間(b)について、時間単位のPCR値の進度が異なることがある。グラフでは、PCR進度の相違が、本編期間(a)とCM期間(b)における直線の傾きの相違によって表される。次に、CM期間(b)から本編期間(c)に戻る際には、本編期間については入力されるTSをそのまま出力するため、グラフ上では本編期間(a)から同じ傾きでそのまま延長した位置で本編期間(c)に接続される。ところが、CM期間(b)についてはその傾きが異なるため、CM期間(b)から本編期間(c)へ切り替わるタイミングで、PCRの値が大きく異なることになる。このPCR値の変化は受信機側ではPCRジッタとして検出され、規格はずれ等の問題を引き起こす可能性がある。   FIG. 9 and FIG. 10 show the relationship between the elapsed time and the PCR counter value. First, a case where PCR rewriting according to the present embodiment is not performed will be described with reference to FIG. It is conceivable that the encoder to be encoded is different between the main period and the CM period. In this case, the progress of the PCR value in time units may be different between the main period (a) and the CM period (b). . In the graph, the difference in PCR progress is represented by the difference in the slope of the straight line in the main period (a) and the CM period (b). Next, when returning from the CM period (b) to the main period (c), the input TS is output as it is for the main period, and therefore the position extended from the main period (a) with the same inclination on the graph. Is connected to the main period (c). However, since the slope of the CM period (b) is different, the PCR value is greatly different at the timing of switching from the CM period (b) to the main period (c). This change in the PCR value is detected as PCR jitter on the receiver side, which may cause a problem such as a deviation from the standard.

これを防ぐため、本発明の一実施の形態では、図10のようにCM期間(b)最後のPCR値と、本編期間(c)の最初のPCR値が連続するように、本編期間(c)のPCRの値を書き換える。これにより、CM差替えを行ってもPCRジッタが発生せず、受信機動作を安定させたCM差替えを実現する。   In order to prevent this, in the embodiment of the present invention, as shown in FIG. 10, the main period (c) is such that the last PCR value in the CM period (b) and the first PCR value in the main period (c) are continuous. Rewrite the PCR value). As a result, even if CM replacement is performed, PCR jitter does not occur, and CM replacement with stable receiver operation is realized.

次に、本発明の異なる実施形態について図面を参照しながら詳細に説明する。
図11は、この発明に関わるビットストリーム差替装置の一つの実施の形態を示すブロック構成図である。図11では、図2と共通する部分の構成が適当に省略されている。また、図11では、図2の1系に関して本実施の形態の構成が示されている。2系においても同様の構成が設けられ、同様の処理が行われてよいことはもちろんである。
Next, different embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 11 is a block diagram showing an embodiment of a bitstream replacement device according to the present invention. In FIG. 11, the configuration of the parts common to FIG. 2 is appropriately omitted. In addition, FIG. 11 shows the configuration of the present embodiment with respect to the first system of FIG. Of course, a similar configuration is provided in the second system, and the same processing may be performed.

図11において、第1入力バッファ3、第1CM差替部4および第1出力バッファ5は上述の実施の形態と同様の構成であり、同様に動作する。すなわち、第1入力バッファ3は、MPEG2符号化方式によるトランスポートビットストリーム(以下、TS)を入力し一時的に蓄積させるための入力バッファであり、第1入力TS1(本編映像ビットストリーム)と第2入力TS2(CM映像ビットストリーム)を第1CM差替部4に入力する。そして、第1CM差替部4でビットストリームの差替が行われる。差替済ビットストリームは、第1出力バッファ5にて一時的に蓄積されてから、図2のTS切替器12(図11には示さず)を経て、出力TS13(差替後)として出力される。   In FIG. 11, the first input buffer 3, the first CM replacement unit 4, and the first output buffer 5 have the same configuration as the above-described embodiment and operate in the same manner. That is, the first input buffer 3 is an input buffer for receiving and temporarily storing a transport bit stream (hereinafter referred to as TS) according to the MPEG2 encoding method. The first input TS 1 (main video bit stream) and the first input buffer 3 Two-input TS2 (CM video bitstream) is input to the first CM replacement unit 4. The first CM replacement unit 4 replaces the bit stream. The replaced bit stream is temporarily stored in the first output buffer 5 and then output as the output TS 13 (after replacement) via the TS switch 12 (not shown in FIG. 11) in FIG. The

本実施の形態では、さらに、第1PCR進度算出部41、第1クロック制御部42、第2PCR進度算出部43および第2クロック制御部44が追加されている。   In the present embodiment, a first PCR progress calculation unit 41, a first clock control unit 42, a second PCR progress calculation unit 43, and a second clock control unit 44 are further added.

第1PCR進度算出部41は、第1入力TS1(本編)に含まれるPCRの進度を算出する。第1クロック制御部42は、第1PCR進度算出部41求められたPCR進度を元に本システムの基準クロックを制御する。第1入力バッファ3で第1入力TS1(本編映像ビットストリーム)を取り込む際に入力TSのパケットの到着時刻を抽出しておき、第1PCR進度算出部41にてPCRの値とパケットの到着時刻からPCR値の進度を算出する。そのPCRの進度が基準値(MPEG2規格では27MHz)と異なる場合、その差分を減らす方向に第1クロック制御部42の制御を行う。これにより、入力されるPCRの進度とシステムの内部クロックの進度を合致させることができ、PCR誤差を減らすことが可能になる。   The first PCR progress calculation unit 41 calculates the progress of the PCR included in the first input TS1 (main part). The first clock control unit 42 controls the reference clock of this system based on the PCR progress obtained by the first PCR progress calculation unit 41. When the first input buffer 3 captures the first input TS1 (main video bitstream), the arrival time of the packet of the input TS is extracted, and the first PCR progress calculation unit 41 calculates the PCR value and the arrival time of the packet. The progress of the PCR value is calculated. When the progress of the PCR is different from the reference value (27 MHz in the MPEG2 standard), the first clock control unit 42 is controlled to reduce the difference. As a result, the progress of the input PCR and the progress of the internal clock of the system can be matched, and the PCR error can be reduced.

第2PCR進度算出部43および第2クロック制御部44は、上記の第1PCR進度算出部41および第2クロック制御部44と同様の構成である。ただし、上記と異なり、同様の処理が第2入力TS6(CM映像ビットストリーム)に対して行われる。   The second PCR progress calculation unit 43 and the second clock control unit 44 have the same configuration as the first PCR progress calculation unit 41 and the second clock control unit 44 described above. However, unlike the above, the same processing is performed on the second input TS6 (CM video bitstream).

なお、上記で説明した実施形態では、2系統のストリーム入力を相互に切り替える場合について説明したが、1系統のストリーム入力に対して、予め用意しておいたファイル形式のストリームと差し替える場合にも本発明を適用可能であることはいうまでもない。この場合には、ファイル形式のストリームが、読み出され、処理されて、差替処理のビットストリームとして用いられる。   In the embodiment described above, the case where the two stream inputs are switched to each other has been described. However, when one stream input is replaced with a stream of a file format prepared in advance, the present embodiment is also applicable. It goes without saying that the invention is applicable. In this case, a file format stream is read and processed, and used as a bit stream for replacement processing.

例えば、CM映像がファイル形式のストリームであったとする。この場合、CMコンテンツ蓄積部が設けられ、このCMコンテンツ蓄積部が、CM差替部にて入力TSから差替えを行うCMコンテンツを蓄積してよい。そして、このコンテンツを読み出してCM差替部にてCMを差し替えるタイミングが、CM差替制御部により制御されてよい。   For example, it is assumed that the CM video is a file format stream. In this case, a CM content storage unit may be provided, and this CM content storage unit may store the CM content to be replaced from the input TS by the CM replacement unit. The timing at which this content is read and the CM is replaced by the CM replacement unit may be controlled by the CM replacement control unit.

また、符号列間引き部やDI付加部、符号列遅延器、符合列スイッチ、PCR処理部等、本実施の形態を構成する各部の処理順序については本実施の形態に限定されるものではなく、またそれぞれ個別にも適用可能である。   Further, the processing sequence of each part constituting this embodiment, such as a code stream thinning unit, DI adding unit, code sequence delay unit, code sequence switch, and PCR processing unit, is not limited to this embodiment. Each can also be applied individually.

以上に、本発明の実施の形態に係るビットストリーム差替装置について説明した。本実施の形態の例では、第1の系統のビットストリームが本編映像ビットストリームであり、第2の系統のビットストリームがCM映像のビットストリームであった。そして、本実施の形態によれば、第1の系統のビットストリームを第2の系統のビットストリームへ差し替える場合に、第2の系統のビットストリームに対し符号列の間引きが実施され、また、ビットストリーム中の所定の符号列の伝送タイミングを選択的に遅延させる処理が行われた。これにより、下記のようにスムースな画像切替を実現できる。   The bitstream replacement device according to the embodiment of the present invention has been described above. In the example of the present embodiment, the first system bit stream is a main video bit stream, and the second system bit stream is a CM video bit stream. According to the present embodiment, when the bit stream of the first system is replaced with the bit stream of the second system, the code string is thinned out from the bit stream of the second system, A process for selectively delaying the transmission timing of a predetermined code string in the stream was performed. Thereby, smooth image switching can be realized as described below.

すなわち、第1の系統のビットストリームと第2の系統のビットストリームを切り替える際に単純にGOPの単位にて切替えを実施した場合には、第1の系統のビットストリームの後端のフレームと第2の系統のビットストリームの前端のフレームが時間的に重なってしまうとする。このような場合であっても、第2の系統ビットストリームの前端にて、第2の系統のビットストリームの映像再生には不要な符号列を間引処理によってビットストリーム上で廃棄するとともに、間引きされていない符号列をビットストリーム上での時間軸方向の位置を遅らせる。これにより、第1の系統のビットストリームの後端のフレームと第2の系統のビットストリームの前端のフレームが時間的に重なることを避け、また、間引きによる時間軸方向の解像度低下も避けることができ、スムースな画像切替えを実現することができる。   That is, when switching between the first system bit stream and the second system bit stream is simply performed in units of GOPs, the rear end frame of the first system bit stream and the second system bit stream Assume that the frames at the front end of the two systems of bit streams overlap in time. Even in such a case, at the front end of the second system bitstream, a code string that is unnecessary for video reproduction of the second system bitstream is discarded on the bitstream by thinning-out processing. The position in the time axis direction on the bit stream of the code string that has not been processed is delayed. As a result, the rear end frame of the first system bit stream and the front end frame of the second system bit stream are prevented from overlapping in time, and resolution degradation in the time axis direction due to thinning is also avoided. Thus, smooth image switching can be realized.

また、本実施の形態によれば、第2の系統ビットストリームの前端のフレームにて、第2の系統のビットストリームの映像再生には不要なフレーム間双方向符号化によるフレームをビットストリーム上で廃棄するとともに、フレーム内符号化によるフレームのビットストリーム上での時間軸方向の位置を遅らせる。フレーム内符号化によるフレームは、上記の例では直後のフレーム間順方向予測符号化によるフレームの前に遅らせる。これにより、第1の系統のビットストリームの後端のフレームと第2の系統のビットストリームの前端のフレームが時間的に重なることを避け、スムースな画像切替えを実現することができる。   Further, according to the present embodiment, a frame by bidirectional inter-frame encoding that is unnecessary for video reproduction of the second system bit stream is displayed on the bit stream at the front end frame of the second system bit stream. While discarding, the position in the time axis direction on the bit stream of the frame by intra-frame coding is delayed. In the above example, the frame by intra-frame coding is delayed before the frame by the immediately following inter-frame forward predictive coding. Thereby, it is possible to avoid the temporally overlapping of the rear end frame of the first system bit stream and the front end frame of the second system bit stream, thereby realizing smooth image switching.

また、本実施の形態では、既に繰り返し述べたように、第1の系統のビットストリームが本編映像のビットストリームであり、第2の系統のビットストリームがCM映像のビットストリームであり、したがって、本編映像からCM映像へのスムースな画像切替えを実現できる。   In the present embodiment, as already described repeatedly, the first system bit stream is the main video bit stream, and the second system bit stream is the CM video bit stream. Smooth image switching from video to CM video can be realized.

また、本実施の形態では、上述したように、符号列間引手段で間引かれ空白となった期間にPCRパケットが付加される。これにより、MPEG規格におけるPCRパケットの到着間隔を遵守したビットストリームを提供できる。   Further, in the present embodiment, as described above, the PCR packet is added during the period when the code string thinning unit thins out and becomes blank. This makes it possible to provide a bit stream that complies with the arrival interval of PCR packets in the MPEG standard.

また、本実施の形態によれば、図10に示したように、第2の系統のビットストリームの後端のフレームのPCR値と、第1の系統のビットストリームのフレームのPCR値とが連続した値となるよう第1の系統のビットストリームの前端のフレーム以降のPCR値を書き換える。これ構成により、第2の系統のビットストリームの後端のフレームのPCR値と第1の系統のビットストリームの前端のフレームのPCR値にMPEG規格から逸脱するような大きな差がある場合、第2の系統のビットストリームの後端のフレームのPCR値と第1の系統のビットストリームの前端のフレームのPCR値が連続するように第1の系統のビットストリームの前端のフレーム以降のPCR値を書き換えることで、MPEG規格におけるPCRパケットのジッタ誤差を遵守したビットストリームを提供できる。   Further, according to the present embodiment, as shown in FIG. 10, the PCR value of the rear end frame of the second system bit stream and the PCR value of the frame of the first system bit stream are continuous. The PCR value after the front end frame of the first system bit stream is rewritten so as to be the value obtained. With this configuration, when there is a large difference between the PCR value of the rear end frame of the second system bit stream and the PCR value of the front end frame of the first system bit stream that deviates from the MPEG standard, The PCR values after the front end frame of the first system bit stream are rewritten so that the PCR value of the rear end frame of the first system bit stream and the PCR value of the front end frame of the first system bit stream are continuous. Thus, it is possible to provide a bit stream complying with the jitter error of the PCR packet in the MPEG standard.

また、本実施の形態によれば、上述のようにレート算出とレート変更が行われる。この構成により、第2の系統のビットストリーム期間内においては通常の設定レートよりも高いレートでビットストリーム伝送することにより、所定の期間内にビットストリームを出し切ることができ、その結果受信機上にてスムースな表示を実現することが可能になる。   Further, according to the present embodiment, rate calculation and rate change are performed as described above. With this configuration, the bit stream can be transmitted within a predetermined period by transmitting the bit stream at a rate higher than the normal setting rate within the bit stream period of the second system, and as a result, on the receiver. And smooth display can be realized.

また、本実施の形態によれば、上述したように、discontinuity_indicatorの値を「1」に設定したTSパケットを挿入するパケット挿入器(上記の例ではDI付加部)が設けられる。符号列間引手段の後段に第2の系統のビットストリームから第1の系統のビットストリームに切り替える場合のその境界に、TSパケットにおけるAdaptation Field 領域に存在するdiscontinuity_indicatorの値を「1」に設定したTSパケットを挿入した後、引き続き次のビットストリームをスルーさせる構成とすることで、複数系統のビットストリームの切替えの際に両系のcontinuity_counter値が常に同期した状態とすることができ、本編映像ビットストリーム中のcontinuity_counterの値を両系統で必ず同じ値にすることができる。これにより、システムの冗長化を考慮した際に複数系統の切替システムが存在する場合でも、両系統にてcontinuity_counterの値を同じ値にすることができ、複数系統の系切替えを実施した際においても受信機側での画像ショックの発生を防ぐことができるビットストリームを提供できる。   Further, according to the present embodiment, as described above, a packet inserter (DI adding unit in the above example) for inserting a TS packet in which the value of discontinuity_indicator is set to “1” is provided. The discontinuity_indicator value existing in the Adaptation Field area in the TS packet is set to “1” at the boundary when switching from the second system bit stream to the first system bit stream after the code string thinning means. By inserting the TS packet and continuing through the next bit stream, the continuity_counter value of both systems can always be synchronized when switching between multiple system bit streams. The continuity_counter value in the stream can always be the same value in both systems. This allows the continuity_counter value to be the same in both systems even when there are multiple system switching systems when considering system redundancy. It is possible to provide a bit stream that can prevent image shock on the receiver side.

また、本実施の形態によれば、MPEG2符号化方式によるトランスポートストリームに含まれるPCRの値の進度を算出し、PCR進度を元に本システムの基準クロックを制御する。PCRの進度が基準値に合致するようシステムの原発振器に対して制御が行われる。これにより、入力されるトランスポートストリームに含まれるPCRの進度とシステムの内部クロックの進度を合致させることができ、PCR誤差を減らすことが可能になる。   Further, according to the present embodiment, the progress of the PCR value included in the transport stream based on the MPEG2 encoding method is calculated, and the reference clock of the present system is controlled based on the PCR progress. Control is performed on the original oscillator of the system so that the progress of the PCR matches the reference value. As a result, the progress of the PCR included in the input transport stream and the progress of the internal clock of the system can be matched, and the PCR error can be reduced.

以上に本発明の好適な実施の形態を説明した。しかし、本発明は上述の実施の形態に限定されず、当業者が本発明の範囲内で上述の実施の形態を変形可能なことはもちろんである。   The preferred embodiments of the present invention have been described above. However, the present invention is not limited to the above-described embodiments, and it goes without saying that those skilled in the art can modify the above-described embodiments within the scope of the present invention.

以上のように、本発明にかかるビットストリーム差替装置は、複数系統のビットストリームの切替えをスムースに行えるという効果を有し、デジタル放送等のビットストリーム差替装置として有用である。   As described above, the bit stream replacement device according to the present invention has an effect of smoothly switching a plurality of bit streams, and is useful as a bit stream replacement device for digital broadcasting or the like.

本発明の実施の形態に係るビットストリーム差替装置の要部詳細構成を示すブロック構成図The block block diagram which shows the principal part detailed structure of the bit stream replacement apparatus which concerns on embodiment of this invention 本発明に実施の形態に係るビットストリーム差替装置の全体構成を示すブロック構成図The block block diagram which shows the whole structure of the bit stream replacement apparatus which concerns on embodiment of this invention 本実施の形態において差替えの対象になる本編映像とCM映像のビットストリームを示す図The figure which shows the bit stream of the main image image | video and CM image | video used as replacement object in this Embodiment CM差替時に重なりが発生する例を示すタイミングチャートTiming chart showing an example where overlap occurs during CM replacement 本実施の形態における間引および遅延処理を行うCM差替処理を示すタイミングチャートTiming chart showing CM replacement processing for performing decimation and delay processing in the present embodiment CM差替時に空白期間が生じる例を示すタイミングチャートTiming chart showing an example where a blank period occurs during CM replacement 本実施の形態におけるパケット付加およびレート変更を行うCM差替処理を示すタイミングチャートTiming chart showing CM replacement processing for performing packet addition and rate change in the present embodiment 本実施の形態における本編映像とCM映像を差し替える際の2系統の同期方法を説明するためのタイミングチャートTiming chart for explaining a two-system synchronization method when replacing the main video and CM video in the present embodiment 本編映像とCM映像の差替制御におけるPCRのジッタを説明する図The figure explaining the jitter of PCR in the replacement control of the main video and CM video 本編映像とCM映像の差替制御におけるジッタ解消のためのPCR書換え処理を説明する図The figure explaining the PCR rewriting process for the jitter elimination in the replacement control of the main video and the CM video 本発明の別の実施の形態に係るビットストリーム差替装置を示すブロック構成図The block block diagram which shows the bit stream replacement apparatus which concerns on another embodiment of this invention.

符号の説明Explanation of symbols

1 第1入力TS
2 第1TS分配器
3 第1入力バッファ
4 第1CM差替部
5 第1出力バッファ
6 第2入力TS
7 第2TS分配器
8 第2入力バッファ
9 第2CM差替部
10 第2出力バッファ
11 CM差替タイミング情報
12 TS切替器
13 出力TS
21 本編映像ビットストリーム
22 第1符号列間引部
23 第1DI付加部
24 第1符号列遅延部
25 CM映像ビットストリーム
26 第2符号列間引部
27 第2DI付加部
28 第2符号列遅延部
29 CM差替制御部
30 VBVバッファ比較部
31 レート算出部
32 レート変換部
33 符号列スイッチ
34 PCR処理部
35 空フレーム付加部
36 差替済ビットストリーム
1 First input TS
2 1st TS distributor 3 1st input buffer 4 1st CM replacement part 5 1st output buffer 6 2nd input TS
7 Second TS distributor 8 Second input buffer 9 Second CM replacement unit 10 Second output buffer 11 CM replacement timing information 12 TS switcher 13 Output TS
21 Main Video Bitstream 22 First Code String Decimation Unit 23 First DI Addition Unit 24 First Code String Delay Unit 25 CM Video Bitstream 26 Second Code String Decimation Unit 27 Second DI Addition Unit 28 Second Code String Delay Unit 29 CM replacement control unit 30 VBV buffer comparison unit 31 Rate calculation unit 32 Rate conversion unit 33 Code string switch 34 PCR processing unit 35 Empty frame addition unit 36 Replaced bit stream

Claims (9)

少なくとも2系統のビットストリームが入力され、そのうちのいずれかを切り替えて選択的に出力することにより、第1の系統のビットストリームを第2の系統のビットストリームへ差し替えるビットストリーム差替装置であって、
前記第2の系統のビットストリームに対し間引制御情報に応じて符号列の間引きを実施する符号列間引手段と、
前記符号列間引手段の出力に対し遅延制御情報に応じてビットストリーム中の所定の符号列の伝送タイミングを選択的に遅延させる符号列遅延手段とを有していることを特徴とするビットストリーム差替装置。
A bit stream replacement device that replaces a first system bit stream with a second system bit stream by inputting at least two systems of bit streams and selectively outputting one of them. ,
Code string decimation means for performing code string decimation on the bit stream of the second system according to decimation control information;
And a bit stream delay means for selectively delaying transmission timing of a predetermined code string in the bit stream according to delay control information with respect to the output of the code string thinning means Replacement device.
前記ビットストリームの差替タイミング情報に応じて前記間引制御情報および前記遅延制御情報を生成して前記符号列間引手段および前記符号列遅延手段にそれぞれ供給する差替制御部を有し、前記差替制御部は、前記間引制御情報として、前記第2の系統のビットストリームの前端部分におけるフレーム間双方向予測符号化によるフレームの符号列を間引く制御情報を供給し、前記遅延制御情報として、前記第2の系統のビットストリームの前端部分におけるフレーム内符号化によるフレームの符号列を遅延させる制御情報を供給することを特徴とする請求項1に記載のビットストリーム差替装置。   A replacement control unit that generates the decimation control information and the delay control information according to the replacement timing information of the bitstream and supplies the decimation control information and the delay control information to the code string decimation means and the code string delay means, respectively, The replacement control unit supplies, as the decimation control information, control information for decimation of a code string of a frame by inter-frame bi-directional predictive coding at the front end portion of the second system bit stream, and as the delay control information 2. The bit stream replacement device according to claim 1, wherein control information for delaying a code string of a frame by intra-frame coding at a front end portion of the bit stream of the second system is supplied. 前記第1の系統のビットストリームが本編映像のビットストリームであり、前記第2の系統のビットストリームがCM映像のビットストリームであることを特徴とする請求項1または2に記載のビットストリーム差替装置。   3. The bit stream replacement according to claim 1, wherein the first system bit stream is a main video bit stream, and the second system bit stream is a CM video bit stream. apparatus. 前記符号列遅延手段の後段に設けられたビットストリーム切替手段と、前記ビットストリーム切替手段の後段に設けられたPCR処理部とを具備し、前記PCR処理部は、前記符号列間引手段で間引かれ空白となった期間にPCRパケットを付加することを特徴とする請求項1ないし3のいずれかに記載のビットストリーム差替装置。   A bit stream switching means provided at a subsequent stage of the code string delay means, and a PCR processing section provided at a subsequent stage of the bit stream switching means, wherein the PCR processing section 4. The bit stream replacement device according to claim 1, wherein a PCR packet is added during a period when the space is drawn and left blank. 前記符号列遅延手段の後段に設けられたビットストリーム切替手段と、前記ビットストリーム切替手段の後段に設けられたPCR処理部とを具備し、前記PCR処理部は、前記第2の系統のビットストリームの後端のフレームのPCR値と、その後に続く前記第1の系統のビットストリームの前端のフレームのPCR値とが連続した値となるよう前記第1の系統のビットストリームの前端のフレーム以降のPCR値を書き換えることを特徴とする請求項1ないし3のいずれかに記載のビットストリーム差替装置。   A bit stream switching unit provided at a subsequent stage of the code string delay unit; and a PCR processing unit provided at a subsequent stage of the bit stream switching unit, wherein the PCR processing unit includes the bit stream of the second system And the subsequent frame of the first stream of the first stream so that the PCR value of the frame of the first stream and the PCR of the frame of the first stream of the first stream of the first stream that follows are consecutive values. 4. The bit stream replacement device according to claim 1, wherein the PCR value is rewritten. 前記第1の系統のビットストリームと前記第2の系統のビットストリーム両者のバッファ充足度であるVBVバッファ量を計測比較するVBVバッファ比較部と、前記VBVバッファ比較部の出力により制御されるレート算出手段と、前記レート算出手段出力により制御され、前記第2の系統のビットストリームに対しレート変更を行うレート変更手段とを具備することを特徴とする請求項1ないし5のいずれかに記載のビットストリーム差替装置。   A VBV buffer comparison unit that measures and compares the VBV buffer amount, which is a buffer fullness of both the first system bit stream and the second system bit stream, and a rate calculation that is controlled by the output of the VBV buffer comparison unit 6. The bit according to claim 1, further comprising a rate changing unit that is controlled by the output of the rate calculating unit and changes the rate of the bit stream of the second system. Stream replacement device. 前記符号列間引手段の後段に設けられ、前記第2の系統のビットストリームの後端にて前記第1の系統のビットストリームに切り替わる境界に、TSパケットにおけるAdaptation Field 領域に存在するdiscontinuity_indicatorの値を「1」に設定したTSパケットを挿入するパケット挿入器を有することを特徴とする請求項1ないし6のいずれかに記載のビットストリーム差替装置。   The discontinuity_indicator value provided in the Adaptation Field area in the TS packet at the boundary where the bit stream of the second system is switched to the first system bit stream at the rear end of the second system bit stream. 7. The bit stream replacement device according to claim 1, further comprising a packet inserter that inserts a TS packet in which is set to “1”. 入力ビットストリームに含まれるPCRの値の進度を算出するPCR進度算出手段と、前記PCR進度算出手段にて求められたPCR進度を入力として別途用意された基準クロックの制御を行うクロック制御部とを具備し、前記PCR進度算出手段は入力ビットストリームに含まれるPCRの値と入力ビットストリームのパケットの到着時刻からPCR値の進度を算出し、そのPCRの進度が別途定められた基準値に合致するように前記クロック制御部が基準クロックを制御することを特徴とする請求項1ないし7のいずれかに記載のビットストリーム差替装置。   PCR progress calculating means for calculating the progress of the value of PCR included in the input bitstream, and a clock control section for controlling a reference clock prepared separately using the PCR progress obtained by the PCR progress calculating means as an input The PCR progress calculation means calculates the progress of the PCR value from the PCR value included in the input bitstream and the arrival time of the packet of the input bitstream, and the progress of the PCR matches a separately determined reference value. The bit stream replacement device according to claim 1, wherein the clock control unit controls a reference clock. 少なくとも2系統のビットストリームが入力され、そのうちのいずれかを切り替えて選択的に出力することにより、第1の系統のビットストリームを第2の系統のビットストリームへ差し替えるビットストリーム差替方法であって、
前記第2の系統のビットストリームに対し間引制御情報に応じて符号列の間引きを実施し、間引処理が行われた前記ビットストリームに対し遅延制御情報に応じてビットストリーム中の所定の符号列の伝送タイミングを選択的に遅延させることを特徴とするビットストリーム差替方法。
A bitstream replacement method for replacing a first system bitstream with a second system bitstream by inputting at least two systems of bitstreams and selectively outputting one of them. ,
The code stream is thinned out according to the thinning-out control information for the bit stream of the second system, and the predetermined code in the bit stream is turned out according to the delay control information for the bit stream subjected to the thinning-out A bitstream replacement method characterized by selectively delaying the transmission timing of a column.
JP2007117267A 2007-04-26 2007-04-26 Bitstream replacing device Pending JP2008278012A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007117267A JP2008278012A (en) 2007-04-26 2007-04-26 Bitstream replacing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007117267A JP2008278012A (en) 2007-04-26 2007-04-26 Bitstream replacing device

Publications (1)

Publication Number Publication Date
JP2008278012A true JP2008278012A (en) 2008-11-13

Family

ID=40055480

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007117267A Pending JP2008278012A (en) 2007-04-26 2007-04-26 Bitstream replacing device

Country Status (1)

Country Link
JP (1) JP2008278012A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1066085A (en) * 1996-08-14 1998-03-06 Sony Corp Image processing unit, image processing method and recording medium
JP2001223656A (en) * 2000-02-08 2001-08-17 Matsushita Electric Ind Co Ltd Multiplex transmitter
JP2001285868A (en) * 2000-03-29 2001-10-12 Victor Co Of Japan Ltd Device and method for changing-over animation code string
JP2003018547A (en) * 2001-07-05 2003-01-17 Matsushita Electric Ind Co Ltd Video stream transmitting method, scene change point detecting method and decode instruction displaying apparatus
JP2003061088A (en) * 2001-08-08 2003-02-28 Nec Corp Data-demultiplexing/decoding device
JP2003163898A (en) * 2001-11-26 2003-06-06 Sony Corp Signal processor and signal processing method, recording medium, and program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1066085A (en) * 1996-08-14 1998-03-06 Sony Corp Image processing unit, image processing method and recording medium
JP2001223656A (en) * 2000-02-08 2001-08-17 Matsushita Electric Ind Co Ltd Multiplex transmitter
JP2001285868A (en) * 2000-03-29 2001-10-12 Victor Co Of Japan Ltd Device and method for changing-over animation code string
JP2003018547A (en) * 2001-07-05 2003-01-17 Matsushita Electric Ind Co Ltd Video stream transmitting method, scene change point detecting method and decode instruction displaying apparatus
JP2003061088A (en) * 2001-08-08 2003-02-28 Nec Corp Data-demultiplexing/decoding device
JP2003163898A (en) * 2001-11-26 2003-06-06 Sony Corp Signal processor and signal processing method, recording medium, and program

Similar Documents

Publication Publication Date Title
EP0923243B1 (en) Editing device, editing method, splicing device, splicing method, encoding device, and encoding method
JP5489675B2 (en) Video information playback method and system, and video information content
JP5209154B2 (en) Digital video decoding system, method for sequentially displaying a plurality of video programs and method for predicting the next channel selected by a user
GB2328099A (en) Processing coded video particularly MPEG format video
EP2713620B1 (en) Video decoding apparatus
US8170401B2 (en) Optimizing ad insertion by removing low information frames
US20140375889A1 (en) Method, apparatus, and system for switching transport stream
JP4659179B2 (en) MPEG stream switching method
EP2580917B1 (en) Receiver and method at the receiver for enabling channel change with a single decoder
JP6102332B2 (en) Video stream switching system, video stream switching method and program
JP4987034B2 (en) Video display device
JP6399189B2 (en) Video coding method
JP3350365B2 (en) Video synchronization signal correction device
WO2011155099A1 (en) Image display device
JP2008278012A (en) Bitstream replacing device
JP2004350237A (en) Stream transfer apparatus, stream transfer method, stream transfer program, and display time correcting apparatus
JP2002094938A (en) Data processing method and system, data transmission system, transmission medium
JP3671969B2 (en) Data multiplexing method and multiple data decoding method
JPH099215A (en) Data multiplex method, data transmission method, multiplex data decoding method and multiplex data decoder
JP6229758B2 (en) Video coding method
JP6202141B2 (en) Video encoding / decoding system
JP6202140B2 (en) Video encoding device
JP6229759B2 (en) Video decoding method
JP2003284069A (en) Method and apparatus for decoding multiple data

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100325

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110419

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110426

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20110823