JP2012257078A - Image and sound data processor and data multiplexing method - Google Patents
Image and sound data processor and data multiplexing method Download PDFInfo
- Publication number
- JP2012257078A JP2012257078A JP2011129034A JP2011129034A JP2012257078A JP 2012257078 A JP2012257078 A JP 2012257078A JP 2011129034 A JP2011129034 A JP 2011129034A JP 2011129034 A JP2011129034 A JP 2011129034A JP 2012257078 A JP2012257078 A JP 2012257078A
- Authority
- JP
- Japan
- Prior art keywords
- chunk
- frames
- video
- audio data
- frmv
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Abstract
Description
本発明は、映像・音声データ処理装置およびデータ多重化方法に関する。 The present invention relates to a video / audio data processing apparatus and a data multiplexing method.
近年、映像データおよび音声データを扱うファイルフォーマットとして、MP4ファイルフォーマットが普及している。MP4ファイルフォーマットは、MPEG4システム規格(ISO/IEC 14496−1)で規定されている。MP4ファイルフォーマットは、パーソナルコンピュータ(以下、PCとも称する)等での処理が容易であるため、PCアプリケーションの分野で広く使用されている。例えば、MP4ファイルフォーマットを使用することにより、映像および音声のストリームデータの編集等を容易に実行できる。 In recent years, the MP4 file format has become widespread as a file format for handling video data and audio data. The MP4 file format is defined in the MPEG4 system standard (ISO / IEC 14496-1). The MP4 file format is widely used in the field of PC applications because it can be easily processed by a personal computer (hereinafter also referred to as a PC). For example, video and audio stream data can be easily edited by using the MP4 file format.
MP4ファイルは、映像データおよび音声データが格納されるデータ部分と、付属情報が格納されるヘッダ部分とを有している。なお、MP4ファイルでは、映像データおよび音声データを、サンプルおよびチャンクの単位で管理する。サンプルは、映像データおよび音声データを管理する際の最小単位である。例えば、映像データでは、1サンプルは、1映像フレームである。また、音声データでは、1サンプルは、1音声フレームである。そして、データ部分にまとめて配置された複数のサンプルは、チャンクとして管理される。なお、MP4ファイルでは、同一のチャンク内のサンプルは、データ部分に連続して配置されている。 The MP4 file has a data portion in which video data and audio data are stored, and a header portion in which attached information is stored. In the MP4 file, video data and audio data are managed in units of samples and chunks. A sample is a minimum unit for managing video data and audio data. For example, in video data, one sample is one video frame. In the audio data, one sample is one audio frame. A plurality of samples arranged together in the data portion are managed as chunks. In the MP4 file, samples in the same chunk are continuously arranged in the data portion.
チャンク内のサンプルの数は、MP4ファイルフォーマットでは規定されていない。このため、チャンクのサンプル数は、ユーザにより任意に決められる。一般的な方式では、映像データの1GOP(Group of Picture)分のフレームを1チャンクにまとめる。例えば、チャンクの先頭フレームがIピクチャ(Iフレーム)になるように、各チャンクのサンプル数(フレーム数)が設定される。なお、GOPは、Iピクチャを少なくとも1枚含むピクチャの集合体であり、Iピクチャの他にPピクチャ(フレーム)、Bピクチャ(フレーム)を含むこともある。この方式では、Iピクチャの間隔が長いとき、チャンクのサンプル数は増加する。なお、チャンク内のフレーム(サンプル)の最大数を予め設定し、チャンク内のフレームが予め設定した最大数以上になることを防止する方式が提案されている(例えば、特許文献1参照)。 The number of samples in a chunk is not specified in the MP4 file format. Therefore, the number of chunk samples is arbitrarily determined by the user. In a general method, frames of 1 GOP (Group of Picture) of video data are combined into one chunk. For example, the number of samples (number of frames) of each chunk is set so that the first frame of the chunk is an I picture (I frame). The GOP is a collection of pictures including at least one I picture, and may include a P picture (frame) and a B picture (frame) in addition to the I picture. In this method, when the interval between I pictures is long, the number of chunk samples increases. A method has been proposed in which the maximum number of frames (samples) in a chunk is set in advance and the number of frames in a chunk is prevented from exceeding a preset maximum number (see, for example, Patent Document 1).
一般に、コーデックLSI等の映像・音声データ処理装置では、内部メモリの容量が限られているため、MP4ファイルを内部で生成することは現実的でない。このため、例えば、コーデックLSIで符号化された映像データおよび音声データをMP4ファイルに格納するシステムでは、MP4ファイルは、コーデックLSIの外部のモジュールで生成される。例えば、コーデックLSIは、MP4ファイルのデータ部分に格納されるデータとヘッダ部分に格納される付属情報とを、個別に出力する。そして、例えば、コーデックLSIの外部のモジュールは、データと付属情報とを合成し、MP4ファイルを生成する。 In general, in a video / audio data processing apparatus such as a codec LSI, the capacity of an internal memory is limited, and therefore it is not realistic to generate an MP4 file internally. Therefore, for example, in a system that stores video data and audio data encoded by a codec LSI in an MP4 file, the MP4 file is generated by a module outside the codec LSI. For example, the codec LSI individually outputs data stored in the data portion of the MP4 file and attached information stored in the header portion. Then, for example, a module external to the codec LSI synthesizes the data and the attached information to generate an MP4 file.
コーデックLSI等の映像・音声データ処理装置は、映像データおよび音声データを、チャンク単位で交互に出力する。このため、映像データおよび音声データの一方を出力している期間では、他方は待たされる。出力待ちの期間が長いとき、映像データを一時的に記憶するメモリおよび音声データを一時的に記憶するメモリのいずれかがオーバーフローするおそれがある。オーバーフローが発生したとき、有効なデータは消失する。 A video / audio data processing apparatus such as a codec LSI alternately outputs video data and audio data in units of chunks. For this reason, in the period in which one of the video data and the audio data is output, the other is kept waiting. When the output waiting period is long, either the memory for temporarily storing the video data or the memory for temporarily storing the audio data may overflow. When overflow occurs, valid data is lost.
出力待ちの期間は、例えば、チャンクのサンプル数が多いとき、長くなる。なお、チャンク内のサンプルの最大数を予め設定する方式では、メモリの空き容量が大きいときにも、チャンクが不要に細分化されるおそれがある。MP4ファイルのヘッダ部分に格納される付属情報は、チャンク毎に生成される。このため、チャンクが不要に細分化されたとき、MP4ファイルのヘッダ部分のサイズが増加するおそれがある。MP4ファイルのヘッダ部分のサイズの増加に伴い、MP4ファイル全体のサイズは増加する。サイズの大きいMP4ファイルは、PCアプリケーションでは扱い難い。 The output waiting period becomes longer, for example, when the number of chunk samples is large. Note that with the method of setting the maximum number of samples in a chunk in advance, there is a risk that the chunk will be unnecessarily subdivided even when the free capacity of the memory is large. The attached information stored in the header part of the MP4 file is generated for each chunk. For this reason, when chunks are subdivided unnecessarily, the size of the header portion of the MP4 file may increase. As the size of the header portion of the MP4 file increases, the size of the entire MP4 file increases. A large MP4 file is difficult to handle in a PC application.
本発明の目的は、映像データおよび音声データのオーバーフローを低減することである。 An object of the present invention is to reduce overflow of video data and audio data.
本発明の一形態では、映像・音声データ処理装置は、符号化された映像データを記憶する第1記憶部と、符号化された音声データを記憶する第2記憶部と、第1記憶部および第2記憶部のそれぞれの占有量を監視し、第1記憶部の占有量が所定の第1閾値以上である第1条件および第2記憶部の占有量が所定の第2閾値以上である第2条件の少なくとも一方を満たすとき、チャンクのフレーム数をGOPのフレーム数より少なくするチャンク確定部とを有している。 In one aspect of the present invention, a video / audio data processing device includes a first storage unit that stores encoded video data, a second storage unit that stores encoded audio data, a first storage unit, Each occupancy of the second storage unit is monitored, the first condition that the occupancy of the first storage unit is equal to or greater than a predetermined first threshold, and the occupancy of the second storage unit is equal to or greater than a predetermined second threshold A chunk determination unit that reduces the number of chunk frames to less than the number of GOP frames when at least one of the two conditions is satisfied.
映像データおよび音声データのオーバーフローを低減できる。 Overflow of video data and audio data can be reduced.
以下、実施形態を図面を用いて説明する。 Hereinafter, embodiments will be described with reference to the drawings.
図1は、一実施形態における映像・音声データ処理装置10の例を示している。
FIG. 1 shows an example of a video / audio
映像・音声データ処理装置10は、例えば、MP4ファイルを生成するシステムに、搭載される。MP4ファイルフォーマットは、MPEG4システム規格(ISO/IEC 14496−1)で規定されている。例えば、映像・音声データ処理装置10は、MPEG−4(ISO/IEC 14496)等に準拠した符号化方式で符号化された映像データおよび音声データを、外部装置にチャンク単位で交互に出力する。そして、外部装置は、例えば、映像・音声データ処理装置10から受けた映像データおよび音声データをMP4ファイルに格納し、MP4ファイルを生成する。
The video / audio
映像・音声データ処理装置10は、チャンク確定部20およびメモリ30を有している。メモリ30は、例えば、MPEG−4等に準拠した符号化方式で符号化された映像データおよび音声データを順次記憶する。なお、メモリ30に記憶された映像データおよび音声データは、順次出力される。すなわち、メモリ30は、符号化された映像データおよび音声データを一時的に記憶する。
The video / audio
例えば、メモリ30は、符号化された映像データを一時的に記憶する映像領域32と、符号化された音声データを一時的に記憶する音声領域34とを有している。すなわち、メモリ30の映像領域32は、符号化された映像データを一時的に記憶する記憶部として機能する。また、メモリ30の音声領域34は、符号化された音声データを一時的に記憶する記憶部として機能する。なお、映像領域32および音声領域34は、互いに異なるメモリに設けられてもよい。
For example, the
チャンク確定部20は、映像領域32の占有量および音声領域34の占有量をそれぞれ監視する。例えば、チャンク確定部20は、映像データや音声データの符号化に関する情報を用いて、映像領域32や音声領域34の占有量を算出する。符号化に関する情報は、例えば、符号化された映像データや音声データのサイズ等であり、映像データや音声データを符号化する際に生成される。なお、チャンク確定部20は、メモリ30の映像領域32や音声領域34に対する書き込みアドレスや読み出しアドレスに基づいて、映像領域32や音声領域34の占有量を算出してもよい。
The
そして、チャンク確定部20は、例えば、映像領域32の占有量と所定の第1閾値とを比較するとともに、音声領域34の占有量と所定の第2閾値とを比較する。そして、チャンク確定部20は、映像領域32の占有量が第1閾値以上である第1条件および音声領域34の占有量が第2閾値以上である第2条件の少なくとも一方を満たすとき、チャンクのフレーム数(サンプル数)をGOP(Group of Picture)のフレーム数より少なくする。GOPは、複数のピクチャを有するデータ単位であり、少なくとも1つのIピクチャ(Iフレーム)を有している。
Then, for example, the
このように、チャンク確定部20は、映像領域32および音声領域34の少なくとも一方の空き容量が小さいとき、チャンクのフレーム数をGOPのフレーム数より少なくする。例えば、映像・音声データ処理装置10は、符号化された映像データおよび音声データを、チャンク確定部20により設定されたチャンクのフレーム数に基づいて多重化する。
As described above, the
なお、映像データおよび音声データの符号化は、映像・音声データ処理装置10で実施されてもよいし、映像・音声データ処理装置10の外部で実施されてもよい。したがって、映像・音声データ処理装置10は、映像データおよび音声データを符号化する機能を有してもよいし、映像データおよび音声データを符号化する機能を有していなくてもよい。例えば、映像・音声データ処理装置10は、映像データおよび音声データを符号化する機能を有していなとき、外部のコーデックLSI等で符号化された映像データおよび音声データを順次受ける。そして、映像・音声データ処理装置10は、符号化された映像データおよび音声データを映像領域32および音声領域34に順次記憶する。
The encoding of the video data and the audio data may be performed by the video / audio
図2は、MP4ファイルフォーマットの概要を示している。MP4ファイルFILは、例えば、ボックスB10、B20、B30を有している。ファイルタイプボックス(ftyp)B10は、ファイルの先頭に1つのみ存在する。ファイルタイプボックス(ftyp)B10には、MP4ファイルFILの構造を示すブランド名が格納される。ムービーボックス(moov)B20は、1つのファイルに1つのみ存在する。ムービーボックス(moov)B20には、mdatに関する全てのヘッダ情報が格納される。例えば、各サンプルのサイズ、各サンプルの再生期間、ファイル全体の再生期間および各チャンクの位置情報等がムービーボックス(moov)B20に格納される。メディアデータボックス(mdat)B30には、例えば、符号化された映像データおよび音声データが格納される。なお、メディアデータボックス(mdat)B30は、1つのファイルに複数存在してもよい。 FIG. 2 shows an outline of the MP4 file format. The MP4 file FIL has, for example, boxes B10, B20, and B30. There is only one file type box (ftyp) B10 at the head of the file. A brand name indicating the structure of the MP4 file FIL is stored in the file type box (ftyp) B10. There is only one movie box (moov) B20 in one file. The movie box (moov) B20 stores all header information related to mdat. For example, the size of each sample, the playback period of each sample, the playback period of the entire file, the position information of each chunk, and the like are stored in the movie box (moov) B20. In the media data box (mdat) B30, for example, encoded video data and audio data are stored. Note that a plurality of media data boxes (mdat) B30 may exist in one file.
図3は、図1に示した映像・音声データ処理装置10から出力されるデータの一例を示している。なお、図中の網掛けは、映像データのチャンクCNKおよび映像データのメッセージMESを示している。また、メッセージMESの括弧内の数字およびチャンクCNKの括弧内の数字は、出力された順番を示している。
FIG. 3 shows an example of data output from the video / audio
映像・音声データ処理装置10は、映像領域32および音声領域34のそれぞれに記憶された映像データおよび音声データを、外部装置100に、チャンクCNK単位で交互に出力する。チャンクCNKは、複数のサンプルを有している。サンプルは、映像データおよび音声データを管理する際の最小単位である。例えば、映像データのチャンクCNKの1サンプルは、1映像フレームFRMである。また、例えば、音声データのチャンクCNKの1サンプルは、1音声フレームである。
The video / audio
すなわち、チャンクCNKは、複数のフレームFRMを有している。例えば、映像データのチャンクCNK(1)は、フレームFRM(1)−FRM(n)を有している。また、例えば、音声データのチャンクCNK(2)は、フレームFRM(n+1)−FRM(m)を有している。 That is, the chunk CNK has a plurality of frames FRM. For example, the chunk CNK (1) of the video data has a frame FRM (1) -FRM (n). Further, for example, the chunk CNK (2) of the audio data has a frame FRM (n + 1) −FRM (m).
また、映像・音声データ処理装置10は、各チャンクCNKに対応するメッセージMESを外部装置100に出力する。例えば、映像・音声データ処理装置10は、映像データおよび音声データを出力するインターフェースとは別のインターフェースからメッセージMESを出力する。
Also, the video / audio
MP4ファイルでは、映像データおよび音声データは、サンプル(フレームFRM)およびチャンクCNKの単位で管理される。このため、例えば、映像・音声データ処理装置10は、メッセージMESを、チャンクCNK毎に生成する。メッセージMESは、例えば、チャンクCNKに関するヘッダ情報である。したがって、例えば、映像・音声データ処理装置10は、各メッセージMESを、各チャンクCNKに対応付けて出力する。図の破線は、各メッセージMESが各チャンクCNKに対応付けされていることを示している。
In the MP4 file, video data and audio data are managed in units of sample (frame FRM) and chunk CNK. For this reason, for example, the video / audio
外部装置100は、映像・音声データ処理装置10からチャンクCNK単位で受けた映像データおよび音声データとメッセージMESとを元に、MP4ファイルを生成する。例えば、外部装置100は、映像・音声データ処理装置10から受けたメッセージMESを、図2に示したムービーボックス(moov)B20に格納する。また、例えば、外部装置100は、映像・音声データ処理装置10から受けた映像データおよび音声データを、図2に示したメディアデータボックス(mdat)B30に格納する。なお、MP4ファイルでは、同一のチャンクCNK内のサンプル(フレームFRM)は、メディアデータボックス(mdat)B30に連続して配置される。
The
このため、映像・音声データ処理装置10は、映像領域32および音声領域34のそれぞれに記憶された映像データおよび音声データを、チャンクCNK単位で交互に出力する。したがって、映像データおよび音声データの出力待機時間(出力待ちの期間)は、例えば、チャンクのフレーム数を少なくすることにより、短くなる。例えば、映像・音声データ処理装置10は、図1で説明したように、映像領域32および音声領域34の少なくとも一方の空き容量が小さいとき、チャンクのフレーム数をGOPのフレーム数より少なくする。
Therefore, the video / audio
すなわち、この実施形態では、映像領域32および音声領域34の少なくとも一方の空き容量が小さいとき、チャンクのフレーム数をGOPのフレーム数より少なくすることにより、映像データおよび音声データの出力待ちの期間を短くできる。これにより、この実施形態では、映像領域32および音声領域34の一方からデータが出力されている期間(他方の出力待ちの期間)に、映像領域32および音声領域34の他方がオーバーフローすることを低減できる。すなわち、この実施形態では、映像データおよび音声データのオーバーフローを低減できる。
That is, in this embodiment, when the free space of at least one of the
図4は、チャンクCNKとランダムアクセスポイントRAPとの関係の一例を示している。なお、図4は、2つのGOPのフレームFRMvが1つのチャンクCNKvにまとめられたときの例を示している。図の太線で示したフレームFRMvは、IDRピクチャおよびIピクチャを示している。また、フレームFRMvは、映像データのフレームFRMを示し、フレームFRMaは、音声データのフレームFRMを示している。チャンクCNKvは、映像データのチャンクCNKを示し、チャンクCNKaは、音声データのチャンクCNKを示している。 FIG. 4 shows an example of the relationship between the chunk CNK and the random access point RAP. FIG. 4 shows an example in which two GOP frames FRMv are combined into one chunk CNKv. A frame FRMv indicated by a bold line in the figure indicates an IDR picture and an I picture. The frame FRMv indicates the frame FRM of the video data, and the frame FRMa indicates the frame FRM of the audio data. The chunk CNKv indicates the chunk CNK of the video data, and the chunk CNKa indicates the chunk CNK of the audio data.
なお、フレームFRMaの括弧内の数字は、括弧内の数字が同じフレームFRMvに対応していることを示している。例えば、フレームFRMa(1)は、フレームFRMv(1)に対応する音声データのフレームFRMである。また、チャンクCNKaの括弧内の数字は、括弧内の数字が同じチャンクCNKvに対応していることを示している。例えば、チャンクCNKa(1)は、チャンクCNKv(1)に対応する音声データのチャンクCNKである。 The numbers in parentheses of the frame FRMa indicate that the numbers in the parentheses correspond to the same frame FRMv. For example, the frame FRMa (1) is a frame FRM of audio data corresponding to the frame FRMv (1). The number in parentheses of chunk CNKa indicates that the numbers in parentheses correspond to the same chunk CNKv. For example, chunk CNKa (1) is a chunk CNK of audio data corresponding to chunk CNKv (1).
ランダムアクセスポイントRAPは、特定の位置からMP4ファイルを再生する際の復帰ポイントおよび再生ポイントを意味する。例えば、早送り再生の際に、ランダムアクセスポイントRAPが探索される。ランダムアクセスポイントRAPのフレームFRMv(サンプル)は、映像データの参照画像が不要なIDRピクチャやIピクチャに対応するフレームFRMである。また、ランダムアクセスポイントRAPのフレームFRMa(サンプル)は、映像データのIDRピクチャやIピクチャに対応する音声データのフレームFRMである。 The random access point RAP means a return point and a playback point when playing back an MP4 file from a specific position. For example, a random access point RAP is searched for during fast forward playback. The frame FRMv (sample) of the random access point RAP is a frame FRM corresponding to an IDR picture or an I picture that does not require a reference image of video data. The frame FRMa (sample) of the random access point RAP is an audio data frame FRM corresponding to the IDR picture or I picture of the video data.
例えば、フレームFRMv(1)、FRMv(n+1)、FRMv(m+1)は、映像データのランダムアクセスポイントRAPである。また、フレームFRMa(1)、FRMa(n+1)、FRMa(m+1)は、音声データのランダムアクセスポイントRAPである。ランダムアクセスポイントRAPの情報は、図2に示したムービーボックス(moov)B20内の“STSS”と呼ばれるボックスに格納される。 For example, frames FRMv (1), FRMv (n + 1), and FRMv (m + 1) are random access points RAP for video data. The frames FRMa (1), FRMa (n + 1), and FRMa (m + 1) are voice data random access points RAP. Information on the random access point RAP is stored in a box called “STSS” in the movie box (moov) B20 shown in FIG.
ボックス“STSS”に格納される情報(ランダムアクセスポイントRAPの情報)は、ランダムアクセスポイントRAPに対応するフレームFRMのサンプル番号(ファイルの先頭から数えた順番)である。例えば、映像データでは、フレームFRMv(1)、FRMv(n+1)等のサンプル番号(“1”、“n+1”等)がボックス“STSS”に格納される。また、例えば、音声データでは、フレームFRMa(1)、FRMa(n+1)等のサンプル番号(“チャンクCNKv(1)のフレーム数+1”、“チャンクCNKv(1)のフレーム数+n+1”等)がボックス“STSS”に格納される。 The information (random access point RAP information) stored in the box “STSS” is the sample number (the order counted from the top of the file) of the frame FRM corresponding to the random access point RAP. For example, in the video data, sample numbers (“1”, “n + 1”, etc.) such as frames FRMv (1), FRMv (n + 1) are stored in the box “STSS”. Also, for example, in the audio data, the sample numbers of frames FRMa (1), FRMa (n + 1), etc. (“number of frames of chunk CNKv (1) +1”, “number of frames of chunk CNKv (1) + n + 1”, etc.) are boxes. Stored in “STSS”.
図5は、チャンクCNKとランダムアクセスポイントRAPとの関係の別の例を示している。なお、図5は、1つのGOPのフレームFRMvが1つのチャンクCNKvにまとめられたときの例を示している。図の太線で示したフレームFRMvの意味は、図4と同じである。また、フレームFRMの括弧内の数字およびチャンクCNKの括弧内の数字の意味は、図4と同じである。 FIG. 5 shows another example of the relationship between the chunk CNK and the random access point RAP. FIG. 5 shows an example when the frame FRMv of one GOP is combined into one chunk CNKv. The meaning of the frame FRMv indicated by the bold line in the figure is the same as that in FIG. Further, the meanings of the numbers in parentheses of the frame FRM and the numbers in parentheses of the chunk CNK are the same as those in FIG.
図5の例では、1つのGOPのフレームFRMvが1つのチャンクCNKvにまとめられているため、チャンクCNKの先頭フレームFRMがランダムアクセスポイントRAPに対応する。MP4ファイルでは、チャンクCNKの先頭フレームFRMの位置を示す情報(ファイルの先頭からのオフセットアドレス)が、図2に示したムービーボックス(moov)B20内の“STCO”と呼ばれるボックスに格納される。このため、1つのチャンクCNKが1つのGOPに対応しているMP4ファイルでは、ランダムアクセスポイントRAPの探索を効率よく実施できる。 In the example of FIG. 5, since the frame FRMv of one GOP is combined into one chunk CNKv, the first frame FRM of the chunk CNK corresponds to the random access point RAP. In the MP4 file, information indicating the position of the top frame FRM of the chunk CNK (offset address from the top of the file) is stored in a box called “STCO” in the movie box (moov) B20 shown in FIG. For this reason, in the MP4 file in which one chunk CNK corresponds to one GOP, the random access point RAP can be efficiently searched.
したがって、例えば、映像領域32および音声領域34の空き容量が大きいときには、チャンク確定部20は、1つのチャンクCNKが1つのGOPに対応するように、各チャンクCNKのフレームFRMの数を設定する。なお、チャンクCNKのフレームFRMの数をGOPのフレーム数より少なくするとき、チャンク確定部20は、ランダムアクセスポイントRAPがチャンクCNKの先頭フレームFRMに対応するように、各チャンクCNKのフレームFRMの数を設定する。
Therefore, for example, when the free space of the
例えば、チャンク確定部20は、IピクチャあるいはIDRピクチャがチャンクCNKの先頭フレームFRMになるように、各チャンクCNKのフレームFRMの数を設定する。これにより、この実施形態では、ランダムアクセスポイントRAPの探索効率を向上できる。例えば、MP4ファイルを再生する装置では、ランダムアクセスポイントRAPを効率よく探索できる。
For example, the
また、チャンク確定部20は、チャンクCNKのフレームFRMの数をGOPのフレーム数より少なくするとき、MP4ファイルを再生する際の表示順序と符号化の処理順序との関係がチャンクCNK内で閉じるように、各チャンクCNKのフレームFRMの数を設定する。例えば、チャンク確定部20は、MP4ファイルを再生する際の表示順序にフレームFRMの順序を各チャンクCNK内で変更できるように、チャンクCNKのフレームFRMの数を設定する。これにより、この実施形態では、順序変更の対象フレームFRMの探索効率を向上できる。例えば、MP4ファイルを再生する装置では、フレームFRMの順序を表示順序にする際に、順序変更の対象フレームFRMを効率よく探索できる。
In addition, when the number of chunk CNK frames FRM is smaller than the number of GOP frames, the
図6は、メモリ30の占有量が閾値以上のときのチャンクCNKの一例を示している。すなわち、図6は、映像領域32の占有量が第1閾値以上である第1条件および音声領域34の占有量が第2閾値以上である第2条件の少なくとも一方を満たすときのチャンクCNKの一例を示している。なお、図6は、GOPがIBBP構造のときのチャンクCNKvの一例を示している。図の太線で示したフレームFRMvは、Iピクチャを示している。また、フレームFRMvの括弧内の数字は、符号化の処理順序を示している。
FIG. 6 shows an example of the chunk CNK when the occupation amount of the
図6の例では、GOPは、15個のフレームFRMを有している。IBBP構造のGOPでは、先ず、IピクチャのフレームFRMv(1)が符号化される。次に、BピクチャのフレームFRMv(2)、FRMv(3)が順次符号化される。そして、Pピクチャ、Bピクチャ、Bピクチャの順に符号化される処理が、フレームFRMv(4)−FRMv(15)まで繰り返される。例えば、フレームFRMv(3)の次に、PピクチャのフレームFRMv(4)が符号化される。フレームFRMv(4)の次に、BピクチャのフレームFRMv(5)、FRMv(6)が順次符号化される。 In the example of FIG. 6, the GOP has 15 frames FRM. In the GOP having the IBBP structure, first, a frame FRMv (1) of an I picture is encoded. Next, the frames FRMv (2) and FRMv (3) of the B picture are sequentially encoded. Then, the process of encoding the P picture, the B picture, and the B picture in order is repeated until the frame FRMv (4) -FRMv (15). For example, the frame FRMv (4) of the P picture is encoded after the frame FRMv (3). Next to the frame FRMv (4), the frames FRMv (5) and FRMv (6) of the B picture are sequentially encoded.
また、IBBP構造のGOPでは、MP4ファイルを再生したとき、BピクチャのフレームFRMvは、先に符号化処理が実施されたIピクチャやPピクチャのフレームFRMvより先に表示される。例えば、IピクチャのフレームFRMv(1)は、BピクチャのフレームFRMv(3)の次に表示される。そして、PピクチャのフレームFRMv(4)は、BピクチャのフレームFRMv(6)の次に表示される。 In the GOP having the IBBP structure, when the MP4 file is reproduced, the frame FRMv of the B picture is displayed before the frame FRMv of the I picture or the P picture that has been previously encoded. For example, the frame FRMv (1) of the I picture is displayed next to the frame FRMv (3) of the B picture. The P picture frame FRMv (4) is displayed next to the B picture frame FRMv (6).
したがって、IBBP構造のGOPでは、チャンクCNKvのフレームFRMvの数は、3の倍数に設定される。例えば、チャンク確定部20は、3の倍数のうち、2以上の最小値(図6では、“3”)に、チャンクCNKvのフレームFRMvの数を設定する。これにより、例えば、フレームFRMv(1)、FRMv(2)、FRMv(3)は、チャンクCNKv(1)として管理される。また、フレームFRMv(4)、FRMv(5)、FRMv(6)は、チャンクCNKv(2)として管理される。そして、フレームFRMv(13)、FRMv(14)、FRMv(15)は、チャンクCNKv(5)として管理される。
Therefore, in the GOP having the IBBP structure, the number of frames CRMv of the chunk CNKv is set to a multiple of 3. For example, the
このように、チャンク確定部20は、MP4ファイルを再生する際の表示順序にフレームFRMvの順序をチャンクCNKv内で変更可能なフレーム数のうち、2以上の最小値に、チャンクCNKvのフレーム数を設定する。なお、チャンクCNKvのフレーム数の設定は、この例に限定されない。例えば、1つのGOPは、フレームFRMv(1)−FRMv(6)のチャンクCNKvと、フレームFRMv(7)−FRMv(12)のチャンクCNKvと、フレームFRMv(13)−FRMv(15)のチャンクCNKvとにより管理されてもよい。
As described above, the
また、音声データのチャンクCNKaは、映像データのチャンクCNKvに対応するように設定される。例えば、チャンク確定部20は、チャンクCNKaのフレームFRMaの数を、チャンクCNKvのフレームFRMvの数と同じ数に設定する。
The audio data chunk CNKa is set to correspond to the video data chunk CNKv. For example, the
図7は、メモリ30の占有量が閾値以上のときのチャンクCNKの別の例を示している。なお、図7は、GOPがIPPP構造でGOPのフレーム数が奇数のときのチャンクCNKvの一例を示している。図の太線で示したフレームFRMvの意味は、図6と同じである。また、フレームFRMvの括弧内の数字の意味は、図6と同じである。
FIG. 7 shows another example of the chunk CNK when the occupation amount of the
図7の例では、GOPは、15個のフレームFRMを有している。IPPP構造のGOPでは、先ず、IピクチャのフレームFRMv(1)が符号化される。次に、PピクチャのフレームFRMv(2)−FRMv(15)が順次符号化される。また、IPPP構造のGOPでは、MP4ファイルを再生する際の表示順序は、符号化の処理順序と同じである。 In the example of FIG. 7, the GOP has 15 frames FRM. In the GOP having the IPPP structure, first, a frame FRMv (1) of an I picture is encoded. Next, the frames FRMv (2) -FRMv (15) of the P picture are sequentially encoded. In addition, in the GOP having the IPPP structure, the display order when reproducing the MP4 file is the same as the encoding processing order.
したがって、IPPP構造のGOPでは、例えば、チャンク確定部20は、チャンクCNKvのフレームFRMvの数を3に設定する。これにより、1つのGOPに含まれる複数のチャンクCNKvは、互いに同じ数のフレーム数に設定される。例えば、フレームFRMv(1)、FRMv(2)、FRMv(3)は、チャンクCNKv(1)として管理される。また、フレームFRMv(4)、FRMv(5)、FRMv(6)は、チャンクCNKv(2)として管理される。そして、フレームFRMv(13)、FRMv(14)、FRMv(15)は、チャンクCNKv(5)として管理される。
Accordingly, in the GOP having the IPPP structure, for example, the
なお、チャンクCNKvのフレームFRMvの数は、3以外の2以上の値に設定されてもよい。例えば、チャンク確定部20は、チャンクCNKvのフレームFRMvの数を5に設定してもよい。この実施形態では、チャンクCNKvのフレームFRMvの数を2以上に設定することにより、MP4ファイルのサイズが増加することを抑制している。
Note that the number of the frame FRMv of the chunk CNKv may be set to a value of 2 or more other than 3. For example, the
例えば、メッセージMESは、図3で説明したように、チャンクCNK毎に生成される。このため、チャンクCNKvのフレームFRMvの数を1に設定したとき、メッセージMESの数が増加し、メッセージMESの合計のサイズが増加する。メッセージMESは、図2に示したムービーボックス(moov)B20に格納される。このため、ムービーボックス(moov)B20のサイズが増加し、MP4ファイルのサイズが増加する。なお、この実施形態では、チャンクCNKvのフレームFRMvの数を2以上に設定するため、MP4ファイルのサイズが増加することを抑制できる。 For example, the message MES is generated for each chunk CNK as described with reference to FIG. For this reason, when the number of frames CRMv of chunk CNKv is set to 1, the number of message MESs increases and the total size of message MESs increases. The message MES is stored in the movie box (moov) B20 shown in FIG. For this reason, the size of the movie box (moov) B20 increases, and the size of the MP4 file increases. In this embodiment, since the number of frames FRMv of chunk CNKv is set to 2 or more, it is possible to suppress an increase in the size of the MP4 file.
また、音声データのチャンクCNKaは、映像データのチャンクCNKvに対応するように設定される。例えば、チャンク確定部20は、チャンクCNKaのフレームFRMaの数を、チャンクCNKvのフレームFRMvの数と同じ数に設定する。
The audio data chunk CNKa is set to correspond to the video data chunk CNKv. For example, the
図8は、メモリ30の占有量が閾値以上のときのチャンクCNKの別の例を示している。なお、図8は、GOPがIPPP構造でGOPのフレーム数が偶数のときのチャンクCNKvの一例を示している。図の太線で示したフレームFRMvの意味は、図6と同じである。また、フレームFRMvの括弧内の数字の意味は、図6と同じである。
FIG. 8 shows another example of the chunk CNK when the occupation amount of the
図8の例では、GOPは、16個のフレームFRMを有している。IPPP構造のGOPでは、先ず、IピクチャのフレームFRMv(1)が符号化される。次に、PピクチャのフレームFRMv(2)−FRMv(16)が順次符号化される。また、IPPP構造のGOPでは、MP4ファイルを再生する際の表示順序は、符号化の処理順序と同じである。 In the example of FIG. 8, the GOP has 16 frames FRM. In the GOP having the IPPP structure, first, a frame FRMv (1) of an I picture is encoded. Next, the frames FRMv (2) -FRMv (16) of the P picture are sequentially encoded. In addition, in the GOP having the IPPP structure, the display order when reproducing the MP4 file is the same as the encoding processing order.
したがって、IPPP構造のGOPでは、例えば、チャンク確定部20は、チャンクCNKvのフレームFRMvの数を2に設定する。これにより、1つのGOPに含まれる複数のチャンクCNKvは、互いに同じ数のフレーム数に設定される。例えば、フレームFRMv(1)、FRMv(2)は、チャンクCNKv(1)として管理される。また、フレームFRMv(3)、FRMv(4)は、チャンクCNKv(2)として管理される。フレームFRMv(5)、FRMv(6)は、チャンクCNKv(3)として管理される。そして、フレームFRMv(15)、FRMv(16)は、チャンクCNKv(8)として管理される。
Accordingly, in the GOP having the IPPP structure, for example, the
なお、チャンクCNKvのフレームFRMvの数は、2以外の2以上の値に設定されてもよい。例えば、チャンク確定部20は、チャンクCNKvのフレームFRMvの数を4に設定してもよいし、チャンクCNKvのフレームFRMvの数を8に設定してもよい。このように、この実施形態では、チャンクCNKvのフレームFRMvの数を2以上に設定するため、MP4ファイルのサイズが増加することを抑制できる。
Note that the number of frames CRMv of the chunk CNKv may be set to a value of 2 or more other than 2. For example, the
また、音声データのチャンクCNKaは、映像データのチャンクCNKvに対応するように設定される。例えば、チャンク確定部20は、チャンクCNKaのフレームFRMaの数を、チャンクCNKvのフレームFRMvの数と同じ数に設定する。
The audio data chunk CNKa is set to correspond to the video data chunk CNKv. For example, the
図9は、メモリ30の占有量が閾値以上のときのチャンクCNKの別の例を示している。なお、図9は、GOPがIBP構造のときのチャンクCNKvの一例を示している。図の太線で示したフレームFRMvの意味は、図6と同じである。また、フレームFRMvの括弧内の数字の意味は、図6と同じである。
FIG. 9 shows another example of the chunk CNK when the occupation amount of the
図9の例では、GOPは、16個のフレームFRMを有している。IBP構造のGOPでは、先ず、IピクチャのフレームFRMv(1)が符号化される。次に、BピクチャのフレームFRMv(2)が符号化される。そして、Pピクチャ、Bピクチャの順に符号化される処理が、フレームFRMv(3)−FRMv(16)まで繰り返される。例えば、フレームFRMv(2)の次に、PピクチャのフレームFRMv(3)が符号化される。フレームFRMv(3)の次に、BピクチャのフレームFRMv(4)が符号化される。 In the example of FIG. 9, the GOP has 16 frames FRM. In the GOP having the IBP structure, first, a frame FRMv (1) of an I picture is encoded. Next, the frame FRMv (2) of the B picture is encoded. Then, the process of encoding the P picture and the B picture in order is repeated until the frame FRMv (3) -FRMv (16). For example, the frame FRMv (3) of the P picture is encoded after the frame FRMv (2). Next to the frame FRMv (3), the frame FRMv (4) of the B picture is encoded.
また、IBP構造のGOPでは、MP4ファイルを再生したとき、BピクチャのフレームFRMvは、先に符号化処理が実施されたIピクチャやPピクチャのフレームFRMvより先に表示される。例えば、IピクチャのフレームFRMv(1)は、BピクチャのフレームFRMv(2)の次に表示される。そして、PピクチャのフレームFRMv(3)は、BピクチャのフレームFRMv(4)の次に表示される。 In the GOP having the IBP structure, when the MP4 file is reproduced, the frame FRMv of the B picture is displayed before the frame FRMv of the I picture or P picture that has been previously encoded. For example, the frame FRMv (1) of the I picture is displayed next to the frame FRMv (2) of the B picture. The P picture frame FRMv (3) is displayed next to the B picture frame FRMv (4).
したがって、IBP構造のGOPでは、チャンクCNKvのフレームFRMvの数は、2の倍数に設定される。例えば、チャンク確定部20は、2の倍数のうち、2以上の最小値(図9では、“2”)に、チャンクCNKvのフレームFRMvの数を設定する。これにより、例えば、フレームFRMv(1)、FRMv(2)は、チャンクCNKv(1)として管理される。また、フレームFRMv(3)、FRMv(4)は、チャンクCNKv(2)として管理される。フレームFRMv(5)、FRMv(6)は、チャンクCNKv(3)として管理される。そして、フレームFRMv(15)、FRMv(16)は、チャンクCNKv(8)として管理される。
Therefore, in the GOP having the IBP structure, the number of frames FRMv of the chunk CNKv is set to a multiple of 2. For example, the
なお、チャンクCNKvのフレームFRMvの数は、2以外の2の倍数に設定されてもよい。例えば、チャンク確定部20は、チャンクCNKvのフレームFRMvの数を4に設定してもよいし、チャンクCNKvのフレームFRMvの数を8に設定してもよい。このように、この実施形態では、チャンクCNKvのフレームFRMvの数を2以上に設定するため、MP4ファイルのサイズが増加することを抑制できる。
Note that the number of frames FRMv of the chunk CNKv may be set to a multiple of 2 other than 2. For example, the
また、音声データのチャンクCNKaは、映像データのチャンクCNKvに対応するように設定される。例えば、チャンク確定部20は、チャンクCNKaのフレームFRMaの数を、チャンクCNKvのフレームFRMvの数と同じ数に設定する。
The audio data chunk CNKa is set to correspond to the video data chunk CNKv. For example, the
図6−図9で説明したように、チャンク確定部20は、チャンクCNKのフレームFRMの数をGOPのフレーム数より少なくするとき、GOPの構造およびGOPのサイズ(フレーム数)に基づいて、チャンクCNKのフレーム数を設定する。
As described with reference to FIG. 6 to FIG. 9, when the number of frames FRM of the chunk CNK is smaller than the number of GOP frames, the
なお、映像・音声データ処理装置10の動作は、この例に限定されない。例えば、チャンク確定部20は、映像領域32および音声領域34の空き容量に応じて、チャンクCNKのフレーム数を段階的に変更してもよい。例えば、映像領域32の第1閾値および音声領域34の第2閾値の少なくとも一方は、複数の値を有してもよい。そして、チャンク確定部20は、複数の値と比較される占有量に応じて、チャンクCNKのフレーム数を段階的に変更してもよい。
The operation of the video / audio
例えば、チャンク確定部20は、映像領域32の閾値に複数の値を設定し、映像領域32の占有量と複数の値との比較結果に応じて、チャンクCNKのフレーム数を段階的に変更してもよい。あるいは、チャンク確定部20は、音声領域34の閾値に複数の値を設定し、音声領域34の占有量と複数の値との比較結果に応じて、チャンクCNKのフレーム数を段階的に変更してもよい。
For example, the
以上、この実施形態では、映像・音声データ処理装置10は、映像領域32および音声領域34の少なくとも一方の空き容量が小さいとき、チャンクのフレーム数をGOPのフレーム数より少なくする。例えば、チャンクCNKのフレーム数は、MP4ファイルを再生する際の表示順序と符号化の処理順序との関係がチャンクCNK内で閉じる条件と、IピクチャあるいはIDRピクチャがチャンクCNKの先頭フレームFRMになる条件との両方を満たす数に設定される。これにより、この実施形態では、ランダムアクセスポイントRAPの探索効率と順序変更の対象フレームFRMの探索効率とを向上できる。この結果、例えば、MP4ファイルを再生する装置では、ランダムアクセスポイントRAPを効率よく探索できる。また、例えば、MP4ファイルを再生する装置では、フレームFRMの順序を表示順序にする際に、順序変更の対象フレームFRMを効率よく探索できる。
As described above, in this embodiment, the video / audio
図10は、別の実施形態における映像・音声データ処理装置12の一例を示している。上述した実施形態で説明した要素と同一の要素については、同一の符号を付し、これ等については、詳細な説明を省略する。映像・音声データ処理装置12は、例えば、MP4ファイルを生成するシステムに、搭載される。
FIG. 10 shows an example of the video / audio
映像・音声データ処理装置12は、例えば、システム部22、メモリ30、データ符号化部40および多重化部50を有している。メモリ30は、例えば、映像領域32、音声領域34、設定領域36および付属情報領域38を有している。映像領域32および音声領域34は、上述した実施形態と同じである。設定領域36には、例えば、外部ホスト等により指定されるGOPの構造等が記憶される。付属情報領域38は、符号化された映像データVDAおよび音声データADAに関するヘッダ情報等が記憶される。なお、付属情報領域38は、映像データVDA用と音声データADA用とに分けられてもよい。
The video / audio
データ符号化部40は、例えば、映像データVDAおよび音声データADAを順次受け、受けた映像データVDAおよび音声データADAをMPEG−4等に準拠した符号化方式で順次符号化する。例えば、データ符号化部40は、符号化制御部42、映像符号化部44および音声符号化部46を有している。
For example, the data encoding unit 40 sequentially receives the video data VDA and the audio data ADA, and sequentially encodes the received video data VDA and audio data ADA by an encoding method compliant with MPEG-4 or the like. For example, the data encoding unit 40 includes an encoding control unit 42, a
符号化制御部42は、外部ホスト等により指定されたGOPの構造等を、メモリ30の設定領域36から取得する。そして、符号化制御部42は、取得したGOPの構造等を、映像符号化部44および音声符号化部46の符号化処理に反映させる。また、符号化制御部42は、例えば、映像データVDAの符号化に関するヘッダ情報を、映像符号化部44による1映像フレームの符号化に同期させて、メモリ30の付属情報領域38に格納する。映像データVDAの符号化に関するヘッダ情報は、例えば、GOPの構造、ピクチャタイプおよび1映像フレームのサイズである。さらに、符号化制御部42は、例えば、1映像フレームの符号化が完了したとき、1映像フレームの符号化が完了したことをシステム部22のシステム制御部26に通知する。
The encoding control unit 42 acquires the GOP structure specified by the external host or the like from the setting
また、符号化制御部42は、例えば、音声データADAの符号化に関するヘッダ情報を、音声符号化部46による1音声フレームの符号化に同期させて、メモリ30の付属情報領域38に格納する。さらに、符号化制御部42は、例えば、1音声フレームの符号化が完了したとき、1音声フレームの符号化が完了したことをシステム部22のシステム制御部26に通知する。
Also, the encoding control unit 42 stores, for example, header information related to encoding of the audio data ADA in the attached
映像符号化部44は、例えば、映像データVDAを順次受け、受けた映像データVDAをMPEG−4等に準拠した符号化方式で順次符号化し、符号化映像データVED(符号化された映像データVDA)を生成する。例えば、映像符号化部44は、符号化制御部42がメモリ30の設定領域36から取得したGOPの構造等に基づいて、映像データVDAを符号化する。そして、映像符号化部44は、符号化映像データVEDをメモリ30の映像領域32に格納する。
For example, the
音声符号化部46は、例えば、音声データADAを順次受け、受けた音声データADAをMPEG−4等に準拠した符号化方式で順次符号化し、符号化音声データAED(符号化された音声データADA)を生成する。そして、音声符号化部46は、符号化音声データAEDをメモリ30の音声領域34に格納する。
For example, the
システム部22は、例えば、多重化部50の制御およびメッセージMESの生成を実施する。例えば、システム部22は、チャンク確定部24、システム制御部26およびメッセージ生成部28を有している。システム制御部26は、1映像フレームの符号化の完了通知を符号化制御部42から受けたとき、映像データVDAの符号化に関するヘッダ情報を、メモリ30の付属情報領域38から取得する。すなわち、システム制御部26は、1映像フレームの符号化の完了に応答して、GOPの構造、ピクチャタイプおよび1映像フレームのサイズ等を取得する。そして、システム制御部26は、例えば、映像データVDAの符号化に関するヘッダ情報(GOPの構造、ピクチャタイプおよび1映像フレームのサイズ等)を、チャンク確定部24およびメッセージ生成部28に通知する。
For example, the
また、システム制御部26は、1音声フレームの符号化の完了通知を符号化制御部42から受けたとき、音声データADAの符号化に関するヘッダ情報を、メモリ30の付属情報領域38から取得する。そして、システム制御部26は、例えば、音声データADAの符号化に関するヘッダ情報を、チャンク確定部24およびメッセージ生成部28に通知する。
Further, when the
チャンク確定部24は、映像領域32の占有量および音声領域34の占有量をそれぞれ監視する。そして、チャンク確定部24は、映像領域32および音声領域34の少なくとも一方の空き容量が小さいとき、図6−図9で説明したように、GOPの構造およびピクチャタイプ等に基づいて、チャンクのフレーム数を設定する。
The chunk determination unit 24 monitors the occupation amount of the
例えば、チャンク確定部24は、システム制御部26から受けた映像データVDAの符号化に関するヘッダ情報および音声データADAの符号化に関するヘッダ情報に基づいて、チャンクのフレーム数を設定する。そして、チャンク確定部24は、例えば、設定したチャンクのフレーム数の情報(以下、チャンク設定通知とも称する)を、多重化部50の多重化制御部52にシステム制御部26を介して通知する。
For example, the chunk determination unit 24 sets the number of chunk frames based on the header information regarding the encoding of the video data VDA and the header information regarding the encoding of the audio data ADA received from the
メッセージ生成部28は、例えば、システム制御部26から受けた情報(GOPの構造、ピクチャタイプおよび1映像フレームのサイズ等)に基づいて、チャンクに対応するメッセージMESを生成する。そして、メッセージ生成部28は、生成したメッセージMESを、対応するチャンクの出力に同期させて、外部(例えば、図3に示した外部装置100)に出力する。
For example, the
多重化部50は、映像領域32および音声領域34にそれぞれ記憶された符号化映像データVEDおよび符号化音声データAEDを多重化して、外部(例えば、図3に示した外部装置100)に出力する。例えば、多重化部50は、多重化制御部52、入力部54、多重化バッファ56、暗号化部58および出力バッファ60を有している。
The multiplexing unit 50 multiplexes the encoded video data VED and the encoded audio data AED stored in the
多重化制御部52は、例えば、システム部22からの情報に基づいて入力部54等を制御する。例えば、多重化制御部52は、システム制御部26から受けるチャンク設定通知に応答して、入力部54を起動する。入力部54は、例えば、1チャンク分の符号化映像データVEDを映像領域32から読み出す処理と1チャンク分の符号化音声データAEDを音声領域34から読み出す処理とを、交互に実施する。なお、映像領域32および音声領域34から読み出された符号化映像データVEDおよび符号化音声データAEDは、多重化バッファ56に順次出力される。
For example, the multiplexing
多重化バッファ56は、入力部54から受けた符号化映像データVEDおよび符号化音声データAEDを、暗号化部58に順次出力する。これにより、暗号化部58は、1チャンク分の符号化映像データVEDおよび1チャンク分の符号化音声データAEDを交互に受ける。暗号化部58は、多重化バッファ56から受ける符号化映像データVEDおよび符号化音声データAEDを、順次暗号化する。暗号化の方式等は、例えば、システム部22により予め指定される。例えば、暗号化部58は、システム部22のシステム制御部26から多重化制御部52を介して、暗号化の方式等に関する情報を受ける。
The multiplexing
暗号化部58で暗号化された符号化映像データVEDおよび符号化音声データAEDは、出力バッファ60に順次出力される。すなわち、出力バッファ60は、暗号化された1チャンク分の符号化映像データVEDおよび暗号化された1チャンク分の符号化音声データAEDを交互に受ける。出力バッファ60は、暗号化された1チャンク分の符号化映像データVEDと暗号化された1チャンク分の符号化音声データAEDとを交互に出力する。
The encoded video data VED and encoded audio data AED encrypted by the
すなわち、出力バッファ60は、1チャンク分の符号化映像データVEDと1チャンク分の符号化音声データAEDとを多重化したストリームデータSDAを、外部(例えば、図3に示した外部装置100)に出力する。例えば、ストリームデータSDAおよびメッセージMESを受けた外部装置は、ストリームデータSDAおよびメッセージMESをMP4ファイルに格納し、MP4ファイルを生成する。
That is, the
このように、映像・音声データ処理装置12は、MPEG−4等に準拠したエンコーダとして機能する。なお、映像・音声データ処理装置12の構成は、この例に限定されない。例えば、映像・音声データ処理装置12は、符号化された映像データおよび音声データを復号する機能を有してもよい。すなわち、映像・音声データ処理装置12は、コーデックやトランスコーダとして機能するように形成されてもよい。
In this way, the video / audio
図11は、図10に示した映像・音声データ処理装置12の動作の一例を示している。図11の動作は、ハードウエアのみで実現されてもよく、ハードウエハをソフトウエアにより制御することにより実現されてもよい。
FIG. 11 shows an example of the operation of the video / audio
処理S100では、データ符号化部40は、入力データ(映像データVDAおよび音声データADA)を符号化し、符号化した入力データをメモリ30に書き込む。例えば、データ符号化部40の映像符号化部44は、映像データVDAを符号化して生成した符号化映像データVEDを、メモリ30の映像領域32に書き込む。また、例えば、データ符号化部40の音声符号化部46は、音声データADAを符号化して生成した符号化音声データAEDを、メモリ30の音声領域34に書き込む。
In process S <b> 100, the data encoding unit 40 encodes input data (video data VDA and audio data ADA) and writes the encoded input data into the
処理S110では、チャンク確定部24は、映像領域32および音声領域34の占有量が閾値以上か否かを判定する。例えば、チャンク確定部24は、システム制御部26から受けた1映像フレームのサイズ情報(符号化されたフレームのサイズ情報)を用いて、映像領域32の占有量を算出する。なお、チャンク確定部24は、映像領域32や音声領域34に対する書き込みアドレスや読み出しアドレスに基づいて、映像領域32や音声領域34の占有量を算出してもよい。
In the process S110, the chunk confirmation unit 24 determines whether the occupation amounts of the
そして、チャンク確定部24は、算出した占有量と映像領域32の閾値(以下、第1閾値とも称する)とを比較する。第1閾値は、例えば、映像領域32のサイズに基づいて、予め設定されている。なお、音声領域34の占有量と閾値(以下、第2閾値とも称する)との比較も、映像領域32の占有量と第1閾値との比較と同様の方法により実施される。第2閾値は、例えば、音声領域34のサイズに基づいて、予め設定されている。
Then, the chunk determination unit 24 compares the calculated occupation amount with a threshold value of the video area 32 (hereinafter also referred to as a first threshold value). The first threshold is set in advance based on the size of the
映像領域32の占有量が第1閾値以上である第1条件および音声領域34の占有量が第2閾値以上である第2条件の少なくとも一方を満たすとき(処理S110のYes)、チャンク確定部24の動作は、処理S130に移る。すなわち、映像領域32および音声領域34の空き容量が小さいとき、チャンク確定部24の動作は、処理S130に移る。第1条件および第2条件のいずれも満たさないとき(処理S110のNo)、チャンク確定部24の動作は、処理S120に移る。すなわち、映像領域32および音声領域34の空き容量が大きいとき、チャンク確定部24の動作は、処理S120に移る。
When at least one of the first condition in which the occupation amount of the
処理S120では、チャンク確定部24は、チャンクのフレーム数を、1GOPのフレーム数と同じ数に設定する。例えば、処理S120で設定されたチャンクのフレーム数の情報(チャンク設定通知)は、多重化部50に通知される。このように、映像領域32および音声領域34の空き容量が大きいときには、チャンクのフレーム数は、1GOPのフレーム数と同じ数に設定される。一方、映像領域32および音声領域34の空き容量が小さいときには、処理S130、S140において、チャンクのフレーム数は、1GOPのフレーム数より少ない数に設定される。
In the process S120, the chunk determination unit 24 sets the number of chunk frames to the same number as the number of frames of 1 GOP. For example, the information on the number of chunk frames (chunk setting notification) set in step S120 is notified to the multiplexing unit 50. As described above, when the free space in the
処理S130では、チャンク確定部24は、例えば、システム制御部26から受けた情報(GOPの構造、ピクチャタイプおよび1映像フレームのサイズ等)に基づいて、1チャンク当たりのフレーム数(“j”)を決定する。処理S140では、チャンク確定部24は、処理S130で決定したフレーム数(“j”)に、チャンクのフレーム数を設定する。例えば、チャンク確定部24は、処理S130で決定したチャンクのフレーム数の情報(チャンク設定通知)を、多重化部50に通知する。 In the process S130, the chunk determination unit 24, for example, based on information received from the system control unit 26 (GOP structure, picture type, size of one video frame, etc.), the number of frames per chunk (“j”) To decide. In the process S140, the chunk confirmation unit 24 sets the number of frames of the chunk to the number of frames (“j”) determined in the process S130. For example, the chunk determination unit 24 notifies the multiplexing unit 50 of information on the number of chunk frames determined in step S130 (chunk setting notification).
処理S150では、例えば、多重化部50は、処理S120、S140で設定されたチャンクに基づいて、符号化データ(符号化映像データVEDあるいは符号化音声データAED)を順次出力する。そして、例えば、システム制御部26は、1チャンク分の符号化データの出力が終了したか否かを判定する。1チャンク分の符号化データの出力が終了したとき(処理S150のYes)、処理S180において、メッセージ生成部28は、出力したチャンクに対応するメッセージMESを出力する。一方、1チャンク分の符号化データの出力が終了していないとき(処理S150のNo)、映像・音声データ処理装置12の動作は、処理S160に移る。
In the process S150, for example, the multiplexing unit 50 sequentially outputs encoded data (encoded video data VED or encoded audio data AED) based on the chunk set in the processes S120 and S140. For example, the
処理S160では、例えば、システム制御部26は、メモリ30の映像領域32および音声領域34のいずれかがオーバーフローしたか否かを判定する。なお、オーバーフローの判定は、システム制御部26以外のモジュール(例えば、チャンク確定部24)により実施されてもよい。メモリ30の映像領域32および音声領域34のいずれかがオーバーフローしたとき(処理S160のYes)、処理S170において、オーバーフローした領域(映像領域32や音声領域34)のデータが削除される。一方、メモリ30がオーバーフローしていないとき処理S160のNo)、映像・音声データ処理装置12の動作は、処理S150に戻る。
In the process S160, for example, the
このように、映像・音声データ処理装置12は、映像領域32および音声領域34の少なくとも一方の空き容量が小さいとき、チャンクのフレーム数をGOPのフレーム数より少なくする。なお、チャンクのフレーム数の条件は、上述した実施形態と同じである。また、映像・音声データ処理装置12の動作は、この例に限定されない。例えば、チャンク確定部24は、映像領域32および音声領域34の空き容量に応じて、チャンクのフレーム数を段階的に変更してもよい。
As described above, the video / audio
以上、この実施形態においても、上述した実施形態と同様の効果を得ることができる。 As described above, also in this embodiment, the same effect as that of the above-described embodiment can be obtained.
以上の詳細な説明により、実施形態の特徴点および利点は明らかになるであろう。これは、特許請求の範囲がその精神および権利範囲を逸脱しない範囲で前述のような実施形態の特徴点および利点にまで及ぶことを意図するものである。また、当該技術分野において通常の知識を有する者であれば、あらゆる改良および変更に容易に想到できるはずであり、発明性を有する実施形態の範囲を前述したものに限定する意図はなく、実施形態に開示された範囲に含まれる適当な改良物および均等物に拠ることも可能である。 From the above detailed description, features and advantages of the embodiments will become apparent. This is intended to cover the features and advantages of the embodiments described above without departing from the spirit and scope of the claims. Further, any person having ordinary knowledge in the technical field should be able to easily come up with any improvements and modifications, and there is no intention to limit the scope of the embodiments having the invention to those described above. It is also possible to rely on suitable improvements and equivalents within the scope disclosed in.
10、12‥映像・音声データ処理装置;20、24‥チャンク確定部;22‥システム部;26‥システム制御部;28‥メッセージ生成部;30‥メモリ;32‥映像領域;34‥音声領域;36‥設定領域;38‥付属情報領域;40‥データ符号化部;42‥符号化制御部;44‥映像符号化部;46‥音声符号化部;50‥多重化部;52‥多重化制御部;54‥入力部;56‥多重化バッファ;58‥暗号化部;60‥出力バッファ;100‥外部装置
DESCRIPTION OF
Claims (5)
符号化された音声データを記憶する第2記憶部と、
前記第1記憶部および前記第2記憶部のそれぞれの占有量を監視し、前記第1記憶部の占有量が所定の第1閾値以上である第1条件および前記第2記憶部の占有量が所定の第2閾値以上である第2条件の少なくとも一方を満たすとき、チャンクのフレーム数をGOP(Group Of Picture)のフレーム数より少なくするチャンク確定部と
を備えていることを特徴とする映像・音声データ処理装置。 A first storage unit for storing encoded video data;
A second storage unit for storing encoded audio data;
The occupation amounts of the first storage unit and the second storage unit are monitored, and the first condition that the occupation amount of the first storage unit is a predetermined first threshold or more and the occupation amount of the second storage unit are A chunk determination unit that reduces the number of frames of a chunk to be smaller than the number of frames of a GOP (Group Of Picture) when at least one of the second conditions equal to or greater than a predetermined second threshold is satisfied. Audio data processing device.
を特徴とする請求項1記載の動画像符号化装置。 The chunk determination unit sets the number of frames of the chunk so that the order of the frames can be changed within the chunk to a display order when the video data is reproduced. Video encoding device.
を特徴とする請求項2記載の映像・音声データ処理装置。 The chunk determination unit sets the number of frames of the chunk to a minimum value of 2 or more out of the number of frames in which the order of the frames can be changed in the chunk as a display order when reproducing the video data. The video / audio data processing apparatus according to claim 2.
前記チャンク確定部は、前記複数の値と比較される前記占有量に応じて前記チャンクの前記フレーム数を段階的に変更すること
を特徴とする請求項1記載の映像・音声データ処理装置。 At least one of the first threshold and the second threshold has a plurality of values,
The video / audio data processing device according to claim 1, wherein the chunk determination unit changes the number of frames of the chunk in a stepwise manner in accordance with the occupation amount compared with the plurality of values.
符号化された前記映像データを記憶する第1記憶部の占有量と所定の第1閾値とを比較し、
符号化された前記音声データを記憶する第2記憶部の占有量と所定の第2閾値とを比較し、
前記第1記憶部の占有量が前記第1閾値以上である第1条件および前記第2記憶部の占有量が前記第2閾値以上である第2条件の少なくとも一方を満たすとき、チャンクのフレーム数をGOP(Group Of Picture)のフレーム数より少なくすること
を特徴とするデータ多重化方法。 In a data multiplexing method for multiplexing encoded video data and encoded audio data,
Comparing the occupation amount of the first storage unit for storing the encoded video data with a predetermined first threshold;
Comparing the occupation amount of the second storage unit for storing the encoded audio data with a predetermined second threshold;
Number of chunk frames when the first storage unit occupies at least one of the first condition and the second storage unit occupy at least one of the second threshold and the second condition. The data multiplexing method is characterized in that the number of frames is less than the number of GOP (Group Of Picture) frames.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011129034A JP5678807B2 (en) | 2011-06-09 | 2011-06-09 | Video / audio data processing apparatus and data multiplexing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011129034A JP5678807B2 (en) | 2011-06-09 | 2011-06-09 | Video / audio data processing apparatus and data multiplexing method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2012257078A true JP2012257078A (en) | 2012-12-27 |
JP5678807B2 JP5678807B2 (en) | 2015-03-04 |
Family
ID=47528208
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011129034A Active JP5678807B2 (en) | 2011-06-09 | 2011-06-09 | Video / audio data processing apparatus and data multiplexing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5678807B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPWO2015034061A1 (en) * | 2013-09-06 | 2017-03-02 | 三菱電機株式会社 | Moving picture coding apparatus, moving picture transcoding apparatus, moving picture coding method, moving picture transcoding method, and moving picture stream transmission system |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002281443A (en) * | 2001-01-15 | 2002-09-27 | Sony Corp | Recorder and recording medium |
JP2004128938A (en) * | 2002-10-03 | 2004-04-22 | Matsushita Electric Ind Co Ltd | Av data recording/reproducing device and method |
JP2004343167A (en) * | 2003-05-13 | 2004-12-02 | Sony Corp | File recording apparatus and file recording method |
JP2007109329A (en) * | 2005-10-14 | 2007-04-26 | Canon Inc | Picture data recording apparatus, picture data reproducing apparatus, picture data recording method, program, and recording medium |
JP2007159058A (en) * | 2005-12-08 | 2007-06-21 | Canon Inc | Recording apparatus and recording method, and reproduction apparatus and reproduction method |
JP2009302637A (en) * | 2008-06-10 | 2009-12-24 | Sony Corp | Generating device, generating method, and program |
US20110243223A1 (en) * | 2008-12-10 | 2011-10-06 | Nilsson Michael E | Multiplexed video streaming |
-
2011
- 2011-06-09 JP JP2011129034A patent/JP5678807B2/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002281443A (en) * | 2001-01-15 | 2002-09-27 | Sony Corp | Recorder and recording medium |
JP2004128938A (en) * | 2002-10-03 | 2004-04-22 | Matsushita Electric Ind Co Ltd | Av data recording/reproducing device and method |
JP2004343167A (en) * | 2003-05-13 | 2004-12-02 | Sony Corp | File recording apparatus and file recording method |
JP2007109329A (en) * | 2005-10-14 | 2007-04-26 | Canon Inc | Picture data recording apparatus, picture data reproducing apparatus, picture data recording method, program, and recording medium |
JP2007159058A (en) * | 2005-12-08 | 2007-06-21 | Canon Inc | Recording apparatus and recording method, and reproduction apparatus and reproduction method |
JP2009302637A (en) * | 2008-06-10 | 2009-12-24 | Sony Corp | Generating device, generating method, and program |
US20110243223A1 (en) * | 2008-12-10 | 2011-10-06 | Nilsson Michael E | Multiplexed video streaming |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPWO2015034061A1 (en) * | 2013-09-06 | 2017-03-02 | 三菱電機株式会社 | Moving picture coding apparatus, moving picture transcoding apparatus, moving picture coding method, moving picture transcoding method, and moving picture stream transmission system |
Also Published As
Publication number | Publication date |
---|---|
JP5678807B2 (en) | 2015-03-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2474114B1 (en) | Method and system for simultaneous recording of multiple programs on a dvr | |
US20180367807A1 (en) | Iimage encoding apparatus, image encoding method, recording medium and program, image decoding apparatus, image decoding method, and recording medium and program | |
JP6908098B2 (en) | Information processing equipment and methods | |
JP5263901B2 (en) | Virtual reference decoder for multiview video coding | |
JP2006520986A (en) | CPI data for stream buffer channel | |
TWI584636B (en) | Method for decreasing the bit rate needed to transmit videos over a network by dropping video frames | |
JP5521940B2 (en) | Encoding method, decoding method, encoding device, and decoding device | |
EP2629476A1 (en) | Adaptive display streams | |
US20200351525A1 (en) | Communication apparatus, communication method, and computer-readable storage medium | |
JP2008072336A (en) | Decoding device and decoding method | |
US11356739B2 (en) | Video playback method, terminal apparatus, and storage medium | |
US10002644B1 (en) | Restructuring video streams to support random access playback | |
JP6258168B2 (en) | Distribution device, playback device, and distribution system | |
JP2011216965A (en) | Information processing apparatus, information processing method, reproduction apparatus, reproduction method, and program | |
JP5678807B2 (en) | Video / audio data processing apparatus and data multiplexing method | |
US20140369422A1 (en) | Remultiplexing Bitstreams of Encoded Video for Video Playback | |
KR20120019872A (en) | A apparatus generating interpolated frames | |
US7974523B2 (en) | Optimal buffering and scheduling strategy for smooth reverse in a DVD player or the like | |
JP4891894B2 (en) | Method and apparatus for generating menu | |
JP6221820B2 (en) | Encoding apparatus, encoding method, and encoding program | |
JP2018019195A (en) | Moving image formation method and moving image formation device | |
JP2018117308A (en) | Playback apparatus and control method of the same | |
US9716885B2 (en) | Encoding scheme | |
WO2023136907A1 (en) | Auxiliary mpds for mpeg dash to support prerolls, midrolls and endrolls with stacking properties | |
CN116847150A (en) | Ultrahigh-definition multimedia playing method and device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140303 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20141203 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20141209 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20141222 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5678807 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |