JP2008054159A - Video-audio multiplexing apparatus - Google Patents
Video-audio multiplexing apparatus Download PDFInfo
- Publication number
- JP2008054159A JP2008054159A JP2006230099A JP2006230099A JP2008054159A JP 2008054159 A JP2008054159 A JP 2008054159A JP 2006230099 A JP2006230099 A JP 2006230099A JP 2006230099 A JP2006230099 A JP 2006230099A JP 2008054159 A JP2008054159 A JP 2008054159A
- Authority
- JP
- Japan
- Prior art keywords
- video
- audio
- encoding
- data
- time
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/434—Disassembling of a multiplex stream, e.g. demultiplexing audio and video streams, extraction of additional data from a video stream; Remultiplexing of multiplex streams; Extraction or processing of SI; Disassembling of packetised elementary stream
- H04N21/4341—Demultiplexing of audio and video streams
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/236—Assembling of a multiplex stream, e.g. transport stream, by combining a video stream with other content or additional data, e.g. inserting a URL [Uniform Resource Locator] into a video stream, multiplexing software data into a video stream; Remultiplexing of multiplex streams; Insertion of stuffing bits into the multiplex stream, e.g. to obtain a constant bit-rate; Assembling of a packetised elementary stream
- H04N21/2368—Multiplexing of audio and video streams
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Time-Division Multiplex Systems (AREA)
Abstract
Description
本発明は、映像データと音声データとの符号化、及び符号化した映像データと符号化した音声データとの多重化を行なう映像音声多重化装置に関するものである。 The present invention relates to a video / audio multiplexing apparatus for encoding video data and audio data, and multiplexing encoded video data and encoded audio data.
近年、情報のデジタル化が進んでおり、映像や音声など信号もデジタル化され利用されている。映像と音声などのデジタルデータ間には関連性が存在するため、一つのストリームデータとして多重化されるのが一般的である。 In recent years, information has been digitized, and signals such as video and audio have been digitized and used. Since there is a relationship between digital data such as video and audio, it is generally multiplexed as one stream data.
映像と音声などのデジタルデータの保存や伝送などの用途では、国際標準規格で定められた多重化の規格があり、その一例として、MPEG(Moving Pictures Experts Group)と呼ばれる国際標準規格で定められたProgramStream(以降、PSと略記する)やTransportStream(以降、TSと略記する)などが存在する。 In applications such as storage and transmission of digital data such as video and audio, there are multiplexing standards defined by international standards. For example, MPEG (Moving Pictures Experts Group) is defined by an international standard called MPEG (Moving Pictures Experts Group). There are ProgramStream (hereinafter abbreviated as PS), TransportStream (hereinafter abbreviated as TS), and the like.
PSやTSは、多重化する映像データと音声データに時間的な相関関係が存在する場合には、映像データと音声データにPTSと呼ばれる再生時間情報を付加することで多重化データの分離後に、時間的な相関関係を復元することができる仕組みを有している。 When there is a temporal correlation between video data and audio data to be multiplexed, PS and TS add reproduction time information called PTS to the video data and audio data to separate the multiplexed data. It has a mechanism that can restore temporal correlation.
また、デジタル化された映像データや音声データは、非常に情報量が多く、そのままで保存や伝送などの用途で扱うのには向いていない。多重化される前の段階で情報量を減少させるためには、MPEG2などの符号化の規格に従い、映像データや音声データを符号化する処理が行われる。映像データは、一般的にサンプル期間毎の静止画データの集合(ビデオフレーム)であり、映像データを符号化する場合、ビデオフレーム単位で符号化が行われる。一方、音声データは、一般的にサンプル期間毎の音の強弱データの集合であるが、サンプル期間が非常に短いため、音声データを符号化する場合は、サンプル期間よりも大きいある一定期間のデータの集合(オーディオフレーム)として音声データを扱い、オーディオフレーム単位で符号化が行われる。 Also, digitized video data and audio data have a very large amount of information and are not suitable for use in storage or transmission as they are. In order to reduce the amount of information at the stage before multiplexing, processing for encoding video data and audio data is performed in accordance with an encoding standard such as MPEG2. Video data is generally a set of still image data (video frames) for each sample period. When video data is encoded, encoding is performed in units of video frames. On the other hand, audio data is generally a collection of sound intensity data for each sample period. However, since the sample period is very short, when audio data is encoded, data for a certain period larger than the sample period is used. The audio data is handled as a set (audio frame) of the above, and encoding is performed in units of audio frames.
例えば、MPEG2規格のTSを出力する映像音声多重化装置では、入力された映像データと音声データとを順次符号化して、生成したTSを所定の出力レート、及び出力タイミングで送信するものがある(例えば、特許文献1を参照)。 For example, a video / audio multiplexing apparatus that outputs MPEG-2 standard TS sequentially encodes input video data and audio data and transmits the generated TS at a predetermined output rate and output timing ( For example, see Patent Document 1).
また、映像音声多重化装置には、符号化の一時停止が可能なものがある。このような装置の一例としては、一時停止指示を受付けると映像信号を入手するタイミングに同期させて映像信号と音声信号の入手を同時に一時停止し、以後、各符号化、多重化、記録をそれぞれのタイミングで一時停止するものが知られている(例えば、特許文献2を参照)。
デジタル化された映像データや音声データの利用拡大に伴い、映像データの高画質化や音声データの高音質化への要望は必然の流れである。それに伴って、符号化される映像データや音声データに対し、符号化処理の前段階として高画質化処理や高音質化処理が行なわれる場合がある。 With the expansion of use of digitized video data and audio data, there is an inevitable demand for higher image quality of video data and higher sound quality of audio data. Along with this, image quality improvement processing and sound quality improvement processing may be performed on the encoded video data and audio data as a pre-stage of the encoding processing.
映像データに対する高画質化処理と、音声データに対する高音質化処理とでは、処理時間が異なる場合がほとんどである。また、処理内容によっても処理時間が変化する。そのため、映像データの高画質化や音声データの高音質化により、映像音声多重化装置への映像データと音声データの入力タイミングに時間差が発生してしまう可能性がある。 In most cases, the processing time differs between the image quality enhancement processing for video data and the sound quality enhancement processing for audio data. Also, the processing time varies depending on the processing content. For this reason, there is a possibility that a time difference occurs between the input timing of the video data and the audio data to the video / audio multiplexing device due to the high image quality of the video data and the high quality of the audio data.
しかしながら、従来の映像音声多重化装置は、映像データと音声データとが同時に入力されることを前提に、符号化等の処理を行なっているので、映像データと音声データとの入力タイミングに時間差があると、正しい再生時間情報を付加できず、再生時に映像と音声とがずれてしまい、その結果、視聴者に違和感を与えるおそれがある。 However, since the conventional video / audio multiplexing apparatus performs processing such as encoding on the assumption that video data and audio data are input simultaneously, there is a time difference in the input timing of the video data and audio data. If so, the correct playback time information cannot be added, and the video and audio are shifted during playback, and as a result, the viewer may feel uncomfortable.
本発明は上記の問題に着目してなされたものであり、映像データと音声データの入力タイミングにずれがあっても、再生時に、映像と音声とがずれない多重化ストリームを生成できる映像音声多重化装置を提供することを目的としている。 The present invention has been made paying attention to the above-mentioned problem. Even if there is a difference in the input timing between the video data and the audio data, the video / audio multiplexing capable of generating a multiplexed stream in which the video and the audio do not shift at the time of reproduction. An object is to provide a device.
前記の課題を解決するため、本発明では、映像データの符号化開始タイミングと、音声データの符号化開始タイミングとを、映像データと音声データの入力タイミングのずれ量に応じて調整するようにした。 In order to solve the above problems, in the present invention, the encoding start timing of video data and the encoding start timing of audio data are adjusted according to the amount of deviation between the input timing of video data and audio data. .
本発明の一態様は、
時間的な相関関係を有する映像データと音声データとが入力され、前記映像データを符号化した符号化映像データと前記音声データを符号化した符号化音声データとを生成し、前記符号化映像データと前記符号化音声データとを多重化して1つの多重化ストリームを生成する映像音声多重化装置であって、
前記映像データをビデオフレーム単位で符号化して、前記符号化映像データを生成するビデオ符号化部と、
前記音声データをオーディオフレーム単位で符号化して、前記符号化音声データを生成するオーディオ符号化部と、
前記映像データと前記音声データとの入力タイミングのずれ時間を示す入力時間差情報が入力されており、前記映像データのビデオフレーム境界の検出タイミングで、前記ビデオ符号化部が符号化を開始するように制御するとともに、前記ビデオ符号化部の符号化開始タイミングを基準に、前記入力時間差情報が示す時間だけずれたタイミングで、前記オーディオ符号化部が符号化を開始するように制御する動作制御部と、
を備えたことを特徴とする。
One embodiment of the present invention provides:
Video data and audio data having temporal correlation are inputted, and encoded video data obtained by encoding the video data and encoded audio data encoded by the audio data are generated, and the encoded video data And an audio / video multiplexing apparatus that multiplexes the encoded audio data and generates one multiplexed stream,
A video encoding unit that encodes the video data in units of video frames and generates the encoded video data;
An audio encoding unit that encodes the audio data in units of audio frames and generates the encoded audio data;
Input time difference information indicating a time difference between input timings of the video data and the audio data is input, and the video encoding unit starts encoding at a detection timing of a video frame boundary of the video data. And an operation control unit that controls the audio encoding unit to start encoding at a timing shifted by a time indicated by the input time difference information with reference to an encoding start timing of the video encoding unit. ,
It is provided with.
また、本発明の一態様は、
時間的な相関関係を有する映像データと音声データとが入力され、前記映像データを符号化した符号化映像データと前記音声データを符号化した符号化音声データとを生成し、前記符号化映像データと前記符号化音声データとを多重化して1つの多重化ストリームを生成する映像音声多重化装置であって、
前記映像データをビデオフレーム単位で符号化して、前記符号化映像データを生成するビデオ符号化部と、
前記音声データをオーディオフレーム単位で符号化して、前記符号化音声データを生成するオーディオ符号化部と、
前記映像データと前記音声データとの入力タイミングのずれ時間を示す入力時間差情報が入力されており、前記映像データのビデオフレーム境界の検出タイミングで、前記ビデオ符号化部が符号化を開始するように制御するとともに、前記ビデオ符号化部の符号化開始タイミングを基準に、ビデオフレーム期間単位の時間だけずれたタイミングで、前記オーディオ符号化部が符号化を開始するように制御し、さらに、前記ビデオ符号化部と前記オーディオ符号化部の符号化開始タイミングのずれ時間と、前記入力時間差情報との差を示す時間差分情報を出力する動作制御部と、
前記時間差分情報が示す時間差に応じた再生時間情報を付加して、前記符号化映像データと前記符号化音声データとを多重化する多重化部と、
を備えたことを特徴とする。
One embodiment of the present invention includes
Video data and audio data having temporal correlation are inputted, and encoded video data obtained by encoding the video data and encoded audio data encoded by the audio data are generated, and the encoded video data And an audio / video multiplexing apparatus that multiplexes the encoded audio data and generates one multiplexed stream,
A video encoding unit that encodes the video data in units of video frames and generates the encoded video data;
An audio encoding unit that encodes the audio data in units of audio frames and generates the encoded audio data;
Input time difference information indicating a time difference between input timings of the video data and the audio data is input, and the video encoding unit starts encoding at a detection timing of a video frame boundary of the video data. And controlling the audio encoding unit to start encoding at a timing shifted by a time of a video frame period with reference to the encoding start timing of the video encoding unit, and further, An operation control unit for outputting time difference information indicating a difference between a coding start timing shift time of the encoding unit and the audio encoding unit and the input time difference information;
A multiplexing unit for adding reproduction time information corresponding to the time difference indicated by the time difference information and multiplexing the encoded video data and the encoded audio data;
It is provided with.
本発明によれば、映像データの符号化開始タイミングと、音声データの符号化開始タイミングとが、映像データと音声データの入力タイミングのずれ量に応じて調整されるので、映像データと音声データの入力タイミングにずれがあっても、再生時に、映像と音声とがずれない多重化ストリームを生成できる。 According to the present invention, the encoding start timing of the video data and the encoding start timing of the audio data are adjusted according to the shift amount of the input timing of the video data and the audio data. Even if there is a difference in input timing, it is possible to generate a multiplexed stream in which video and audio do not shift during playback.
以下、本発明の実施形態について図面を参照しながら説明する。なお、以下の各実施形態の説明において、一度説明した構成要素と同様の機能を有する構成要素については、同一の符号を付して説明を省略する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the following description of each embodiment, components having the same functions as those described once are given the same reference numerals and description thereof is omitted.
《発明の実施形態1》
図1は、本発明の実施形態1に係る映像音声多重化装置100の構成を示すブロック図である。映像音声多重化装置100は、入力された映像データ(映像データSIG101)と音声データ(音声データSIG102)とをそれぞれ符号化して、符号化した映像データ(符号化映像データSIG105)と符号化した音声データ(符号化音声データSIG106)とを多重化して1つのストリーム(多重化ストリームSIG107)にする装置である。
FIG. 1 is a block diagram showing a configuration of a video /
[映像音声多重化装置100の構成]
映像音声多重化装置100は、図1に示すように、検出部101、時刻計測部102、ビデオ符号化部103、オーディオ符号化部104、動作制御部105、映像データ用バッファ106、音声データ用バッファ107、及び多重化部108を備えている。
[Configuration of Video / Audio Multiplexer 100]
As shown in FIG. 1, the video /
(検出部101)
検出部101は、映像データSIG101からビデオフレーム境界を検出し、ビデオフレーム境界情報SIG112によって、ビデオフレーム境界の検出を、動作制御部105に通知するようになっている。
(Detector 101)
The
(時刻計測部102)
時刻計測部102は、時刻情報(時刻情報SIG116)を動作制御部105に通知するようになっている。
(Time measuring unit 102)
The
(ビデオ符号化部103)
ビデオ符号化部103は、符号化の開始と一時停止を制御する映像符号化制御情報SIG113が入力されており、映像符号化制御情報SIG113に応じて、映像データSIG101を符号化して符号化映像データSIG103を生成し、映像データ用バッファ106に出力するようになっている。また、ビデオ符号化部103は、1ビデオフレーム分の符号化が完了する毎に、符号化映像データSIG103のビデオフレーム情報(ビデオフレーム情報SIG108)を多重化部108に通知する。ビデオフレーム情報SIG108は、符号化映像データSIG103のサイズの情報や、例えば符号化映像データSIG103がMPEG形式のデータであれば、多重化の際の順番情報を含んでいる。
(Video encoding unit 103)
The
(オーディオ符号化部104)
オーディオ符号化部104は、符号化の開始と一時停止を制御する音声符号化制御情報SIG114が入力されており、音声符号化制御情報SIG114応じて、音声データSIG102を符号化して符号化音声データSIG104を生成し、音声データ用バッファ107に出力するようになっている。また、オーディオ符号化部104は、1オーディオフレーム分の符号化が完了する毎に、符号化音声データSIG104のオーディオフレーム情報(オーディオフレーム情報SIG109)を多重化部108に通知する。オーディオフレーム情報SIG109は、符号化音声データSIG104のサイズの情報を含んでいる。
(Audio encoding unit 104)
The
(動作制御部105)
動作制御部105は、符号化の開始と一時停止を制御する情報を含んだ制御情報SIG110が入力されており、制御情報SIG110に応じて、ビデオ符号化部103、オーディオ符号化部104、及び多重化部108の動作を制御するようになっている。この制御は、音声データSIG102及び映像データSIG101のうち、何れの入力が遅れるかによって異なっている。
(Operation control unit 105)
The
音声データSIG102が映像データSIG101よりも遅れて入力される場合には、動作制御部105は、以下のように、符号化及び多重化の開始及び一時停止を制御する。
When the audio data SIG102 is input later than the video data SIG101, the
動作制御部105は、符号化開始を指示する制御情報SIG110が入力されると、多重化開始を指示する多重化制御情報SIG115を多重化部108に出力して、多重化部108に動作を開始させる。
When the control information SIG110 instructing the start of encoding is input, the
そして、動作制御部105は、符号化する最初のビデオフレームのビデオフレーム境界情報SIG112が入力されたタイミング(映像データ符号化開始時刻)で、符号化開始を指示する映像符号化制御情報SIG113を出力して、ビデオ符号化部103に符号化動作を開始させる。
Then, the
また、動作制御部105は、映像データSIG101と音声データSIG102との入力時間差を示す入力時間差情報SIG111が入力されており、映像データ符号化開始時刻から、入力時間差情報SIG111が示す入力時間差だけ遅れたタイミングを、時刻情報SIG116に基づいて検出し、検出したタイミングで、音声符号化制御情報SIG114を出力して、オーディオ符号化部104に符号化動作を開始させる。
In addition, the
また、符号化の一時停止を指示する制御情報SIG110が入力されると、動作制御部105は、制御情報SIG110を受けた後に入力される最初のビデオフレーム境界情報SIG112の入力タイミング(映像データ符号化一時停止時刻)で、符号化の一時停止を指示する映像符号化制御情報SIG113を出力して、ビデオ符号化部103の符号化動作を一時停止させる。さらに、動作制御部105は、映像データ符号化一時停止時刻を基準に、入力時間差情報SIG111が示す時間差だけ遅れたタイミングを時刻情報SIG116に基づいて検出し、検出したタイミングで、符号化の一時停止を指示する音声符号化制御情報SIG114を出力して、オーディオ符号化部104の符号化動作を一時停止させる。
When the control information SIG110 instructing the temporary stop of the encoding is input, the
一方、映像データSIG101が音声データSIG102よりも遅れて入力される場合には、動作制御部105は、以下のように、符号化及び多重化の開始及び一時停止を制御する。
On the other hand, when the video data SIG101 is input later than the audio data SIG102, the
動作制御部105は、符号化開始を指示する制御情報SIG110が入力されると、符号化する最初のビデオフレームのビデオフレーム境界よりも、入力時間差情報SIG111が示す時間差Δt(映像データSIG101が遅れる場合は負の値)だけ早いタイミングで、音声符号化制御情報SIG114を出力する。
When the control information SIG110 instructing the start of encoding is input, the
具体的には、動作制御部105は、音声符号化制御情報SIG114を出力するタイミング(音声データ符号化開始時刻)として、t+(ビデオフレーム期間)−(|Δt|%(ビデオフレーム期間))を算出する。ただし、tは、制御情報SIG110が入力された後の最初に検出されるビデオフレーム境界の検出時刻である。また、|Δt|%(ビデオフレーム期間)は、|Δt|を(ビデオフレーム期間)で割り算したときの余りである。
Specifically, the
さらに、動作制御部105は、(音声データ符号化開始時刻)+|Δt|で表される時刻において、ビデオ符号化部103に対して、符号化開始を指示する映像符号化制御情報SIG113を通知する。
Further, the
符号化の一時停止を指示する制御情報SIG110が入力されると、動作制御部105は、t+(ビデオフレーム期間)−(|Δt|%(ビデオフレーム期間))で定まる時刻(音声データ符号化一時停止時刻)に、符号化一時停止を指示する音声符号化制御情報SIG114をオーディオ符号化部104に通知する。ただし、tは、制御情報SIG110が入力された後に検出される最初のビデオフレーム境界の検出時刻である。さらに、動作制御部105は、(音声データ符号化一時停止時刻)+|Δt|で表される時刻に、符号化一時停止を指示する映像符号化制御情報SIG113をビデオ符号化部103に通知する。
When the control information SIG110 instructing the temporary stop of the encoding is input, the
(映像データ用バッファ106・音声データ用バッファ107)
映像データ用バッファ106は、ビデオ符号化部103が出力した符号化映像データSIG103を保持するようになっている。
(
The
映像データ用バッファ106の容量は、映像データSIG101と音声データSIG102との入力タイミングにずれが無い場合に必要な容量(すなわち、符号化映像データSIG105と符号化音声データSIG106との多重化のために、バッファリングする必要のある符号化映像データSIG105の容量)に加えて、ビデオ符号化部103とオーディオ符号化部104との符号化開始時間差分の時間に、ビデオ符号化部103が符号化したデータを保持できる容量が必要である。
The capacity of the
本実施形態では、符号化映像データSIG103が多重化されるタイミングは、音声データが映像データよりも遅れる場合は、遅れがない場合と比べて、入力時間差情報SIG111が示す時間差(Δt)だけ遅くなる。すなわち、映像データ用バッファ106における符号化映像データSIG103の保持期間がΔtだけ長くなる。したがって、映像データ用バッファ106は、映像データSIG101と音声データSIG102との入力タイミングにずれが無い場合に必要な容量に加えて、([Δt/(ビデオフレーム期間)]+1)×(符号化された映像データの1ビデオフレーム分の最大サイズ)の容量を有している必要がある。なお、映像データ用バッファ106は、あらかじめ必要な容量を確保しておく構成でもよいし、外部からの開始指示をうけて、必要な容量を確保する構成でもよい。
In the present embodiment, the timing at which the encoded video data SIG103 is multiplexed is delayed by the time difference (Δt) indicated by the input time difference information SIG111 when the audio data is delayed from the video data, as compared to when there is no delay. . That is, the retention period of the encoded video data SIG103 in the
音声データ用バッファ107は、オーディオ符号化部104が出力した符号化音声データSIG104を保持するようになっている。
The
音声データ用バッファ107の容量は、映像データSIG101と音声データSIG102との入力タイミングにずれが無い場合に必要な容量(すなわち、符号化映像データSIG105と符号化音声データSIG106との多重化のために、バッファリングする必要のある符号化音声データSIG106の容量)に加えて、ビデオ符号化部103とオーディオ符号化部104との符号化開始時間差分の時間に、オーディオ符号化部104が符号化したデータを保持できる容量が必要である。
The capacity of the
本実施形態では、音声データSIG102が多重化されるタイミングは、映像データが音声データよりも遅れる場合は、遅れがない場合と比べて、入力時間差情報SIG111が示す時間差(Δt)だけ遅くなる。すなわち、音声データ用バッファ107における符号化音声データSIG104の保持期間がΔtだけ長くなる。したがって、音声データ用バッファ107は、映像データSIG101と音声データSIG102との入力タイミングにずれが無い場合に必要な容量に加えて、([|Δt|/(オーディオフレーム期間)]+1)×(符号化された音声データの1オーディオフレーム分の最大サイズ)の容量を有している必要がある。なお、音声データ用バッファ107は、あらかじめ必要な容量を確保しておく構成でもよいし、外部からの開始指示をうけて、必要な容量を確保する構成でもよい。
In the present embodiment, the timing at which the audio data SIG102 is multiplexed is delayed by the time difference (Δt) indicated by the input time difference information SIG111 when the video data is delayed from the audio data, compared to when there is no delay. That is, the holding period of the encoded audio data SIG104 in the
(多重化部108)
多重化部108は、多重化制御情報SIG115が入力されると動作を開始し、映像データ用バッファ106及び音声データ用バッファ107のそれぞれに格納されているデータ(符号化映像データSIG105及び符号化音声データSIG106)を多重化したストリーム(多重化ストリームSIG107)を出力するようになっている。詳しくは、多重化部108は、ビデオフレーム情報SIG108及びオーディオフレーム情報SIG109に基づいて、符号化映像データSIG105及び符号化音声データSIG106の再生時間(再生時間情報)を算出し、算出した再生時間情報を基に多重化順を決定する。そして、決定した多重化順にしたがって、映像データ用バッファ106から取得した符号化映像データSIG105と、音声データ用バッファ107から取得した符号化音声データSIG106とを、再生時間情報を付加して多重化する。
(Multiplexer 108)
[映像音声多重化装置100の動作]
(音声データが映像データに対して遅れたタイミングで入力される場合の動作)
音声データが映像データに対して遅れたタイミングで入力される場合における符号化開始、一時停止、及び符号化再開の動作を、図2を参照しつつ説明する。図2は、動作制御部105、ビデオ符号化部103、及びオーディオ符号化部104の制御タイミングを示す図である。
[Operation of Video / Audio Multiplexer 100]
(Operation when audio data is input at a timing delayed from video data)
The encoding start, pause, and encoding restart operations when audio data is input at a timing delayed from the video data will be described with reference to FIG. FIG. 2 is a diagram illustrating control timings of the
映像音声多重化装置100に多重化を行なわせるには、例えば外部から、制御情報SIG110と入力時間差情報SIG111とを、動作制御部105に対して入力する。ここでは、動作制御部105は、図2に示す開始指示時刻t200において、制御情報SIG110と入力時間差情報SIG111とを受けたものとする。また、入力時間差情報SIG111が示す時間差は、Δt2(音声データが遅れる場合は正の値)とする。
In order to cause the video /
制御情報SIG110と入力時間差情報SIG111とが入力されると、動作制御部105は、開始指示時刻t200の後の最初にビデオフレーム境界が検出された時刻t201において、ビデオ符号化部103に対して、映像符号化制御情報SIG113を出力する。これにより、ビデオ符号化部103は、映像データSIG101を符号化した符号化映像データSIG103を映像データ用バッファ106に出力する。
When the control information SIG110 and the input time difference information SIG111 are input, the
さらに、動作制御部105は、時刻t201(映像データ符号化開始時刻)よりもΔt2遅れた時刻t202のタイミングを、時刻情報SIG116に基づいて検出し、検出したタイミングで、オーディオ符号化部104に対して、音声符号化制御情報SIG114を出力する。これにより、オーディオ符号化部104は、音声データSIG102を符号化した符号化音声データSIG104を音声データ用バッファ107に出力する。
Furthermore, the
また、動作制御部105は、制御情報SIG110が入力されると、多重化制御情報SIG115を多重化部108に出力する。それにより、多重化部108は、多重化動作を開始する。具体的には、多重化部108は、ビデオフレーム情報SIG108及びオーディオフレーム情報SIG109に基づいて、符号化映像データSIG105及び符号化音声データSIG106の再生時間情報を算出して多重化順を決定する。そして、多重化部108は、決定した多重化順にしたがって、映像データ用バッファ106から取得した符号化映像データSIG105と、音声データ用バッファ107から取得した符号化音声データSIG106とを、再生時間情報を付加して多重化する。
Further, when the control information SIG 110 is input, the
図3は、音声データが遅れる場合に、各ビデオフレーム及びオーディオフレームに付加される再生時間情報を示している。上記のように、多重化部108は、ビデオフレーム情報SIG108とオーディオフレーム情報SIG109とに基づいて、再生時間情報を算出するので、ビデオフレームv201(先頭のビデオフレーム)の再生時間情報と、オーディオフレームa201(先頭のオーディオフレーム)の再生時間情報とは、図3に示すように、同じ再生時刻(再生時間情報t300)を示している。
FIG. 3 shows reproduction time information added to each video frame and audio frame when audio data is delayed. As described above, the
(符号化の一時停止及び再開)
また、例えば、動作制御部105が、図2に示す一時停止指示時刻t203において、一時停止の指示を受けた場合には、一時停止指示時刻t203の後の最初にビデオフレーム境界が検出された時刻t204において、動作制御部105は、ビデオ符号化部103に一時停止を指示する映像符号化制御情報SIG113を通知する。さらに、動作制御部105は、時刻t204よりもΔt2遅れた時刻t205のタイミングを、時刻情報SIG116によって検出し、検出したタイミングで、一時停止を指示する音声符号化制御情報SIG114をオーディオ符号化部104に出力する。
(Pause and resume encoding)
Further, for example, when the
また、例えば、動作制御部105が、再開指示時刻t206において、符号化開始(再開)の指示を受けた場合には、再開指示時刻t206の後の最初にビデオフレーム境界が検出された時刻t207において、動作制御部105は、ビデオ符号化部103に符号化開始を指示する映像符号化制御情報SIG113を通知する。さらに、動作制御部105は、時刻t207よりもΔt2遅れた時刻t208のタイミングを、時刻情報SIG116によって検出し、検出したタイミングで、符号化開始(再開)を指示する音声符号化制御情報SIG114をオーディオ符号化部104に出力する。それにより、一時停止及び再開の前後のビデオフレームv204とビデオフレームv205とは、図3に示すように、再生時間情報t301において、シームレスに接続される。また、一時停止及び再開のタイミングにまたがるオーディオフレームa207は、図3に示すように、再生時間情報t301において、シームレスに接続される。
Also, for example, when the
(映像データが音声データに対して遅れたタイミングで入力される場合の動作)
次に、映像データが音声データに対して遅れたタイミングで入力される場合における符号化開始、一時停止、及び符号化再開の動作を、図4を参照しつつ説明する。図4は、動作制御部105、ビデオ符号化部103、及びオーディオ符号化部104の制御タイミングを示す図である。
(Operation when video data is input at a timing delayed from audio data)
Next, operations of encoding start, pause, and encoding restart when video data is input at a timing delayed from audio data will be described with reference to FIG. FIG. 4 is a diagram illustrating control timings of the
映像音声多重化装置100に多重化を行なわせるには、まず、動作制御部105に対して、例えば外部から制御情報SIG110と入力時間差情報SIG111とを入力する。ここでは、動作制御部105は、図4に示す開始指示時刻t400において、制御情報SIG110と入力時間差情報SIG111とを受けたものとする。また、入力時間差情報SIG111が示す時間差は、Δt4(映像データが遅れる場合は負の値)であるものとする。また、開始指示時刻t400の後の最初に検出されるビデオフレーム境界の検出時刻は、時刻t401であるものとする。
In order to cause the video /
制御情報SIG110が入力されると、動作制御部105は、時刻t401+(ビデオフレーム期間)−(|Δt4|%(ビデオフレーム期間))で表される時刻t402(音声データ符号化開始時刻)を求め、時刻t402において、オーディオ符号化部104に対して、符号化開始を指示する音声符号化制御情報SIG114を通知する。
When the control information SIG110 is input, the
また、動作制御部105は、時刻t402+|Δt4|で表される時刻t403において、ビデオ符号化部103に対して、符号化開始を指示する映像符号化制御情報SIG113を通知する。
In addition, the
また、動作制御部105は、制御情報SIG110が入力されると、多重化制御情報SIG115を多重化部108に出力し、多重化部108の多重化動作を開始させる。
Further, when the control information SIG110 is input, the
以上により、映像データSIG101及び音声データSIG102は符号化された後に、多重化されて出力される。 As described above, the video data SIG101 and the audio data SIG102 are encoded and then multiplexed and output.
図5は、映像データが遅れる場合に、各ビデオフレーム及びオーディオフレームに付加される再生時間情報を示している。多重化部108は、ビデオフレーム情報SIG108とオーディオフレーム情報SIG109とに基づいて、再生時間情報を算出するので、ビデオフレームv401(先頭のビデオフレーム)の再生時間情報と、オーディオフレームa401(先頭のオーディオフレーム)の再生時間情報とは、図5に示すように、同じ再生時刻(再生時間情報t500)を示している。
FIG. 5 shows reproduction time information added to each video frame and audio frame when video data is delayed. The
(符号化の一時停止及び再開)
また、例えば、動作制御部105が、図4に示す一時停止指示時刻t404において、一時停止の指示を受けた場合には、一時停止指示時刻t404の後の最初のビデオフレーム境界が時刻t405であるとすると、時刻t405+(ビデオフレーム期間)−(|Δt4|%(ビデオフレーム期間))で表される時刻t406において、オーディオ符号化部104に対して、符号化の一時停止を指示する音声符号化制御情報SIG114を通知する。
(Pause and resume encoding)
Also, for example, when the
また、時刻t406+|Δt4|で表される時刻t407において、ビデオ符号化部103に対して、符号化の一時停止を指示する映像符号化制御情報SIG113を通知する。
Also, at time t407 represented by time t406 + | Δt4 |, video encoding control information SIG113 instructing the temporary stop of encoding is notified to the
また、動作制御部105が、再開指示時刻t408において、符号化開始(再開)の指示を受けた場合には、再開指示時刻t408の後の最初のビデオフレーム境界が時刻t409であるとすると、時刻t409+(ビデオフレーム期間)−(|Δt4|%(ビデオフレーム期間))で表される時刻t410において、オーディオ符号化部104に対して、符号化開始を指示する音声符号化制御情報SIG114を通知する。また、時刻t410+|Δt4|で表される時刻t411において、ビデオ符号化部103に対して、符号化開始(再開)を指示する映像符号化制御情報SIG113を通知する。
Further, when the
以上により、一時停止及び再開の前後のビデオフレームv405とビデオフレームv406とは、図5に示すように、再生時間情報t501でシームレスに接続される。また、一時停止及び再開のタイミングにまたがるオーディオフレームa408は、図5に示すように、再生時間情報t501でシームレスに接続される。 As described above, the video frame v405 and the video frame v406 before and after the pause and restart are seamlessly connected with the reproduction time information t501 as shown in FIG. Also, the audio frame a408 extending over the pause and restart timings is seamlessly connected with the playback time information t501 as shown in FIG.
上記のように、本実施形態によれば、ビデオ符号化部における符号化開始タイミングと、オーディオ符号化部における符号化開始タイミングとを、映像データと音声データの入力タイミングのずれ量に応じて調整するので、映像データと音声データの入力タイミングにずれがあっても、多重化ストリームの再生時に、映像と音声とがずれないようにすることが可能になる。 As described above, according to the present embodiment, the encoding start timing in the video encoding unit and the encoding start timing in the audio encoding unit are adjusted according to the shift amount of the input timing of the video data and the audio data. Therefore, even if the input timing of the video data and the audio data is deviated, it is possible to prevent the video and audio from deviating when the multiplexed stream is reproduced.
しかも、映像データと音声データを符号化した後に、バッファリングして入力タイミングのずれを吸収するので、例えば、映像データがより高画質化されたり、音声データがより高音質化されたりした場合にも、映像データ用バッファや音声データ用バッファの容量を、実現可能な範囲に収めることが可能になる。 In addition, after encoding video data and audio data, buffering is performed to absorb the difference in input timing, so that, for example, when the video data is improved in quality or the audio data is improved in quality. However, the capacity of the video data buffer and the audio data buffer can be kept within the feasible range.
《発明の実施形態2》
図6は、本発明の実施形態2に係る映像音声多重化装置200の構成を示すブロック図である。映像音声多重化装置200は、同図に示すように、検出部101、ビデオ符号化部103、オーディオ符号化部104、映像データ用バッファ106、音声データ用バッファ107、動作制御部201、及び多重化部202を備えている。
<< Embodiment 2 of the Invention >>
FIG. 6 is a block diagram showing a configuration of a video /
(動作制御部201)
動作制御部201は、符号化の開始と一時停止を制御する情報を含んだ制御情報SIG110が映像音声多重化装置200の外部から入力されており、制御情報SIG110に応じて、ビデオ符号化部103及びオーディオ符号化部104の符号化動作の制御と、多重化部202の多重化動作とを制御するようになっている。この制御は、音声データSIG102及び映像データSIG101のうち、何れの入力が遅れるかによって異なっている。
(Operation control unit 201)
The
音声データSIG102が映像データSIG101よりも遅れて入力される場合には、動作制御部105は、以下のように、符号化及び多重化の開始及び一時停止を制御する。
When the audio data SIG102 is input later than the video data SIG101, the
動作制御部201は、符号化開始を指示する制御情報SIG110が入力されると、符号化する最初のビデオフレームのビデオフレーム境界情報SIG112が入力されたタイミング(映像データ符号化開始時刻)で、符号化開始を指示する映像符号化制御情報SIG113を出力して、ビデオ符号化部103に符号化動作を開始させる。
When the control information SIG110 instructing the start of encoding is input, the
また、動作制御部201には、入力時間差情報SIG111が入力されており、入力時間差情報SIG111が示す時間差をΔt(音声データが遅れる場合は正の値)とすると、動作制御部201は、(映像データ符号化開始時刻)+Δtよりも後で、かつ、最も早いタイミングのビデオフレーム境界の検出時刻(この時刻は、ビデオフレーム境界情報SIG112によって検出する)において、オーディオ符号化部104に符号化開始を指示する音声符号化制御情報SIG114を通知する。
Further, the input time difference information SIG111 is input to the
同時に、動作制御部201は、(ビデオフレーム期間)−Δt%(ビデオフレーム期間)の値を時間差分情報SIG201として、多重化部202に通知する。また、多重化開始を指示する多重化制御情報SIG115を多重化部202に通知する。
At the same time, the
また、符号化の一時停止を指示する制御情報SIG110が入力されると、動作制御部201は、制御情報SIG110を受けた後に入力される最初のビデオフレーム境界情報SIG112の入力タイミング(映像データ符号化一時停止時刻)に、符号化の一時停止を指示する映像符号化制御情報SIG113を出力して、ビデオ符号化部103の符号化動作を一時停止させる。動作制御部201は、(映像データ符号化一時停止時刻)+Δtよりも後で、かつ、最も早いタイミングのビデオフレーム境界の検出時刻(この時刻は、ビデオフレーム境界情報SIG112によって検出する)に、オーディオ符号化部104に一時停止を指示する音声符号化制御情報SIG114を通知する。
When the control information SIG110 instructing the temporary stop of the encoding is input, the
一方、映像データSIG101が音声データSIG102よりも遅れて入力される場合には、動作制御部201は、以下のように、符号化及び多重化の開始及び一時停止を制御する。
On the other hand, when the video data SIG101 is input later than the audio data SIG102, the
動作制御部201は、制御情報SIG110が入力された時刻の後の最初にビデオフレーム境界が検出された時刻(音声データ符号化開始時刻)に、符号化開始を指示する音声符号化制御情報SIG114をオーディオ符号化部104に通知する。入力時間差情報SIG111が示す時間差をΔt(映像データが遅れる場合は負の値)とすると、動作制御部201は、(音声データ符号化開始時刻)+|Δt|よりも小さく、かつ、最も遅いタイミングのビデオフレーム境界の検出時刻において、符号化開始を指示する映像符号化制御情報SIG113をビデオ符号化部103に通知する。同時に、動作制御部201は、|Δt|%(ビデオフレーム期間)の値を、時間差分情報SIG201として多重化部202に通知する。さらに、多重化開始を指示する多重化制御情報SIG115を多重化部202に通知する。
The
また、符号化の一時停止を指示する制御情報SIG110が入力されると、動作制御部201は、制御情報SIG110を受けた後の最初にビデオフレーム境界が検出された時刻時刻(音声データ符号化一時停止時刻)に、符号化の一時停止を指示する音声符号化制御情報SIG114をオーディオ符号化部104に通知する。さらに、動作制御部201は、(音声データ符号化一時停止時刻)+|Δt|よりも前で、かつ、最も遅いタイミングのビデオフレーム境界の検出時刻に、一時停止を指示する映像符号化制御情報SIG113をビデオ符号化部103に通知する。
When control information SIG110 instructing to pause encoding is input,
(多重化部202)
多重化部202は、多重化制御情報SIG115が入力されると動作を開始し、ビデオフレーム情報SIG108、オーディオフレーム情報SIG109及び時間差分情報SIG201に基づいて、符号化映像データSIG105及び符号化音声データSIG106の再生時間情報を算出する。詳しくは、多重化部202は、1ビデオフレームの時間間隔とのビデオフレーム情報SIG108の通知された回数から算出された値を、ビデオフレームの再生時間情報とし、1オーディオフレームの時間間隔とのオーディオフレーム情報SIG109の通知された回数から算出される値に、時間差分情報SIG201が示す値を加算し、オーディオフレームの再生時間情報とするようになっている。
(Multiplexer 202)
The
そして、動作制御部201は、算出した再生時間情報を基に、多重化順を決定し、決定した多重化順にしたがって、映像データ用バッファ106から取得した符号化映像データSIG105と、音声データ用バッファ107から取得した符号化音声データSIG106とを、再生時間情報を付加して多重化する。
Then, the
(映像音声多重化装置200の動作)
(音声データが映像データに対して遅れたタイミングで入力される場合の動作)
音声データが映像データに対して遅れたタイミングで入力される場合における符号化開始、一時停止、及び符号化再開の動作を、図7を参照しつつ説明する。図7は、動作制御部201、ビデオ符号化部103、及びオーディオ符号化部104の制御タイミングを示す図である。
(Operation of Video / Audio Multiplexer 200)
(Operation when audio data is input at a timing delayed from video data)
The encoding start, pause, and encoding restart operations when audio data is input at a timing delayed from the video data will be described with reference to FIG. FIG. 7 is a diagram illustrating control timings of the
映像音声多重化装置200に多重化を行なわせるには、まず動作制御部201に対して、例えば外部から制御情報SIG110と入力時間差情報SIG111とを入力する。ここでは、動作制御部201は、図7に示す開始指示時刻t700において、制御情報SIG110と入力時間差情報SIG111とを受けたものとする。また、入力時間差情報SIG111が示す時間差は、Δt7(音声データが遅れる場合は正の値)とする。
In order to cause the video /
制御情報SIG110と入力時間差情報SIG111とが入力されると、動作制御部201は、開始指示時刻t700の後の最初にビデオフレーム境界が検出された時刻t701(映像データ符号化開始時刻)において、ビデオ符号化部103に対して、映像符号化制御情報SIG113を出力する。これにより、ビデオ符号化部103は、符号化映像データSIG103を映像データ用バッファ106に出力する。
When the control information SIG110 and the input time difference information SIG111 are input, the
さらに、動作制御部201は、時刻t701+Δt7よりも後で、かつ、最も早いタイミングのビデオフレーム境界の検出時刻(時刻t702)において、オーディオ符号化部104に符号化開始を指示する音声符号化制御情報SIG114を通知する。これにより、オーディオ符号化部104は、符号化音声データSIG104を音声データ用バッファ107に出力する。
Further, the
また、動作制御部201は、多重化制御情報SIG115と、時間差分情報SIG201とを多重化部202に出力する。時間差分情報SIG201の値は、(ビデオフレーム期間)−Δt7%(ビデオフレーム期間)である。この時、ビデオ符号化部103とオーディオ符号化部104の符号化開始時に取り込まれた映像データと音声データの時間のずれは、時間差分情報SIG201と同じである。
In addition, the
それにより、多重化部202は、ビデオフレーム情報SIG108に基づいて、符号化映像データSIG105の再生時間情報を算出する。さらに、オーディオフレーム情報SIG109と時間差分情報SIG201の値に基づいて、符号化音声映像データSIG106の再生時間情報を算出する。そして、多重化部202は、符号化映像データSIG105及び符号化音声データSIG106の多重化順を決定し、決定した多重化順にしたがって、映像データ用バッファ106から取得した符号化映像データSIG105と、音声データ用バッファ107から取得した符号化音声データSIG106とを、再生時間情報を付加して多重化する。
Thereby, the
図8は、音声データが遅れる場合に、各ビデオフレーム及びオーディオフレームに付加される再生時間情報を示している。図8に示すように、ビデオフレームv701(先頭のビデオフレーム)の再生時間情報を再生時間情報t800とすると、オーディオフレームa701(先頭のオーディオフレーム)の再生時間情報t801は、再生時間情報t800+(ビデオフレーム期間)−Δt7%(ビデオフレーム期間)となる。すなわち、ビデオフレームv701とオーディオフレームa701の入力タイミングのずれは、付加する再生時間情報のずれと等しい。再生時t801−t800の期間、無音状態となるが、1ビデオフレーム期間以下なので、視聴時に影響することはない。 FIG. 8 shows reproduction time information added to each video frame and audio frame when audio data is delayed. As shown in FIG. 8, assuming that the playback time information of the video frame v701 (first video frame) is the playback time information t800, the playback time information t801 of the audio frame a701 (first audio frame) is the playback time information t800 + (video Frame period) −Δt 7% (video frame period). That is, the difference in input timing between the video frame v701 and the audio frame a701 is equal to the difference in reproduction time information to be added. During the period from t801 to t800 at the time of reproduction, there is a silent state.
なお、音声データが映像データに対して遅れたタイミングで入力される場合には、上記のように、映像データ用バッファ106における符号化された映像データの保持期間は、(時刻t702−時刻t701)だけ長くなる。したがって、本実施形態では、映像データ用バッファ106は、映像データSIG101と音声データSIG102との入力タイミングにずれが無い場合に必要な容量に加えて、([(時刻t702−時刻t701)/(ビデオフレーム期間)]+1)×(符号化された映像データの1ビデオフレーム分の最大サイズ)の容量を有している必要がある。
When the audio data is input at a timing delayed from the video data, the encoded video data holding period in the
(符号化の一時停止及び再開)
例えば、動作制御部201が、図7に示す一時停止指示時刻t703において、一時停止の指示を受けた場合には、一時停止指示時刻t703の後の最初にビデオフレーム境界が検出された時刻t704において、動作制御部201は、ビデオ符号化部103に一時停止を指示する映像符号化制御情報SIG113を通知する。さらに、動作制御部201は、時刻t704+Δt7よりも後で、かつ、最も早いタイミングのビデオフレーム境界(時刻t705)で、一時停止を指示する音声符号化制御情報SIG114をオーディオ符号化部104に出力する。
(Pause and resume encoding)
For example, when the
また、動作制御部201が、再開指示時刻t706において、符号化開始(再開)の指示を受けた場合には、再開指示時刻t706の後の最初にビデオフレーム境界が検出された時刻t707において、動作制御部201は、ビデオ符号化部103に符号化開始を指示する映像符号化制御情報SIG113を通知する。さらに、時刻t707+Δt7よりも後で、かつ、最も早いタイミングのビデオフレーム境界(時刻t708)で、符号化開始(再開)を指示する音声符号化制御情報SIG114を、オーディオ符号化部104に出力する。
When the
したがって、図8に示すように、一時停止及び再開の前後のビデオフレームv704、及びビデオフレームv705は、再生時間情報t802でシームレスに接続される。一時停止及び再開のタイミングにまたがるオーディオフレームa708は、再生時間情報t802+(ビデオフレーム期間)−Δt7%(ビデオフレーム期間)となる時刻t803でシームレスに接続される。この場合も、再生時間情報t802と再生時間情報t803の差は、1ビデオフレーム期間以下であり、視聴時に影響することはない。 Therefore, as shown in FIG. 8, the video frame v704 and the video frame v705 before and after the pause and restart are seamlessly connected with the playback time information t802. The audio frame a708 extending over the pause and restart timings is seamlessly connected at time t803 when the playback time information t802 + (video frame period) −Δt7% (video frame period). Also in this case, the difference between the reproduction time information t802 and the reproduction time information t803 is one video frame period or less, and does not affect the viewing.
(映像データが音声データに対して遅れたタイミングで入力される場合の動作)
次に、映像データが音声データに対して遅れたタイミングで入力される場合における符号化開始、一時停止、及び符号化再開の動作を、図9を参照しつつ説明する。図9は、動作制御部201、ビデオ符号化部103、及びオーディオ符号化部104の制御タイミングを示す図である。
(Operation when video data is input at a timing delayed from audio data)
Next, encoding start, pause, and encoding restart operations when video data is input at a timing delayed from audio data will be described with reference to FIG. FIG. 9 is a diagram illustrating control timings of the
ここでは、動作制御部201は、図9示す開始指示時刻t900において、制御情報SIG110と入力時間差情報SIG111とを受けたものとする。また、入力時間差情報SIG111が示す時間差は、Δt9(映像データが遅れる場合は負の値)であるものとする。また、開始指示時刻t900の後の最初に検出されるビデオフレーム境界の検出時刻は、時刻t901であるものとする。
Here, it is assumed that the
制御情報SIG110が入力されると、動作制御部201は、時刻t901に、オーディオ符号化部104に対して、符号化開始を指示する音声符号化制御情報SIG114を通知する。
When the control information SIG110 is input, the
さらに、動作制御部201は、時刻t901+|Δt9|よりも前で、かつ、最も遅いタイミングのビデオフレーム境界の検出時刻(時刻t902)で、ビデオ符号化部103に対して符号化開始を指示する映像符号化制御情報SIG113を通知する。
Further, the
また、多重化部202に対しては、|Δt9|%(ビデオフレーム期間)を時間差分情報SIG201として、多重化制御情報SIG115と同時に通知する。この時、ビデオ符号化部103とオーディオ符号化部104の符号化開始時に取り込まれた映像データと音声データの時間のずれは、時間差分情報SIG201と同じである。
Further, | Δt9 |% (video frame period) is notified to the
それにより、多重化部202は、ビデオフレーム情報SIG108に基づいて、符号化映像データSIG105の再生時間情報を算出する。さらに、オーディオフレーム情報SIG109と時間差分情報SIG201の値に基づいて、符号化音声映像データSIG106の再生時間情報を算出する。そして、多重化部202は、符号化映像データSIG105及び符号化音声データSIG106の多重化順を決定し、決定した多重化順にしたがって、映像データ用バッファ106から取得した符号化映像データSIG105と、音声データ用バッファ107から取得した符号化音声データSIG106とを、再生時間情報を付加して多重化する。
Thereby, the
図10は、映像データが遅れる場合に、各ビデオフレーム及びオーディオフレームに付加される再生時間情報を示している。図10に示すように、ビデオフレームv901(先頭のビデオフレーム)の再生時間情報を再生時間情報t1000とすると、オーディオフレームa901(先頭のオーディオフレーム)の再生時間情報t1001は、再生時間情報t1000+|Δt9|%(ビデオフレーム期間)となるとなる。すなわち、ビデオフレームv901とオーディオフレームa901の入力タイミングのずれは、付加する再生時間情報のずれと等しい。再生時t1001−t1000の期間、無音状態となるが、1ビデオフレーム期間以下なので、視聴時に影響することはない。 FIG. 10 shows reproduction time information added to each video frame and audio frame when video data is delayed. As shown in FIG. 10, when the playback time information of the video frame v901 (first video frame) is the playback time information t1000, the playback time information t1001 of the audio frame a901 (first audio frame) is the playback time information t1000 + | Δt9. |% (Video frame period). That is, the difference in input timing between the video frame v901 and the audio frame a901 is equal to the difference in reproduction time information to be added. During the period from t1001 to t1000 at the time of reproduction, there is no sound, but since it is less than one video frame period, there is no influence on viewing.
なお、音映像データが音声データに対して遅れたタイミングで入力される場合には、上記のように、音声データ用バッファ107における符号化された音声データの保持期間は、(時刻t902−時刻t901)だけ長くなる。したがって、本実施形態では、音声データ用バッファ107は、映像データSIG101と音声データSIG102との入力タイミングにずれが無い場合に必要な容量に加えて、([|時刻t902−時刻t901|/(オーディオフレーム期間)]+1)×(符号化された音声データの1オーディオフレーム分の最大サイズ)の容量を有している必要がある。
When the audio / video data is input at a timing delayed from the audio data, the encoded audio data holding period in the
(符号化の一時停止及び再開)
また、例えば、動作制御部201が、図9に示す一時停止指示時刻t904において、一時停止の指示を受けた場合には、動作制御部201は、一時停止指示時刻t904の後の最初にビデオフレーム境界が検出された時刻t905で、オーディオ符号化部104に一時停止を指示する音声符号化制御情報SIG114を通知する。さらに、時刻t905+|Δt9|よりも前で、かつ、最も遅いタイミングのビデオフレーム境界の時刻t905で、ビデオ符号化部103に対して、一時停止を指示する映像符号化制御情報SIG113を通知する。
(Pause and resume encoding)
Also, for example, when the
また、例えば、動作制御部201が、再開指示時刻t908において、符号化開始(再開)の指示を受けた場合には、動作制御部201は、再開指示時刻t908の後の最初にビデオフレーム境界が検出された時刻t909で、オーディオ符号化部104に対して、符号化開始(再開)を指示する音声符号化制御情報SIG114を通知する。また、時刻t909+|Δt9|よりも前で、かつ、最も遅いタイミングのビデオフレーム境界の時刻t910で、ビデオ符号化部103に対して、符号化開始(再開)を指示する映像符号化制御情報SIG113を通知する。
For example, when the
したがって、図10に示すように、一時停止及び再開の前後のビデオフレームv905、及びビデオフレームv906は、再生時間情報t1002でシームレスに接続される。また、一時停止及び再開のタイミングにまたがるオーディオフレームa907は、再生時間情報t1002+|Δt9|%(ビデオフレーム期間)となる再生時間情報t1003でシームレスに接続される。この場合も、再生時間情報t1002と再生時間情報t1003との差は、1ビデオフレーム期間以下であり、視聴時に影響することはない。 Therefore, as shown in FIG. 10, the video frame v905 and the video frame v906 before and after the pause and restart are seamlessly connected with the playback time information t1002. Also, the audio frame a907 extending over the pause and restart timings is seamlessly connected with playback time information t1003 that is playback time information t1002 + | Δt9 |% (video frame period). Also in this case, the difference between the reproduction time information t1002 and the reproduction time information t1003 is not more than one video frame period and does not affect the viewing.
上記のように、本実施形態によれば、ビデオ符号化部における符号化開始タイミングと、オーディオ符号化部における符号化開始タイミングとを、映像データと音声データの入力タイミングのずれ量に応じて、ビデオフレーム期間単位で調整する。また、ビデオフレーム期間単位で調整しきれないずれに対しては、多重化ストリームに付加する再生時間情報を変更することで調整する。それゆえ、映像データと音声データの入力タイミングにずれがあっても、多重化ストリームの再生時に、映像と音声とがずれないようにすることが可能になる。 As described above, according to the present embodiment, the encoding start timing in the video encoding unit and the encoding start timing in the audio encoding unit are set according to the shift amount of the input timing of the video data and the audio data. Adjust by video frame period. In addition, a deviation that cannot be adjusted in units of video frame periods is adjusted by changing reproduction time information added to the multiplexed stream. Therefore, even if there is a difference between the input timings of the video data and the audio data, it is possible to prevent the video and the audio from shifting when the multiplexed stream is played back.
しかも、本実施形態では、実施形態1の映像音声多重化装置100のように、時刻計測部102を必要としないので、より小規模に構成することが可能になる。
In addition, in the present embodiment, unlike the video /
なお、実施形態1、及び実施形態2の各構成要素は、ハードウェアによって実現してもよいし、ソフトウェアで中央演算装置(CPU)を動作させることによって実現してもよい。
In addition, each component of
本発明に係る映像音声多重化装置は、映像データの符号化開始タイミングと、音声データの符号化開始タイミングとが、映像データと音声データの入力タイミングのずれ量に応じて調整されるので、映像データと音声データの入力タイミングにずれがあっても、再生時に、映像と音声とがずれない多重化ストリームを生成できるという効果を有し、映像データと音声データとの符号化、及び符号化した映像データと符号化した音声データとの多重化を行なう映像音声多重化装置等として有用である。 In the video / audio multiplexing apparatus according to the present invention, the video data encoding start timing and the audio data encoding start timing are adjusted in accordance with the shift amount of the video data and audio data input timing. Even if there is a discrepancy between the input timing of data and audio data, it has the effect of being able to generate a multiplexed stream in which video and audio are not misaligned during playback, and video data and audio data are encoded and encoded. The present invention is useful as a video / audio multiplexing apparatus that multiplexes video data and encoded audio data.
100 映像音声多重化装置
101 検出部
102 時刻計測部
103 ビデオ符号化部
104 オーディオ符号化部
105 動作制御部
106 映像データ用バッファ
107 音声データ用バッファ
108 多重化部
200 映像音声多重化装置
201 動作制御部
202 多重化部
DESCRIPTION OF
Claims (8)
前記映像データをビデオフレーム単位で符号化して、前記符号化映像データを生成するビデオ符号化部と、
前記音声データをオーディオフレーム単位で符号化して、前記符号化音声データを生成するオーディオ符号化部と、
前記映像データと前記音声データとの入力タイミングのずれ時間を示す入力時間差情報が入力されており、前記映像データのビデオフレーム境界の検出タイミングで、前記ビデオ符号化部が符号化を開始するように制御するとともに、前記ビデオ符号化部の符号化開始タイミングを基準に、前記入力時間差情報が示す時間だけずれたタイミングで、前記オーディオ符号化部が符号化を開始するように制御する動作制御部と、
を備えたことを特徴とする映像音声多重化装置。 Video data and audio data having temporal correlation are inputted, and encoded video data obtained by encoding the video data and encoded audio data encoded by the audio data are generated, and the encoded video data And an audio / video multiplexing apparatus that multiplexes the encoded audio data and generates one multiplexed stream,
A video encoding unit that encodes the video data in units of video frames and generates the encoded video data;
An audio encoding unit that encodes the audio data in units of audio frames and generates the encoded audio data;
Input time difference information indicating a time difference between input timings of the video data and the audio data is input, and the video encoding unit starts encoding at a detection timing of a video frame boundary of the video data. And an operation control unit that controls the audio encoding unit to start encoding at a timing shifted by a time indicated by the input time difference information with reference to an encoding start timing of the video encoding unit. ,
A video / audio multiplexing apparatus comprising:
前記映像データをビデオフレーム単位で符号化して、前記符号化映像データを生成するビデオ符号化部と、
前記音声データをオーディオフレーム単位で符号化して、前記符号化音声データを生成するオーディオ符号化部と、
前記映像データと前記音声データとの入力タイミングのずれ時間を示す入力時間差情報が入力されており、前記映像データのビデオフレーム境界の検出タイミングで、前記ビデオ符号化部が符号化を開始するように制御するとともに、前記ビデオ符号化部の符号化開始タイミングを基準に、ビデオフレーム期間単位の時間だけずれたタイミングで、前記オーディオ符号化部が符号化を開始するように制御し、さらに、前記ビデオ符号化部と前記オーディオ符号化部の符号化開始タイミングのずれ時間と、前記入力時間差情報との差を示す時間差分情報を出力する動作制御部と、
前記時間差分情報が示す時間差に応じた再生時間情報を付加して、前記符号化映像データと前記符号化音声データとを多重化する多重化部と、
を備えたことを特徴とする映像音声多重化装置。 Video data and audio data having temporal correlation are inputted, and encoded video data obtained by encoding the video data and encoded audio data encoded by the audio data are generated, and the encoded video data And an audio / video multiplexing apparatus that multiplexes the encoded audio data and generates one multiplexed stream,
A video encoding unit that encodes the video data in units of video frames and generates the encoded video data;
An audio encoding unit that encodes the audio data in units of audio frames and generates the encoded audio data;
Input time difference information indicating a time difference between input timings of the video data and the audio data is input, and the video encoding unit starts encoding at a detection timing of a video frame boundary of the video data. And controlling the audio encoding unit to start encoding at a timing shifted by a time of a video frame period with reference to the encoding start timing of the video encoding unit, and further, An operation control unit for outputting time difference information indicating a difference between a coding start timing shift time of the encoding unit and the audio encoding unit and the input time difference information;
A multiplexing unit for adding reproduction time information corresponding to the time difference indicated by the time difference information and multiplexing the encoded video data and the encoded audio data;
A video / audio multiplexing apparatus comprising:
前記動作制御部は、前記ビデオ符号化部及び前記オーディオ符号化部の符号化を一時停止させる場合には、前記ビデオ符号化部と前記オーディオ符号化部の符号化開始タイミングのずれ時間と同じ時間だけずれたタイミングで、前記ビデオ符号化部及び前記オーディオ符号化部の符号化を、それぞれ一時停止させることを特徴とする映像音声多重化装置。 The video / audio multiplexing apparatus according to any one of claims 1 and 2,
When the operation control unit temporarily stops the encoding of the video encoding unit and the audio encoding unit, the operation control unit has the same time as the time difference between the encoding start timings of the video encoding unit and the audio encoding unit. A video / audio multiplexing apparatus characterized by temporarily stopping the encoding of the video encoding unit and the audio encoding unit at a timing shifted by a certain amount.
前記ビデオ符号化部の出力を保持する映像データ用バッファと、
前記オーディオ符号化部の出力を保持する音声データ用バッファとを備え、
前記映像データ用バッファは、前記多重化のために、バッファリングする必要のある前記符号化映像データの容量に加えて、前記ビデオ符号化部と前記オーディオ符号化部の符号化開始タイミングのずれ時間の間に前記ビデオ符号化部が生成した符号化映像データを保持できる容量を有し、
前記音声データ用バッファは、前記多重化のために、バッファリングする必要のある前記符号化音声データの容量に加えて、前記ビデオ符号化部と前記オーディオ符号化部の符号化開始タイミングのずれ時間の間に前記オーディオ符号化部が生成した符号化音声データを保持できる容量を有していることを特徴とする映像音声多重化装置。 The video / audio multiplexing apparatus according to any one of claims 1 and 2, further comprising:
A video data buffer for holding the output of the video encoder;
An audio data buffer that holds the output of the audio encoding unit;
The video data buffer includes, in addition to the capacity of the encoded video data that needs to be buffered for the multiplexing, a time difference between encoding start timings of the video encoding unit and the audio encoding unit Having a capacity capable of holding the encoded video data generated by the video encoding unit during
The audio data buffer has a difference in encoding start timing between the video encoding unit and the audio encoding unit in addition to the capacity of the encoded audio data that needs to be buffered for the multiplexing. A video / audio multiplexing apparatus having a capacity capable of holding the encoded audio data generated by the audio encoding unit during
前記動作制御部は、前記音声データの入力タイミングが、前記映像データの入力タイミングよりも遅い場合には、前記ビデオ符号化部の符号化開始タイミングを基準に、入力時間差情報が示す時間だけ遅れたタイミングで、前記オーディオ符号化部が符号化を開始するように制御することを特徴とする映像音声多重化装置。 The video / audio multiplexing apparatus according to claim 1, wherein
When the input timing of the audio data is later than the input timing of the video data, the operation control unit is delayed by the time indicated by the input time difference information with reference to the encoding start timing of the video encoding unit. A video / audio multiplexing apparatus, wherein the audio encoding unit controls to start encoding at a timing.
前記動作制御部は、前記映像データの入力タイミングが、前記音声データの入力タイミングよりも遅い場合には、前記ビデオ符号化部の符号化開始タイミングを基準に、入力時間差情報が示す時間だけ早いタイミングで、オーディオ符号化部が符号化を開始するように制御することを特徴とする映像音声多重化装置。 The video / audio multiplexing apparatus according to claim 1, wherein
When the input timing of the video data is later than the input timing of the audio data, the operation control unit is a timing earlier by the time indicated by the input time difference information with reference to the encoding start timing of the video encoding unit. And a video / audio multiplexing apparatus in which the audio encoding unit is controlled to start encoding.
前記動作制御部は、前記音声データの入力タイミングが、前記映像データの入力タイミングよりも遅い場合には、前記ビデオ符号化部の符号化開始タイミングを基準に、ビデオフレーム期間単位の時間だけ遅れたタイミングで、前記オーディオ符号化部が符号化を開始するように制御することを特徴とする映像音声多重化装置。 The video / audio multiplexing apparatus according to claim 2, wherein
When the input timing of the audio data is later than the input timing of the video data, the operation control unit is delayed by a time of a video frame period with reference to the encoding start timing of the video encoding unit. A video / audio multiplexing apparatus, wherein the audio encoding unit controls to start encoding at a timing.
前記動作制御部は、前記映像データの入力タイミングが、前記音声データの入力タイミングよりも遅い場合には、前記ビデオ符号化部の符号化開始タイミングを基準に、ビデオフレーム期間単位の時間だけ早いタイミングで、前記オーディオ符号化部が符号化を開始するように制御することを特徴とする映像音声多重化装置。 The video / audio multiplexing apparatus according to claim 2, wherein
When the input timing of the video data is later than the input timing of the audio data, the operation control unit is a timing earlier by a time in units of a video frame period based on the encoding start timing of the video encoding unit. In the video / audio multiplexing apparatus, the audio encoding unit is controlled to start encoding.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006230099A JP2008054159A (en) | 2006-08-28 | 2006-08-28 | Video-audio multiplexing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006230099A JP2008054159A (en) | 2006-08-28 | 2006-08-28 | Video-audio multiplexing apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008054159A true JP2008054159A (en) | 2008-03-06 |
Family
ID=39237743
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006230099A Ceased JP2008054159A (en) | 2006-08-28 | 2006-08-28 | Video-audio multiplexing apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008054159A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2455841A (en) * | 2007-12-27 | 2009-06-24 | Toshiba Kk | Multiplexing of Consecutive System Stream Groups |
US9338523B2 (en) | 2009-12-21 | 2016-05-10 | Echostar Technologies L.L.C. | Audio splitting with codec-enforced frame sizes |
US10412340B2 (en) | 2015-01-30 | 2019-09-10 | Jvckenwood Corporation | Recording device and multiplexing method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002101395A (en) * | 2000-09-21 | 2002-04-05 | Sony Corp | Multiplexing device and method, and decoding device and method |
JP2002290969A (en) * | 2001-03-26 | 2002-10-04 | Ikegami Tsushinki Co Ltd | Synchronizing control device |
JP2003037841A (en) * | 2001-07-24 | 2003-02-07 | Sony Corp | Coding apparatus, coding method, coding process program and coding process program storing medium |
JP2005027006A (en) * | 2003-07-02 | 2005-01-27 | Matsushita Electric Ind Co Ltd | Data transmitting device |
-
2006
- 2006-08-28 JP JP2006230099A patent/JP2008054159A/en not_active Ceased
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002101395A (en) * | 2000-09-21 | 2002-04-05 | Sony Corp | Multiplexing device and method, and decoding device and method |
JP2002290969A (en) * | 2001-03-26 | 2002-10-04 | Ikegami Tsushinki Co Ltd | Synchronizing control device |
JP2003037841A (en) * | 2001-07-24 | 2003-02-07 | Sony Corp | Coding apparatus, coding method, coding process program and coding process program storing medium |
JP2005027006A (en) * | 2003-07-02 | 2005-01-27 | Matsushita Electric Ind Co Ltd | Data transmitting device |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2455841A (en) * | 2007-12-27 | 2009-06-24 | Toshiba Kk | Multiplexing of Consecutive System Stream Groups |
US9338523B2 (en) | 2009-12-21 | 2016-05-10 | Echostar Technologies L.L.C. | Audio splitting with codec-enforced frame sizes |
US10412340B2 (en) | 2015-01-30 | 2019-09-10 | Jvckenwood Corporation | Recording device and multiplexing method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN2927556Y (en) | Video and audio re-player, outputting-time converter | |
US9489980B2 (en) | Video/audio synchronization apparatus and video/audio synchronization method | |
JP3094999B2 (en) | Audio / video synchronous playback device | |
US8526501B2 (en) | Decoder and decoding method based on video and audio time information | |
JPH10507597A (en) | Programmable audio-video synchronization method and apparatus for multimedia systems | |
JPH07303240A (en) | Digital recording voice and video synchronous variable speedreproduction | |
US20070269192A1 (en) | Stream generating apparatus, imaging apparatus, data processing apparatus and stream generating method | |
JPH10511238A (en) | Synchronization method and apparatus for playback system | |
JP2006340102A (en) | Synchronous reproducer and synchronous reproduction method | |
JP2002501702A (en) | Video and audio signal processing | |
GB2424160A (en) | Digital information reproducing apparatus and method | |
JP2008054159A (en) | Video-audio multiplexing apparatus | |
EP1231791A2 (en) | Method and apparatus for synchronously reproducing audio and video data | |
KR970022971A (en) | Apparatus for recording / reproducing a transport bitstream of a digital magnetic recording medium and a control method thereof | |
JP2001078185A (en) | Signal processor | |
JP2010068232A (en) | Video recording and playback apparatus | |
JP5409535B2 (en) | Video / audio conversion apparatus and video / audio conversion method | |
JP5310189B2 (en) | Video encoder apparatus and encoded data output method used for the video encoder apparatus | |
JP4850041B2 (en) | Video playback system, video playback synchronization method, and video playback terminal | |
JP4336879B2 (en) | Video / audio delay confirmation circuit and video / audio delay confirmation method used therefor | |
US7382972B2 (en) | Recording apparatus and method | |
JP2003339023A (en) | Moving picture reproducing apparatus | |
KR100991979B1 (en) | Synchronization apparatus and method for multiple CODEC DVR system | |
JP2004153631A (en) | Digital image and sound recorder | |
JP2020145585A (en) | Synchronization device, synchronization method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20090707 |
|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20120119 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120209 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20120313 |
|
A045 | Written measure of dismissal of application |
Free format text: JAPANESE INTERMEDIATE CODE: A045 Effective date: 20120731 |