JP2005223617A - Data generation device and method, and program and computer readable storage medium - Google Patents
Data generation device and method, and program and computer readable storage medium Download PDFInfo
- Publication number
- JP2005223617A JP2005223617A JP2004029594A JP2004029594A JP2005223617A JP 2005223617 A JP2005223617 A JP 2005223617A JP 2004029594 A JP2004029594 A JP 2004029594A JP 2004029594 A JP2004029594 A JP 2004029594A JP 2005223617 A JP2005223617 A JP 2005223617A
- Authority
- JP
- Japan
- Prior art keywords
- time stamp
- offset
- time
- accuracy
- data
- 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.)
- Withdrawn
Links
Images
Landscapes
- Studio Devices (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Television Signal Processing For Recording (AREA)
Abstract
Description
本発明は、時間軸を持ついわゆるマルチメディア・データ、すなわち、音声や動画を含むデータ、あるいは、MPEG−4およびこれと同様の符号化形式によるデータ表現機構を持つ類似のマルチメディア符号化方式(以下、単にMPEG−4とする)のデータ生成装置に関するものである。 The present invention relates to so-called multimedia data having a time axis, that is, data including audio and moving images, or a similar multimedia coding system having a data representation mechanism based on MPEG-4 and a similar coding format ( Hereinafter, the data generation apparatus is simply MPEG-4).
近年、デジタル・スチル・カメラやデジタル・ビデオ・カメラ、あるいは携帯電話などの普及により、コンピュータ上で主に利用されてきた所謂マルチメディアが、様々な機器で手軽に利用出来るようになってきた。このようなマルチメディアの普及に伴い、ISO/IECで標準化がなされているMPEG−4をはじめとして、様々な記録形式が利用されている。 In recent years, with the spread of digital still cameras, digital video cameras, mobile phones, and the like, so-called multimedia that has been mainly used on computers has become easy to use on various devices. With the spread of such multimedia, various recording formats such as MPEG-4 standardized by ISO / IEC are used.
たとえば、このMPEG−4は、ISO/IEC14496として標準化がなされているが、一般に巨大になりがちな動画像をより小さな記録形式に圧縮し、通信や記録装置のリソースの制約に対応することも目的のひとつになっている。このため、MPEG−4では、より高品位な圧縮を行うために可変フレームレートの符号化も行えるようになっている。 For example, this MPEG-4 is standardized as ISO / IEC 14496, but in general, it is also possible to compress moving images, which tend to be huge, to a smaller recording format, and to cope with resource limitations of communication and recording devices. It has become one of Therefore, in MPEG-4, variable frame rate encoding can be performed in order to perform higher-quality compression.
一方で、こうした符号化にも対応するために、その符号化データを格納するファイル形式はより複雑になってきている。固定フレームレートであれば、各フレームのフレームレートをひとつ記録しておくだけで、すべてのフレームの再生すべき時間を特定することができたが、可変フレームレートの場合には、各フレームの再生すべき時間をすべて記録しなければならないといった事は、その端的な例である。 On the other hand, in order to cope with such encoding, the file format for storing the encoded data has become more complicated. With a fixed frame rate, it was possible to specify the time to play back all the frames by simply recording one frame rate for each frame. The fact that we have to record all the time we should do is a straightforward example.
各フレームの再生すべき時間は、一般的にタイムスタンプと呼ばれるが、もし、このタイムスタンプをすべてファイルなどに記録しようとすれば、現実には多大な記憶領域が消費されることになる。たとえば、マイクロコンピュータにおいて通常利用される16ビット幅の記憶域をタイムスタンプの記録に使用すると、1ミリ秒を最小とする単位では、高々1分程度までしか記録できない。32ビット幅の記憶域を使えばこの問題は大きく改善されるが、その代わりに1フレームあたり4バイトの記憶域が必要であるため、1秒あたり30フレーム程度の画像では、1時間の記録に432KB(キロバイト)を消費してしまう。 The time that each frame should be reproduced is generally called a time stamp. However, if all the time stamps are recorded in a file or the like, a large storage area is actually consumed. For example, if a 16-bit wide storage area normally used in a microcomputer is used for time stamp recording, recording can be performed only at most about 1 minute in a unit of 1 millisecond minimum. This problem is greatly improved by using a 32-bit storage area, but instead, a storage area of 4 bytes per frame is required, so an image of about 30 frames per second can be recorded for 1 hour. 432KB (kilobytes) will be consumed.
このような問題は以前よりよく知られていたため、MPEG−4における標準ファイル形式のMP4においても、フレームとフレームの間の時間差、すなわちタイムスタンプの差違を記録するといった工夫がなされている。タイムスタンプの差違は、特に固定フレームレートである場合には、理論的に一定の値になり、タイムスタンプの差違とともにそれが連続する個数を記録することで大幅に記憶域を削減できる可能性がある。このような手法は、データ圧縮の観点からは連長圧縮(ランレングス圧縮)と呼ばれるものであり、時系列的に圧縮する際には簡単かつ負荷の小さな方法として優れている。 Since such a problem has been known more than before, the MP4 of the standard file format in MPEG-4 has been devised to record the time difference between frames, that is, the time stamp difference. The difference in time stamps is theoretically a constant value, especially at a fixed frame rate, and there is a possibility that the storage area can be greatly reduced by recording the number of consecutive time stamp differences. is there. Such a method is called continuous length compression (run-length compression) from the viewpoint of data compression, and is excellent as a simple and light load method for time-series compression.
このような手法について、その効果を検討するためには、簡単な例を考えればよい。たとえば、フレームレートが1秒あたり10フレーム(これを10fps、または、10Hzと言う)であって、1ミリ秒の単位でタイムスタンプが得られる場合には、各フレームのタイムスタンプは先頭から順に、0、100、200、300のようになって、タイムスタンプ間の差違は、常に100である。もし、10秒のデータであれば全体として100フレームあるため、その差違の数は99個となり、99個のタイムスタンプの差違100ミリ秒が存在する事を記録すればこれを十分に表現できる。 In order to examine the effect of such a method, a simple example may be considered. For example, if the frame rate is 10 frames per second (referred to as 10 fps or 10 Hz) and the time stamp is obtained in units of 1 millisecond, the time stamp of each frame is in order from the top, The difference between time stamps is always 100, such as 0, 100, 200, 300. If the data is 10 seconds, there are 100 frames as a whole. Therefore, the number of differences is 99, and it can be sufficiently expressed by recording that there are 99 time stamp differences of 100 milliseconds.
例として4バイトの記憶域をすべてのデータに適用するならば、すべてのタイムスタンプを記憶するために必要な記憶域は400バイトであり、一方、連長圧縮の場合には、8バイトに過ぎない。 As an example, if 4 bytes of storage is applied to all data, the storage required to store all the time stamps is 400 bytes, whereas in the case of run length compression, it is only 8 bytes. Absent.
このように、タイムスタンプの差違を連長圧縮で記録する方法は、可変フレームレートの場合にはすべてのタイムスタンプの差違を確実に記録する一方で、固定フレームレートの場合には、その記憶域を大幅に圧縮することが可能である。 As described above, the method of recording the time stamp difference by continuous length compression reliably records all time stamp differences in the case of the variable frame rate, while the storage area in the case of the fixed frame rate. Can be significantly compressed.
ところで、MPEG−4における標準ファイル形式のMP4をはじめとするいくつかの記録形式では、タイムスタンプの最小単位をタイムスケールという概念で表現する。 By the way, in some recording formats including the standard file format MP4 in MPEG-4, the minimum unit of time stamp is expressed by the concept of time scale.
タイムスケールはあらかじめ定められた任意の時間単位を任意の数で割ることによって、分割した時間の長さを時間の最小単位とする場合に、その分割数で表すものである。通常はこの任意の時間単位を1秒とし、たとえば、タイムスケールが1000であることは、1秒を1000分割して得られる1ミリ秒を最小単位とする事を意味している。 The time scale is expressed by the number of divisions when a predetermined time unit is divided by an arbitrary number to set the divided time length as the minimum unit of time. Normally, this arbitrary time unit is 1 second. For example, a time scale of 1000 means that 1 millisecond obtained by dividing 1 second into 1000 is the minimum unit.
なお、以下では、特にことわりの無い限り、タイムスケールで基準となるこのあらかじめ定められた任意の時間単位を簡単のため、一般的な1秒と仮定する。また、タイムスタンプ間の差違をタイムスタンプのオフセットという表現で表す場合がある。 In the following description, unless otherwise specified, it is assumed that this predetermined arbitrary time unit which is a reference in the time scale is 1 second for the sake of simplicity. In addition, a difference between time stamps may be expressed as a time stamp offset.
このタイムスケールの概念を利用する場合、タイムスタンプやタイムスタンプの差違は、このタイムスケールによって表現される。タイムスケールが1000であって、かつ、タイムスタンプの差違が100であれば、1ミリ秒を最小単位とするタイムスタンプの差違は、100ミリ秒を意味する。一方で、タイムスケールが半分の500であれば、1秒を500分割して得られる2ミリ秒を最小単位とすることになる。よって、タイムスタンプの差違が100であれば、2ミリ秒を最小単位とするタイムスタンプの差違は、200ミリ秒を意味する。 When this time scale concept is used, time stamps and time stamp differences are expressed by this time scale. If the time scale is 1000 and the time stamp difference is 100, the time stamp difference with a minimum unit of 1 millisecond means 100 milliseconds. On the other hand, if the time scale is 500, which is half, 2 milliseconds obtained by dividing 1 second into 500 is the minimum unit. Therefore, if the time stamp difference is 100, the time stamp difference having a minimum unit of 2 milliseconds means 200 milliseconds.
こうした工夫によって、任意の時間の単位をタイムスタンプなどの記述に使用する事が可能になり、より柔軟で高精度な記録が行えるようになっている。
最も単純な例は、フレームレートが10fpsである場合に、タイムスケールを10とするような場合である。すなわち、1秒間に10フレームのデータがある場合、1秒を10分割した時間単位で記録することにより、タイムスタンプの差違は1であるとすることができる。この事は、理想的には極めて正確なタイムスタンプの記録を行える事を意味している。
Such a device makes it possible to use an arbitrary unit of time for the description of time stamps and the like, and it enables more flexible and highly accurate recording.
The simplest example is when the time scale is 10 when the frame rate is 10 fps. That is, when there are 10 frames of data per second, the difference in time stamps can be set to 1 by recording in units of time obtained by dividing 1 second into 10 units. This means that ideally a very accurate time stamp can be recorded.
さて、上述した可変フレームレートに対応したタイムスタンプの記録形式ではあるが、特に可変フレームレートの場合には、依然としてタイムスタンプの記録が符号化データに依存して大きくなってしまうという問題が残されている。タイムスタンプ間の差違(タイムスタンプのオフセット)は、符号化データによって変化するため、たまたまタイムスタンプ間の差違(タイムスタンプのオフセット)が連続して同じで無い場合には、連長圧縮の効果が現れないためである。 Although the time stamp recording format corresponds to the variable frame rate described above, particularly in the case of the variable frame rate, the problem remains that the time stamp recording becomes large depending on the encoded data. ing. Since the difference between time stamps (time stamp offset) varies depending on the encoded data, if the difference between time stamps (time stamp offset) does not happen to be the same in succession, the effect of continuous length compression will be effective. This is because it does not appear.
このような問題に対応するために、たとえば、特開2002−238050号公報では、一定のタイムスタンプがあたかも発生しているかのように空のフレームを挿入する方法などが提案されている。この方法は、言うなれば、可変フレームレートの符号化データを固定フレームレートでの論理的なタイムスタンプで表現しようとする、可変フレームレートから固定フレームレートへの変換機構を備えたデータ生成装置である。
固定フレームレートに変換することによって発生する、実際にはフレームの存在しないタイムスタンプは、非更新を示す情報を有する符号化データとして符号化データを格納することにより、有意なタイムスタンプとして利用出来る。或いはまた、サイズ0のフレームとして記録されるよう制御することにより、あたかも固定フレームレートであるかのように振る舞うことが出来ることになる。
In order to cope with such a problem, for example, Japanese Patent Laid-Open No. 2002-238050 proposes a method of inserting an empty frame as if a certain time stamp has occurred. In other words, this method is a data generation apparatus having a conversion mechanism from a variable frame rate to a fixed frame rate, in which encoded data at a variable frame rate is expressed by a logical time stamp at a fixed frame rate. is there.
A time stamp that does not actually have a frame and is generated by converting to a fixed frame rate can be used as a significant time stamp by storing the encoded data as encoded data having information indicating non-update. Alternatively, by controlling to record as a frame of size 0, it can behave as if it is a fixed frame rate.
また、特開2003-143550によれば、固定フレームレートであっても、オペレーティング・システム(OS)またはクロック(時計)装置の精度などによっては、必ずしも正確なタイムスタンプを付与できない場合への対策として、隣り合うフレーム間のタイムスタンプの差異が一定の誤差の範囲にある場合に、これを論理的なタイムスタンプと置き換える方法がある。 Also, according to Japanese Patent Laid-Open No. 2003-143550, as a countermeasure for a case where an accurate time stamp cannot be given even at a fixed frame rate, depending on the accuracy of an operating system (OS) or a clock (clock) device. There is a method of replacing a time stamp difference between adjacent frames with a logical time stamp when the difference is within a certain error range.
上述したように、従来の技術によれば、様々な工夫によって、可変フレームレートやクロック(時計)装置の誤差にも対応しながらより小さな記憶域でのタイムスタンプの格納を伴う記録が可能となるという長所がある。
しかしながら、依然として一般的に使われる固定フレームレートであっても、実際に発生するタイムスタンプの精度と論理的なタイムスタンプの精度によっては、必ずしもタイムスタンプ間の差違(タイムスタンプのオフセット)が一定ではない場合があり、そのような場合には、連長圧縮の効果が十分に現れないという問題がある。 However, even if the fixed frame rate is still generally used, the difference between the time stamps (timestamp offset) is not always constant depending on the accuracy of the actual time stamp and the logical time stamp. In such a case, there is a problem that the effect of continuous length compression is not sufficiently exhibited.
具体的に説明すると、たとえば、あらかじめ15fpsとして設定したフレームレートで各フレームを生成する場合、フレームのタイムスタンプは、これを生成するオペレーティング・システム(OS)またはクロック(時計)装置の精度によって、必ずしも正確ではない。たとえば、オペレーティング・システム(OS)またはクロック(時計)装置が処理する時間単位によるタイムスケール(これを便宜上、システム・タイムスケールと呼ぶものとする)が、1000、すなわち1ミリ秒である場合、1秒間に15フレームが処理されることから、タイムスタンプは、1000ミリ秒を15で割った値である約66.7ミリ秒毎に発生する。この約66.7ミリ秒はシステム・タイムスケールの精度より高い精度を必要とする。タイムスタンプがフレームデータの取り込みタイミングで生成されるにせよ、フレームデータの符号化時に計算で求められるにせよ、この約66.7ミリ秒が基準となるならば、タイムスタンプの整数化過程において、誤差が発生することは明らかである。 More specifically, for example, when each frame is generated at a frame rate set in advance as 15 fps, the time stamp of the frame may not necessarily depend on the accuracy of the operating system (OS) or clock (clock) device that generates the frame. it's not correct. For example, if the time scale in units of time processed by an operating system (OS) or clock device (referred to as system time scale for convenience) is 1000, ie 1 millisecond, 1 Since 15 frames are processed per second, a time stamp occurs approximately every 66.7 milliseconds, which is 1000 milliseconds divided by 15. This approximately 66.7 milliseconds requires a higher accuracy than the system time scale accuracy. Regardless of whether the time stamp is generated at the time of capturing the frame data or is calculated at the time of encoding the frame data, if this about 66.7 milliseconds is used as a reference, Obviously, errors will occur.
この様な誤差は、従来の技術で説明したように、この例に従って言えば、タイムスケールをフレームレートに等しい値である15にする事によって解決されるが、一方で、タイムスタンプを発生させる手段が、システム・タイムスケールで処理される場合には不都合である。 Such an error can be solved by setting the time scale to 15 which is equal to the frame rate according to this example, as described in the prior art. Is inconvenient when processed on the system time scale.
このように、従来手法によれば、MP4のような連長圧縮によるタイムスタンプの格納方式においては、タイムスタンプの精度によっては、タイムスタンプの格納テーブルが肥大化して、格納効率が低下してしまうという問題がある。
また、特に実時間でファイルに順次フレームを書き出すといった処理においては、一時記憶メモリーに格納されるタイムスタンプの格納テーブルが肥大化すると、小さなメモリーしか持たない制約のあるデバイスでは、そのメモリー使用量も肥大化してしまうという問題も発生する。結果として、あらかじめ予想できない一時記憶メモリーの肥大化は、処理機器自体の予期しないメモリーの圧迫を招く可能性があり、重大な処理異常を誘発する事も起こりうる。
As described above, according to the conventional method, in the time stamp storage method using continuous length compression such as MP4, the time stamp storage table is enlarged depending on the accuracy of the time stamp, and the storage efficiency is lowered. There is a problem.
Also, especially in the process of sequentially writing frames to a file in real time, if the time stamp storage table stored in the temporary storage memory is enlarged, the memory usage will also be reduced in devices with restrictions that have only a small memory. The problem of enlargement also occurs. As a result, the unexpected enlargement of the temporary storage memory may lead to unexpected memory pressure on the processing equipment itself, and may cause a serious processing abnormality.
本発明は、かかる問題点を解消するためになされたもので、ビデオや音声などのマルチメディアデータを入力する際に、視覚的に劣化のない正確なタイムスタンプを維持しながら、データ格納ファイルサイズを効率的に縮小することができるデータ生成装置を提供することを目的とするものである。 The present invention has been made to solve such a problem. When inputting multimedia data such as video and audio, the data storage file size is maintained while maintaining an accurate time stamp without visual deterioration. It is an object of the present invention to provide a data generation device that can efficiently reduce the size of the data.
以上の課題を解決するために、本発明によるデータ生成装置は、符号化データを格納する格納手段と、前記符号化データからタイムスタンプを読み取るタイムスタンプ読取手段と、前記符号化データのフレームレートと前記タイムスタンプに係る第1のクロック精度とに基づいて、第2のクロック精度を提供するための高精度タイムスケールを計算するタイムスケール計算手段と、前記符号化データ内の2フレーム間の前記タイムスタンプの理論的オフセットである第1のオフセットと、前記高精度タイムスケールにおける2フレーム間の高精度タイムスタンプの理論的オフセットである第2のオフセットを計算するオフセット計算手段と、前記第1及び第2のオフセットの対応関係に基づいて、前記符号化データのタイムスタンプを、前記高精度タイムスタンプに変換するタイムスタンプ変換手段と、前記高精度タイムスタンプを用いてタイムスタンプテーブルを生成するタイムスタンプテーブル生成手段と、を備えることを特徴とする。 In order to solve the above problems, a data generation apparatus according to the present invention includes a storage unit that stores encoded data, a time stamp reading unit that reads a time stamp from the encoded data, and a frame rate of the encoded data. Time scale calculating means for calculating a high-accuracy time scale for providing a second clock accuracy based on the first clock accuracy related to the time stamp, and the time between two frames in the encoded data Offset calculating means for calculating a first offset that is a theoretical offset of a stamp, and a second offset that is a theoretical offset of a high-accuracy time stamp between two frames in the high-accuracy time scale; 2 based on the correspondence relationship of the offset of 2, the time stamp of the encoded data is A time stamp converter for converting the precision timestamp, characterized in that it comprises a time stamp table generating means for generating a time stamp table, and using the high precision time stamp.
さらなる本発明の特徴は、以下に説明する各実施形態及び添付図面によって明らかにされる。 Further features of the present invention will become apparent from the embodiments described below and the accompanying drawings.
本発明によれば、論理的に誤差の発生しない高精度なタイムスタンプを生成する事が可能になり、視覚的に劣化のない正確なタイムスタンプを維持しながらタイムスタンプの格納テーブルの格納効率を向上させることができ、格納ファイルのファイルサイズを効率的に縮小することができる。 According to the present invention, it is possible to generate a high-accuracy time stamp that is logically free of errors, and the storage efficiency of the time stamp storage table can be improved while maintaining an accurate time stamp that is not visually deteriorated. The file size of the stored file can be effectively reduced.
また、このことにより結果として、小さなメモリーしか持たない制約のあるデバイスにおいても、メモリー圧迫による重大な処理異常を誘発する可能性を小さくすることが可能となる。 As a result, even in a restricted device having only a small memory, it is possible to reduce the possibility of inducing a serious processing abnormality due to memory compression.
<第1の実施形態>
以下、本発明に係る第1の実施形態について、図1〜図6を用いて説明する。
はじめに、実施の形態に好適な動画・音声の記録を行うマルチメディア・データ多重化装置の一例について説明をおこなう。図1は、このようなマルチメディア・データ多重化装置の概略を示すブロック図の例である。
<First Embodiment>
Hereinafter, a first embodiment according to the present invention will be described with reference to FIGS.
First, an example of a multimedia data multiplexing apparatus for recording moving images / sounds suitable for the embodiment will be described. FIG. 1 is an example of a block diagram showing an outline of such a multimedia data multiplexing apparatus.
ブロック図に示すマルチメディア・データ多重化装置は、撮影装置101、A/D変換装置102、撮像処理装置(エンコーダ)103、クロック(時計)装置104、CPU105、データ変換装置106、一時記憶装置(メモリ)107、メモリ・バスコントローラ装置108、記録媒体I/F装置109、記録媒体110から構成されている。
このマルチメディア・データ多重化装置によれば、一般的に撮影レンズやシャッタ、撮像装置などによる撮影装置101で撮影した画像を、A/D変換装置102によりアナログ・デジタル変換することによって得られたデジタル画像を適切に処理することによって、マルチメディア・データの多重化をおこなったマルチメディア・データとして、記録することができる。
The multimedia data multiplexing apparatus shown in the block diagram includes an
According to this multimedia data multiplexing device, it is generally obtained by analog / digital conversion of an image photographed by the photographing
A/D変換装置102でデジタル化された画像データは、CPU105からの適切な制御により、撮像処理装置(エンコーダ)103において、例えばMPEG−4のビデオ符号化処理を行って、本発明になるデータ変換装置106に順次受け渡されていく。この時の時間的制御は、クロック(時計)装置104によって発生される計時信号によってそのタイミングが決定され、マルチメディア・データには所謂タイムスタンプが付与される。
The image data digitized by the A /
この時に撮像処理装置(エンコーダ)103が処理するフレームの1秒あたりの枚数がフレームレートである。 At this time, the frame rate is the number of frames processed per second by the imaging processor (encoder) 103.
メモリ・バスコントローラ装置108により制御される一時記憶装置(メモリ)107は、符号化データの一部を一時的に保管することに使われるだけでなく、本発明の処理に使用されるタイムスタンプ・テーブルの一時記憶などにも利用される。また、符号化処理などをおこなって、マルチメディア・データの多重化の処理による結果をデータファイルとして書き出す際にも同様に、メモリ・バスコントローラ装置108により制御される記録媒体I/F装置109を介し、記録媒体110に記録される。
The temporary storage device (memory) 107 controlled by the memory /
本発明の本質は、このブロック図におけるデータ変換装置106にある。
The essence of the present invention resides in the
なお、図1に示すマルチメディア・データ多重化装置のブロック図は、デジタルカメラのようなレンズをもった撮影装置を有する例として記述しているが、たとえばビデオ・レコーダのような据え置きの記録装置のようなものであってもよい。また、デジタルカメラであっても、本ブロック図においては、説明上必要のない操作部やメカ駆動部といった関連部位を省略している。 The block diagram of the multimedia data multiplexing apparatus shown in FIG. 1 is described as an example having a photographing apparatus having a lens such as a digital camera, but a stationary recording apparatus such as a video recorder, for example. It may be something like this. Even in the case of a digital camera, in this block diagram, related parts such as an operation unit and a mechanical drive unit that are not necessary for explanation are omitted.
次に、このようなマルチメディア・データ多重化装置により、特に動画像を記録する場合を使って、詳細な説明を行う。 Next, detailed description will be given using such a multimedia data multiplexing apparatus, particularly using a case where a moving image is recorded.
一般に、動画像のフレームレートが動的に変化しない所謂固定フレームレートで動画像が生成される場合、当該フレームレートはあらかじめ設定済みであって、記録装置はこれを知ることが出来ると仮定してよい。 In general, when a moving image is generated at a so-called fixed frame rate at which the frame rate of the moving image does not change dynamically, it is assumed that the frame rate is set in advance and the recording apparatus can know this. Good.
ここでは、説明のために便宜上、本記録装置が動作するオペレーティング・システム(OS)またはクロック(時計)装置が処理するタイムスケールを1000とする。このような装置上のタイムスケールをここではシステム・タイムスケールと呼ぶものとする。
なお、従来技術の説明において述べた通り、タイムスケールで基準となるあらかじめ定められた任意の時間単位を一般的な1秒と仮定している。
Here, for convenience of explanation, it is assumed that the time scale processed by the operating system (OS) or clock (clock) device in which the recording apparatus operates is 1000. Such a time scale on the apparatus is referred to herein as a system time scale.
Note that, as described in the description of the prior art, an arbitrary predetermined time unit serving as a reference on the time scale is assumed to be a general one second.
ここで説明する実施の形態では、最初に、このフレームレートとシステム・タイムスケールの最小公倍数を計算することにより、実際の最小の時間単位とは異なる高精度なシステム・タイムスケールを求める。この計算された高精度なシステム・タイムスケールは、場合によっては実際のシステム・タイムスケールより小さな時間単位を与えることがある。こうしたことの詳細については順次説明していく。 In the embodiment described here, first, a high-accuracy system time scale different from the actual minimum time unit is obtained by calculating the least common multiple of the frame rate and the system time scale. This calculated high accuracy system time scale may in some cases give smaller time units than the actual system time scale. Details of these will be explained in turn.
最小公倍数の計算は、どのような方法を用いてもよいが、たとえば一般的によく知られた方法として、ユークリッドの互除法により最大公約数を求めてから最小公倍数を計算する方法がある。ユークリッドの互除法は、広く知られたアルゴリズムであるのでここでは特に詳細な説明を省略するが、簡単に言うならば、2数の剰余をもとめ、その結果を再帰的に計算して0になるまで繰り返すことによって最大公約数を得る事ができる。最小公倍数は、2数の積をこの最大公約数で割った結果である。 Any method may be used for the calculation of the least common multiple. For example, as a generally well-known method, there is a method of calculating the least common multiple after obtaining the greatest common divisor by the Euclidean algorithm. Since the Euclidean algorithm is a widely known algorithm, a detailed description thereof is omitted here. However, simply speaking, a remainder of two numbers is obtained and the result is recursively calculated to be 0. The greatest common divisor can be obtained by repeating the above. The least common multiple is the result of dividing the product of two by this greatest common divisor.
より具体的な実例を挙げて説明する。たとえば、フレームレートが15フレーム/秒(fps)であった場合、システム・タイムスケールが1000であるので、その最小公倍数は3000となる。この3000が計算された高精度なシステム・タイムスケールであり、以降、高精度システム・タイムスケールと呼ぶ。 A description will be given with a more specific example. For example, if the frame rate is 15 frames / second (fps), the system time scale is 1000, so the least common multiple is 3000. This 3000 is the calculated high-accuracy system time scale, and is hereinafter referred to as the high-accuracy system time scale.
実際には、この高精度システム・タイムスケールは必ずしもこの最小公倍数ではなく、その整数倍であっても本発明は有効に動作する。この点については、あとに述べるように、本発明の本質から明らかである。 In practice, the high precision system time scale is not necessarily the least common multiple, and the present invention operates effectively even with an integral multiple thereof. This point is clear from the essence of the present invention as described later.
また、もし、最小公倍数がフレームレートまたはシステム・タイムスケールと同じであるならば、フレームレートまたはシステム・タイムスケールをそのまま利用する事が出来る。これについては、後述する。 Also, if the least common multiple is the same as the frame rate or system time scale, the frame rate or system time scale can be used as it is. This will be described later.
次に、この高精度システム・タイムスケールから、動画像の各フレームのタイムスタンプ間の理論的なタイムスタンプ・オフセット値(差違)を計算する。すなわち、フレームとフレームの間の時間差をタイムスケールを使って表現した値である。 Next, a theoretical time stamp offset value (difference) between time stamps of each frame of the moving image is calculated from this high-accuracy system time scale. That is, it is a value expressing the time difference between frames using a time scale.
もし、システム・タイムスケールとフレームレートから直接計算するならば、システム・タイムスケールが1000、フレームレートが15であるので、理論的なスタンプ・オフセットは1000÷15から約66.7と計算される。システム・タイムスケールの値1000は、時間の最小単位が1ミリ秒である事を意味するので、約66.7ミリ秒に相当している。 If calculating directly from the system time scale and the frame rate, the system time scale is 1000 and the frame rate is 15, so the theoretical stamp offset is calculated from 1000 ÷ 15 to about 66.7. . The system time scale value of 1000 means that the minimum unit of time is 1 millisecond, and therefore corresponds to about 66.7 milliseconds.
一方で、高精度システム・タイムスケールは、最小公倍数から3000と計算されているので、この場合のタイムスタンプ・オフセット値(差違)は、3000÷15から200と計算される。 On the other hand, since the high-accuracy system time scale is calculated as 3000 from the least common multiple, the timestamp offset value (difference) in this case is calculated as 3000 ÷ 15 to 200.
計算された200という数字は、高精度システム・タイムスケールが3000であるため、実時間に換算すれば、約66.7ミリ秒に相当していることに注意が必要である。
このタイムスタンプ・オフセットを模式的に図2に示した。
It should be noted that the calculated number of 200 corresponds to about 66.7 milliseconds when converted to real time because the high-accuracy system time scale is 3000.
This time stamp offset is schematically shown in FIG.
図2の中央に立体的に図示した矩形フレーム201は、動画像の各フレーム(サンプル)を模式的に示したものである。各フレームは、フレームレート202が15fpsで順番に並んでいる。各フレーム201の上には、元のシステム・タイムスケール203が時間軸とともに図示されており、下には高精度システム・タイムスケール204が時間軸とともに図示されている。
A
上で説明したように、元のタイムスタンプのオフセット値(差違)205は、元のシステム・タイムスケール203によって表現されるフレームとフレームの間の時間であり、約66.7である。また、理論的なタイムスタンプのオフセット値(差違)206は、高精度システム・タイムスケール204によって表現されるフレームとフレームの間の時間であり、200である。
As explained above, the original timestamp offset value (difference) 205 is the time between frames represented by the original
元のタイムスタンプのオフセット値(差違)205と理論的なタイムスタンプのオフセット値(差違)206は、値こそ違っているが、論理的には全く同等のものを示している事がわかる。 It can be seen that the original time stamp offset value (difference) 205 and the theoretical time stamp offset value (difference) 206 are different in value, but are logically equivalent.
ここまでの計算で、高精度システム・タイムスケールの値3000と、これによる理論的なタイムスタンプ・オフセット値(差違)として200単位が得られた。
高精度システム・タイムスケールの実際のシステム・タイムスケールに対する精度の倍率は、3000÷1000で3倍である。
In the calculation so far, a high precision system time scale value of 3000 and a theoretical time stamp offset value (difference) of 200 units were obtained.
The accuracy ratio of the high-accuracy system time scale to the actual system time scale is three times 3000/1000.
次に誤差率を計算する。オペレーティング・システム(OS)またはクロック(時計)装置が処理する時刻は、システム・タイムスケールに従って、最大1ミリ秒の誤差を含んでいる。 Next, the error rate is calculated. The time processed by the operating system (OS) or clock device includes an error of up to 1 millisecond according to the system time scale.
このような誤差は、たとえば、動画像の各フレーム(サンプルと呼ばれる事もある)を生成するエンコーダモジュールが、絶対的なフレームレートで動作しようとするために発生する時間の最小単位以下の端数を切り捨てたり、或いは四捨五入したりするといったことによって発生する。 Such an error is, for example, a fraction less than the smallest unit of time that occurs when an encoder module that generates each frame of a moving image (sometimes called a sample) tries to operate at an absolute frame rate. Generated by truncating or rounding.
他にも様々な要因が考えられるが、少なくとも誤差の最小単位はシステム・タイムスケールの最小単位と同等以上であり、高精度システム・タイムスケールにおいては、その倍率から、3単位(3×最小単位)以上となることは明らかである。 There are various other factors, but at least the minimum unit of error is equal to or greater than the minimum unit of the system time scale. In the high precision system time scale, 3 units (3 x minimum unit) It is clear that this is the case.
通常、各フレーム(サンプル)に付与されるタイムスタンプは、システム・タイムスケールによる最小の時間単位で与えられるため、それが、エンコーダがこれを参照して付与するにせよ、出力された結果に論理的に与えられるにせよ、タイムスタンプは一定の誤差を含むと考えられる。たとえば、時刻を最小単位以下の精度で切り捨てるならば、タイムスタンプは、0ミリ秒、66ミリ秒、132ミリ秒、199ミリ秒、266ミリ秒といった具合に設定される。 Normally, the time stamp given to each frame (sample) is given in the smallest time unit according to the system time scale, so that even if the encoder gives it with reference to this, the output result is logical. Even if given, the time stamp is considered to contain a certain error. For example, if the time is rounded down with a precision less than the minimum unit, the time stamp is set to 0 milliseconds, 66 milliseconds, 132 milliseconds, 199 milliseconds, 266 milliseconds, and so on.
明らかに、実際に取得されたタイムスタンプのオフセット値(差違)は、66ミリ秒、66ミリ秒、67ミリ秒、67ミリ秒のように一定の値とはならない。こうしてえられたオフセット値(差違)を動画像データの記録用として使用するならば、オフセット値を格納するヘッダ領域は自ずと大きくなってしまうことは、自ずと明らかである。 Apparently, the offset value (difference) of the actually acquired time stamp is not a constant value such as 66 milliseconds, 66 milliseconds, 67 milliseconds, and 67 milliseconds. If the offset value (difference) obtained in this way is used for recording moving image data, it is obvious that the header area for storing the offset value naturally increases.
同様に、高精度システム・タイムスケールの倍率を使用してタイムスタンプのオフセットを高精度システム・タイムスケールに換算すると、これらは順に、198、198、201、201となって、なお誤差を含んでいる。
Similarly, when the time stamp offset is converted to the high precision system time scale using the high precision system time scale factor, these are in
本発明においては、この高精度システム・タイムスケールで与えられたタイムスタンプのオフセット値(差違)が、先に計算した誤差(3単位)以内であれば、同様に先に計算した論理的なタイムスタンプ・オフセット値(差違)である200単位を常に使用する。 In the present invention, if the offset value (difference) of the time stamp given in this high-accuracy system time scale is within the previously calculated error (3 units), the logical time calculated in the same way is used. 200 units that are stamp offset values (difference) are always used.
このことは、一見、高精度システム・タイムスケールであっても元のシステム・タイムスケールであっても等価であるように見えるが、実際には、元のシステム・タイムスケールでは理論的なタイムスタンプのオフセット値(差違)が、最小の時刻以下の精度を要求するため、これを使用することができない。 At first glance, this seems to be equivalent for both the high-accuracy system time scale and the original system time scale, but in fact, the original system time scale has a theoretical time stamp. This offset value (difference) requires accuracy below the minimum time and cannot be used.
以上のように、本発明を利用することにより、常にタイムスタンプのオフセット値(差違)を一定に設定することが可能となる。 As described above, by using the present invention, it is possible to always set a time stamp offset value (difference) constant.
なお、実際に発生するタイムスタンプから高精度システム・タイムスケールに換算されたタイムスタンプのオフセット値(差違)を計算するにあたっては、タイムスタンプを高精度システム・タイムスケールに換算してからオフセット値(差違)を計算しても結果が等価であることは、数学的にも明らかである。 In calculating the time stamp offset value (difference) converted from the actual time stamp to the high precision system time scale, the time stamp is converted to the high precision system time scale before the offset value ( It is mathematically clear that the result is equivalent even if the difference is calculated.
また、ここではアルゴリズムを順次説明しているが、計算上の丸め誤差を最小にするために、計算の順序や値を記憶する形式に工夫してもアルゴリズムの基本的な考え方に差違はない。 In addition, although the algorithms are sequentially described here, there is no difference in the basic concept of the algorithm even if the calculation order and value are stored in order to minimize the rounding error in calculation.
ここで、実際にこのように処理された結果としてのタイムスタンプのオフセットを、MPEG−4の標準ファイル・フォーマットである所謂MP4形式に適用した例を説明する。 Here, an example will be described in which the offset of the time stamp as a result of the actual processing is applied to the so-called MP4 format, which is the MPEG-4 standard file format.
従来の技術でも説明したように、ISO/IEC14496で与えられるMPEG−4の標準規格によれば、実際にここで例示した動画像データなどのタイムスタンプは、どの動画像データを格納するトラックと呼ばれる単位毎に、次のような定義でファイル格納される。 As described in the prior art, according to the MPEG-4 standard provided by ISO / IEC 14496, the time stamp such as the moving image data actually exemplified here is called a track for storing any moving image data. Each unit is stored as a file with the following definition.
このデータ構造は、格納されるタイムスタンプのオフセットのテーブルの要素数を示す「entry-count」と、その要素数だけ用意されるテーブルの要素が示すフレーム(サンプル)数「sample-count」とタイムスタンプのオフセット値(差違)「sample-delta」で構成される。
このデータ構造をより明確にするために、図3にタイムスタンプの格納形式をMPEG−4の標準規格である所謂MP4を例として模式的に示した。
This data structure consists of “entry-count” that indicates the number of elements in the offset table of the stored timestamp, and the number of frames (samples) indicated by the elements of the table that are prepared for that number of elements and the time It consists of stamp offset value (difference) “sample-delta”.
In order to clarify this data structure, FIG. 3 schematically shows the storage format of the time stamp as an example of so-called MP4 which is a standard of MPEG-4.
これまで例示してきた場合で説明するならば、元のシステム・タイムスケール203で与えられたタイムスタンプのオフセット値(差違)、すなわち、66ミリ秒、66ミリ秒、67ミリ秒、67ミリ秒を格納するデータ構造は、図3に示す元のシステム・タイムスケールによるテーブル301のようなものになる。要素数302の値は、3であり、最初の要素では、フレーム数303が2でオフセット値(差違)304が66となっている。2番目の要素では、同様に3と67が設定されている。3番目の要素では、1と66が設定されている。
In the case described above, the time stamp offset value (difference) given by the original
一方で、高精度システム・タイムスケール204による場合、テーブル305のようにテーブルの要素数306は1であり、フレーム数307がn、オフセット値(差違)308が200となって、明らかにテーブルサイズを小さくすることが出来ている。例えば、フレームレートが15fpsである場合には、n=14となる。
On the other hand, according to the high-precision
この例は、対象とするフレーム数が少ないため、絶対的な大きさに差違はほとんどないが、周期的に発生するであろうタイムスタンプの誤差のため、フレーム数が多くなればなるほど使用領域を圧縮する効果が大きくなることは、明らかである。 In this example, there is little difference in absolute size because the number of target frames is small, but due to a time stamp error that will occur periodically, the use area increases as the number of frames increases. It is clear that the effect of compression increases.
この圧縮効果は、ファイルサイズに影響を与えるのみならず、使用するメモリーサイズを圧縮する事においても効果がある。すべてのデータの出力が終わるまで、プログラムはこの値を保持していなければファイルにこのテーブル自体を書き出す事ができないからである。 This compression effect not only affects the file size, but is also effective in compressing the memory size to be used. This is because the program cannot write the table itself to the file until all data has been output.
なお、高精度システム・タイムスケールもMP4ファイル上に格納しなければ、後から実際のタイムスタンプを導出することはできないが、この様な値を格納する場所として、トラック毎に「Media Header Atom」が定義されている。 Note that if the high-accuracy system time scale is not stored on the MP4 file, the actual time stamp cannot be derived later. However, as a place to store such a value, “Media Header Atom” for each track is used. Is defined.
一度MP4ファイルに格納されたデータを読み出す側は、まず、この「Media Header Atom」からタイムスケールを取得し、順次タイムスタンプのオフセット値(差違)をタイムスケールから実時間に変換して取り出すことによって、正しい値を取り出すことが出来る。このようなデータの取り出しかたはISO/IEC14496で規格化されているものであって、本発明の本質ではないため、説明を省略する。 The side that reads the data once stored in the MP4 file first obtains the time scale from this “Media Header Atom”, and sequentially converts the offset value (difference) of the time stamp from the time scale to the real time and takes it out. The correct value can be extracted. Since such data extraction is standardized by ISO / IEC 14496 and is not the essence of the present invention, the description thereof is omitted.
さて、最小公倍数がフレームレートまたはシステム・タイムスケールと同じ場合については、ここまで説明してこなかったが、先に説明したようにフレームレートまたはシステム・タイムスケールを高精度・システム・タイムスケールに設定してもよい。 Now, when the least common multiple is the same as the frame rate or system time scale, we have not explained so far, but as described above, set the frame rate or system time scale to the high accuracy, system time scale. May be.
このような例として、システム・タイムスケールが1ミリ秒であり、かつ、フレームレートが10fpsであるような場合がある。このような場合は、最小公倍数がたまたまシステム・タイムスケールなどと一致した場合であって、特に本発明と矛盾しない。 An example of this is when the system time scale is 1 millisecond and the frame rate is 10 fps. In such a case, the least common multiple happens to coincide with the system time scale and the like, and is not particularly inconsistent with the present invention.
しかしながら、もし、最小公倍数がフレームレートまたはシステム・タイムスケールと同じ場合で、かつ、その様な場合にタイムスタンプが誤差を持つことなく提供されることが明らかな場合には、ここで説明するアルゴリズムによらず、高精度システム・タイムスケールをフレームレートの値とし、タイムスタンプのオフセット値(差違)を1としてもよい。 However, if the least common multiple is the same as the frame rate or system time scale, and if it is clear that the time stamp is provided without error, then the algorithm described here Regardless, the high-accuracy system time scale may be the frame rate value and the time stamp offset value (difference) may be 1.
この様な例として、タイムスタンプが常に計算値によって論理的に与えられるようなシステムが存在する。 As an example of this, there exists a system in which a time stamp is always logically given by a calculated value.
次に、その他の誤差要素についての付加的な説明をおこなう。ここまでの例で、システム・タイムスケールの誤差を仮に1ミリ秒として説明してきたが、実際の装置においては、エンコーダの処理誤差など本発明の本質には直接の関係のない誤差要素が含まれる可能性がある。 Next, additional explanation will be given for other error factors. In the examples so far, the error of the system time scale is assumed to be 1 millisecond. However, in an actual apparatus, an error element not directly related to the essence of the present invention, such as an encoder processing error, is included. there is a possibility.
もし、そのような誤差があれば、システム・タイムスケールの誤差に加えてそのような外部に起因する誤差パラメータを加味してもよい。 If there is such an error, in addition to the error of the system time scale, an error parameter caused by such an external may be taken into consideration.
さらに、固定のフレームレートであっても例外的に発生するタイムスタンプ値があった場合、これを高精度システム・タイムスケールに換算して設定する事により、正確なタイムスタンプとして格納する事はもちろん可能である。このような計算は、単純に計算されたタイムスタンプのオフセット値(差違)が誤差の範囲になければそのままの値を使用する事で対処できる。 Furthermore, if there is a time stamp value that occurs exceptionally even at a fixed frame rate, it can be stored as an accurate time stamp by converting it to a high-accuracy system time scale. Is possible. Such a calculation can be dealt with by using the value as it is if the calculated offset value (difference) of the time stamp is not within the error range.
さらに、本発明においては、本発明の記録装置が必要であるならば、例外が発生したタイムスタンプの次のタイムスタンプが、例外が発生したタイムスタンプのひとつ前のタイムスタンプとのオフセット値(差違)において誤差の範囲内である場合、計算しようとしているオフセット値を理論値としてのオフセット値から例外が発生したオフセット値をひいた値とすることで、誤差をより少なくする事が可能である。 Furthermore, in the present invention, if the recording apparatus of the present invention is necessary, the time stamp next to the time stamp in which the exception has occurred is offset from the time stamp immediately preceding the time stamp in which the exception occurred (difference). If the offset value to be calculated is a value obtained by subtracting the offset value in which an exception has occurred from the offset value as the theoretical value, the error can be further reduced.
このような例外を含む実際の例を図4に示す。図4は、あるエンコーダ・アプリケーションを例として、これが出力するタイムスタンプと高精度システム・タイムスケールによるタイムスタンプを表形式で示した図である。 An actual example including such an exception is shown in FIG. FIG. 4 is a diagram showing, in a tabular form, a time stamp output by a certain encoder application and a time stamp based on a high-precision system time scale.
この図では、左端に実際のタイムスタンプ401を時系列で並べている。実際のタイムスタンプ401は、2カラム目に示した実際に得られるタイムスタンプ402とは必ずしも一致せず、論理的なものである。これは、システム・タイムスケールが示す時間の最小単位より詳細な時刻であるため、現実には物理的に得られるものではない。OSなどが提供する時刻の最小単位のため、現実には、得られるタイムスタンプ402のように、たとえば切り捨てが発生した値として取り扱われる。
In this figure, the
3つ目のカラムは、ISO/IEC14496で与えられるMPEG−4の標準規格で用いられるようなタイムスタンプのオフセット値(差違)403であり、得られるタイムスタンプ402のタイムスタンプ間の差違を表現する。すなわち、図3におけるオフセット値(差違)304と同等のものである。
The third column is a time stamp offset value (difference) 403 as used in the MPEG-4 standard given by ISO / IEC 14496, and represents the difference between the time stamps of the obtained
4つ目のカラムは、高精度システム・タイムスケールで換算された高精度なタイムスタンプのオフセット404を示す。前に説明したように、この値は一定の誤差の範囲であれば、タイムスタンプのオフセット値(差違)の理論値に置き換えられるため、ほとんどの値が200となっている。 The fourth column shows a high-accuracy time stamp offset 404 converted on the high-accuracy system time scale. As described above, since this value is replaced with the theoretical value of the offset value (difference) of the time stamp within a certain error range, most of the value is 200.
右の2つのカラムは、高精度なタイムスタンプのオフセット404の積算として得られる高精度なタイムスタンプ405とこの値から導かれる再生時のタイムスタンプ406である。再生時のタイムスタンプ406は、読み出される時に計算されるものであって、読み出しを行うアプリケーションのシステム・タイムスケールが同様に10000であると仮定した場合の例として、小数点以下第2位で四捨五入した参考値となっている。
The two columns on the right are a high-
さて、図中に斜体字で強調している部分が、例外が発生している部分である。この部分で、得られるタイムスタンプ402がフレームレート202の値である15fpsと合致していない。高精度なタイムスタンプのオフセット404の値にも明らかなように、誤差の範囲を超えたため、タイムスタンプのオフセット値(差違)の理論値である200は設定されない。
The part highlighted in italics in the figure is the part where the exception occurs. In this part, the obtained
しかしながら、すぐ下のタイムスタンプは、再び正しい値を示している。このような場合には、ひとつ上のタイムスタンプとの比較を行って、これがタイムスタンプのオフセット値(差違)の理論値との誤差の範囲であるため、タイムスタンプのオフセット値(差違)の理論値である200から例外の発生している部分のオフセット値を差し引いた値として65が設定されている。
However, the time stamp immediately below shows the correct value again. In such a case, a comparison is made with the time stamp one above, and this is within the error range of the time stamp offset value (difference), so the time stamp offset value (difference) theory 65 is set as a value obtained by subtracting the offset value of the portion where the exception has occurred from the
結果として、この図全体の高精度なタイムスタンプ405は、例外を含むすべての値について、実際のタイムスタンプ401を忠実に再現するものとなっている。
最後に、これまで説明してきた本発明によるアルゴリズムについて、フローチャートを使って説明する。
As a result, the high-
Finally, the algorithm according to the present invention described so far will be described with reference to a flowchart.
図5と図6は、これまで説明してきたアルゴリズムをフローチャートにより記述したものである。実際には、先にも説明したように計算上の丸め誤差や速度に配慮して、計算の順序をアルゴリズムの考え方の範囲内で変更し得るものであるが、ここでは、最もわかりやすいと思われる記述順序で記載している。 FIG. 5 and FIG. 6 describe the algorithm described so far with flowcharts. Actually, as explained earlier, the calculation order can be changed within the range of the algorithm concept in consideration of the rounding error and speed in the calculation. Listed in order.
図5は、実際に動画・音声の記録を行うにあたって、その前段部分として行う様々なパラメータ類の準備を行う部分である。後段のタイムスタンプを含むフレーム(サンプル)の記録部分については、ページ結合子「A」により、図6に示した。 FIG. 5 shows a part for preparing various parameters to be performed as a preceding stage when actually recording a moving image / audio. The recording portion of the frame (sample) including the subsequent time stamp is shown in FIG. 6 by the page connector “A”.
ステップS501:最初に、本アルゴリズムにおいて必要な初期情報、システム・タイムスケール203とフレームレート202を取得する。先に説明したように、たとえば、システム・タイムスケールは1000であり、フレームレートは15である。本フローチャートに於いては、読みやすさのために、システム・タイムスケールをSTS、フレームレートをFPSという記号で示している。
Step S501: First, initial information necessary for this algorithm, the
ステップS502:取得したシステム・タイムスケール203とフレームレート202より、最小公倍数501を計算する。最小公倍数の計算には、ユークリッドの互除法などが利用できる。また、結果として最小公倍数を整数倍した値であってもよい。ここでも読みやすさのために、最小公倍数をLCMという記号で示している。
ステップS503:得られた最小公倍数501が、システム・タイムスケール203またはフレームレート202と一致し、かつ、実際に取得されるフレーム(サンプル)がフレームレート202に従って正確なタイムスタンプを伴うことがあらかじめ分かっている場合(Yes)、ステップS504に進む。そうでない場合には、ステップS506に進む。
Step S502: The least
Step S503: It is known in advance that the obtained least common multiple 501 matches the
ステップS504:ステップS503で条件がYesであった場合、高精度システム・タイムスケールをフレームレート202に設定する。
Step S504: If the condition is Yes in step S503, the high-accuracy system time scale is set to the
ステップS505:続いて、タイムスタンプのオフセット値(差違)を1に設定する。 Step S505: Subsequently, the time stamp offset value (difference) is set to 1.
ステップS506:ステップS503で条件がNoであった場合、高精度システム・タイムスケールを計算された最小公倍数501に設定する。
Step S506: If the condition is No in Step S503, the high precision system time scale is set to the calculated least
ステップS507:続いて、タイムスタンプのオフセット値(差違)を理論値として計算する。この値はフレームとフレームの間の時間差を高精度システム・タイムスケールを使って表現したものであるので、上のステップS506で設定された高精度システム・タイムスケールをフレームレート202で割って得られた結果となる。
Step S507: Subsequently, the time stamp offset value (difference) is calculated as a theoretical value. This value is obtained by dividing the time difference between frames using the high-precision system time scale, and is obtained by dividing the high-precision system time scale set in step S506 above by the
ステップS508:さらに、高精度システム・タイムスケールによる誤差を計算する。誤差は、最小であっても元のシステム・タイムスケール203における1単位であるので、高精度システム・タイムスケール204を元のシステム・タイムスケール203で割った商として得られる。もし、ここで、あらかじめ分かっている外部設定誤差率502があれば、これを加える。
Step S508: Further, an error due to the high accuracy system time scale is calculated. Since the error is at least one unit in the original
ステップS509:ここで、本アルゴリズムによって計算されたパラメータ類として、高精度システム・タイムスケール204とタイムスタンプのオフセット値(差違)206と誤差503を保管する。ステップS503の条件により、誤差が計算されなかった場合には、誤差503として0を保管してもよい。この値は後段の処理で不要であれば使用されない。
Step S509: Here, the high-precision
次に図6について説明する。図6は、図5に続く後段のタイムスタンプを含むフレーム(サンプル)の記録部分を説明するフローチャートである。ここでは、それぞれのフレーム(サンプル)データを順次取得しながら、本発明のアルゴリズムに従って、ISO/IEC14496で与えられるMPEG−4の標準規格のようなタイムスタンプの格納形式でテーブル603を出力している。テーブル603は、図3で示したテーブル305に相当するメモリー上の表現である。もちろん、ここでは便宜上メモリー上と言う表現を用いているが、実際には中間ファイルなどの外部記憶装置上に存在するものであってもよい。 Next, FIG. 6 will be described. FIG. 6 is a flowchart for explaining a recording portion of a frame (sample) including a time stamp at the subsequent stage following FIG. Here, while sequentially acquiring each frame (sample) data, the table 603 is output in accordance with the algorithm of the present invention in a time stamp storage format similar to the MPEG-4 standard provided by ISO / IEC 14496. . A table 603 is a representation on a memory corresponding to the table 305 shown in FIG. Of course, the expression “on memory” is used here for the sake of convenience, but it may actually exist on an external storage device such as an intermediate file.
ステップS601:最初に、それぞれのフレームのタイムスタンプ601とフレームデータ602を取得する。フレームデータ602は、本発明の本質には直接関係がないが、一般的なアプリケーションの一形態として、参考に示した。
Step S601: First, the
ステップS602:フレームの終わりであるかどうかを判断する。もし、ステップS601で入力が無ければ、ステップS610の終了処理に移行する。 Step S602: It is determined whether it is the end of the frame. If there is no input in step S601, the process proceeds to an end process in step S610.
ステップS603:もし、逆に第1フレーム、すなわち、はじめてフレームを取得したのであれば、ステップS604に移行する。そうでなければ、ステップS605に移行する。 Step S603: Conversely, if the first frame, that is, the frame is acquired for the first time, the process proceeds to Step S604. Otherwise, the process proceeds to step S605.
ステップS604:第1フレームであった場合、タイムスタンプのオフセットを計算する対象が存在しないため、得たタイムスタンプ601を一時記憶域に保管して、再びステップS601のフレームの取得に戻る。
Step S604: If it is the first frame, there is no target for calculating the offset of the time stamp, so the obtained
ステップS605:すでに前のタイムスタンプが取得済みである場合、今回のタイムスタンプから前回のタイムスタンプを差し引いて、タイムスタンプのオフセット値を計算する。この時、図5のフローチャートで計算済みの高精度システム・タイムスケールに合わせてオフセット値は変換される。ここではフローチャートを単純化するために、そのような詳細は略しているが、この部分の処理は、前に詳しく説明した通りである。 Step S605: If the previous time stamp has already been acquired, the time stamp offset value is calculated by subtracting the previous time stamp from the current time stamp. At this time, the offset value is converted in accordance with the high-accuracy system time scale calculated in the flowchart of FIG. Here, in order to simplify the flowchart, such details are omitted, but the processing of this part is as described in detail previously.
ステップS606:ステップS605で計算された高精度システム・タイムスケールに換算された高精度なタイムスタンプのオフセット値と、図5のフローチャートで計算済みのタイムスタンプのオフセット値(差違)206の差違を計算し、これが図5のフローチャートで計算済みの誤差503の範囲を超えているかどうかを判断する。もし、誤差より大きければステップS607に移行し、そうでなければ、ステップS608に移行する。
Step S606: Calculate the difference between the high-accuracy time stamp offset value converted to the high-precision system time scale calculated in step S605 and the time stamp offset value (difference) 206 calculated in the flowchart of FIG. Then, it is determined whether or not this exceeds the range of the
ステップS607:オフセット値を再計算する。フローチャートを単純化するためにこの処理を定義済み処理として記述しているが、この処理は、図4を用いて説明した例外処理である。ここでは説明が重複するため省略する。 Step S607: Recalculate the offset value. In order to simplify the flowchart, this process is described as a predefined process. This process is the exception process described with reference to FIG. Here, the description will be omitted because it is redundant.
ステップS608:誤差の範囲内であれば、ここで、計算されたタイムスタンプのオフセット値(差違)を図5のフローチャートで計算済みのタイムスタンプのオフセット値(差違)206に置き換える。 Step S608: If within the error range, the calculated time stamp offset value (difference) is replaced with the time stamp offset value (difference) 206 calculated in the flowchart of FIG.
ステップS609:各フレームの処理の最後に、結果として得られたタイムスタンプのオフセット値(差違)をテーブル603に格納する。言うまでもなく、タイムスタンプのオフセット値(差違)がテーブル603の最後の要素と同じ値であれば、最後の要素のフレーム数をひとつ増やすだけの処理である。 Step S609: At the end of the processing of each frame, the resulting time stamp offset value (difference) is stored in the table 603. Needless to say, if the time stamp offset value (difference) is the same value as the last element of the table 603, the process is only to increase the number of frames of the last element by one.
ステップS610:ここでは象徴的に終了処理を示しているが、具体的には、たとえばテーブル603のデータを最終的なファイルに格納するといった処理となる。 Step S610: Here, the end process is shown symbolically, but specifically, for example, the data of the table 603 is stored in the final file.
以上、説明してきたように、本発明をタイムスタンプを含むエンコーダ出力結果の格納アプリケーションなどに適用した場合、タイムスタンプの精度を損なうことなくタイムスタンプの記憶領域を小さくすることが出来る事が明らかである。 As described above, when the present invention is applied to an encoder output result storage application including a time stamp, it is clear that the time stamp storage area can be reduced without losing the accuracy of the time stamp. is there.
<第2の実施形態>
ここまで説明してきた実施例においては、与えられるフレームレートは、整数であることを仮定してきた。しかしながら、たとえばフレームレートが7.5フレーム/秒であるといったケースは、ありえない事ではない。この様な場合でも、本発明は、わずかな前処理により、容易に適用可能である。
<Second Embodiment>
In the embodiments described so far, it has been assumed that the given frame rate is an integer. However, for example, the case where the frame rate is 7.5 frames / second is not impossible. Even in such a case, the present invention can be easily applied by a slight pretreatment.
このような整数ではないフレームレートに対しては、前処理として、フレームレートの整数化を行う。ここでいう整数化とは、フレームレートに対して整数倍することにより得られた結果を整数化するような処理である。たとえば、7.5フレーム/秒のフレームレートは、2倍することにより15となって整数化できる。 For such a frame rate that is not an integer, the frame rate is converted into an integer as preprocessing. The term “integerization” as used herein refers to processing for converting the result obtained by multiplying the frame rate by an integer to an integer. For example, the frame rate of 7.5 frames / second can be converted to 15 by multiplying it by two.
整数化する方法は幾通りかあるが、もっとも単純な方法は、小数部の桁数×10倍にする事によって実現される。また、小数部が2または5で割り切れる場合には、その割り切れる場合の2または5で小数部の桁数×10を同様に除算してもよい。この例では7.5の小数部5が5で割り切れるため小数部の桁数×10÷5より2倍すれば充分であることがわかる。
There are several methods for converting to an integer, but the simplest method is realized by multiplying the number of decimal places by 10 times. When the decimal part is divisible by 2 or 5, the number of decimals × 10 of the decimal part may be similarly divided by 2 or 5 when the decimal part is divisible. In this example, since the
この算出された整数化されたフレームレートを第1の実施形態におけるアルゴリズムに使用することができる。この例では、結果として15が算出されているため、実施例1と同等の処理が行われることになる。ただし、エンコーダから出力されるタイムスタンプは、15fpsの場合と異なり、0、133、266、400、533(ミリ秒)のようになる。 This calculated integerized frame rate can be used in the algorithm in the first embodiment. In this example, since 15 is calculated as a result, processing equivalent to that in the first embodiment is performed. However, unlike the case of 15 fps, the time stamp output from the encoder is 0, 133, 266, 400, 533 (milliseconds).
結果として15fpsの場合と同じになったため、システム・タイムスケールが1000であれば、最小公倍数は3000となって、これが高精細システム・タイムスケールとして使用されることになる。 As a result, since it is the same as the case of 15 fps, if the system time scale is 1000, the least common multiple is 3000, which is used as the high-definition system time scale.
理論的なタイムスタンプのオフセットを計算する部分については、15fpsによる場合と結果が異なる事に着目すべきである。高精細システム・タイムスケールは3000であるが、フレームレートは15ではなく7.5であるため、計算される結果は3000÷7.5から400となる。 It should be noted that the result of calculating the theoretical time stamp offset is different from the case of 15 fps. The high-definition system timescale is 3000, but the frame rate is 7.5 instead of 15, so the calculated result is 3000 / 7.5 to 400.
このような違いは、アルゴリズムの違いではなく、計算された結果の違いである。すなわち、本発明は、フレームレートが小数部を含む場合には、整数になるような任意の整数を乗じて整数化されたフレームレートを計算する前処理を付加することで容易に適用出来る。 Such a difference is not an algorithm difference, but a difference in the calculated result. That is, when the frame rate includes a fractional part, the present invention can be easily applied by adding a pre-process for calculating an integerized frame rate by multiplying an arbitrary integer that is an integer.
<第3の実施形態>
本発明は、フレームレートが固定に準ずると考えられる場合、可変フレームレート的な動作であっても適用可能な場合がある。ここに言う可変フレームレート的な動作とは、完全な固定フレームレートではないにせよ、あらかじめ決められた複数のフレームレートが動的に使用されるような場合である。
<Third Embodiment>
In the case where the frame rate is considered to be fixed, the present invention may be applicable even if the operation is a variable frame rate operation. The variable frame rate operation referred to here is a case where a plurality of predetermined frame rates are dynamically used even though they are not completely fixed frame rates.
このような例として、たとえば、通常はフレームレートが10fpsで動作しているが、動きの早い場面において、フレーム間の差違がおおきくなるために15fpsに変更されるような場合がある。あるいはまた、動画像などのストリームのビットレートを通信上の制約から一定にしておきたいといった場合に、逆に動きの早い場面において圧縮率を下げて画質を保持するとともに、通常15fpsのフレームレートを10fpsに変更するといった事も利用される。 As an example of this, for example, there is a case where the frame rate is normally 10 fps, but the scene is changed to 15 fps due to a large difference between frames in a scene with fast motion. Alternatively, when it is desired to keep the bit rate of a stream such as a moving image constant due to communication restrictions, on the contrary, in a scene with fast movement, the compression rate is lowered to maintain the image quality, and a frame rate of 15 fps is usually set. Changing to 10 fps is also used.
あらかじめ、このようなフレームレートの設定が分かっている場合、図5のフローチャート上で示したフレームレート202を複数の値として計算することで本発明は充分適用可能である。
When such a frame rate setting is known in advance, the present invention is sufficiently applicable by calculating the
この場合、ステップS502の最小公倍数の計算は、複数のフレームレート202とシステム・タイムスケール203で行われればよい。もし、10fpsと15fpsの2つのフレームレートおよびシステム・タイムスケールの値1000で最小公倍数を計算すれば、3000という結果が得られる。この時、タイムスタンプのオフセットの理論値206は、それぞれ、300と200になる。つまり、タイムスタンプのオフセットの理論値206も複数となる。
In this case, the calculation of the least common multiple in step S <b> 502 may be performed at a plurality of
3つ以上の値から最小公倍数を求める方法もまた、ユークリッドの互除法が適用できることはよく知られている。従って、入力となるフレームレート202と出力となるタイムスタンプのオフセットの理論値206が複数になる事以外は、まったく同等の処理が適用できる。
It is well known that the method of obtaining the least common multiple from three or more values can also apply the Euclidean mutual division method. Therefore, exactly the same processing can be applied except that the
あとは、図6のフローチャートにおいて、タイムスタンプ601が適用されるフレームがどのフレームレートで出力されたものであるかを判断しながら、適用するタイムスタンプのオフセットの理論値を変更すればよい。
After that, in the flowchart of FIG. 6, it is only necessary to change the theoretical value of the offset of the applied time stamp while determining at which frame rate the frame to which the
途中でフレームレートが変更されるため、ひとつのタイムスタンプを使用する場合にくらべ、タイムスタンプの記憶領域の圧縮効果が小さくなるが、フレームレートの変更の回数が充分に小さければ、その効果は依然として充分有意なものである。 Since the frame rate is changed in the middle, the compression effect of the time stamp storage area is smaller than when using a single time stamp, but if the number of frame rate changes is sufficiently small, the effect is still It is sufficiently significant.
<第4の実施形態>
ここでは、ここまでで説明出来なかったその他の実施例について説明する。
本発明は、動画や音声など複数の異なるフレームレートが使用される場合にも有効である。
<Fourth Embodiment>
Here, other embodiments that could not be described so far will be described.
The present invention is also effective when a plurality of different frame rates such as moving images and sounds are used.
もし、同一ファイル内において単一のタイムスケールのみが格納可能である場合、ひとつのフレームレートとシステム・タイムスケールから最小公倍数を計算し、高精度システム・タイムスケールを計算したならば、他のフレームレートの精度を犠牲にする可能性がある。たとえば、ある動画のフレームレートが10fpsであって、システム・タイムスケールが1000である場合、結果として得られる高精度システム・タイムスケールは、本アルゴリズムに従って1000となる。しかしながら、もう一つの動画のフレームレートが15fpsであった場合、これを高精度システム・タイムスケールの値1000で処理しようとすると、あきらかに、タイムスタンプの精度と記憶領域の両面で効果が発揮できない。 If only a single time scale can be stored in the same file, the least common multiple is calculated from one frame rate and system time scale, and if a high precision system time scale is calculated, another frame is calculated. There is a possibility to sacrifice the accuracy of the rate. For example, if the frame rate of a moving image is 10 fps and the system time scale is 1000, the resulting high accuracy system time scale is 1000 according to the present algorithm. However, if the frame rate of another moving image is 15 fps, if this is processed with a high-accuracy system time scale value of 1000, it is apparent that the effects of both time stamp accuracy and storage area cannot be achieved. .
このような場合にも、先に説明した複数のフレームレートの場合と同様に本アルゴリズムを適用することで本発明は効果を発揮する。 Even in such a case, the present invention is effective by applying the present algorithm in the same manner as in the case of the plurality of frame rates described above.
以上、説明してきたように、本発明によれば、タイムスタンプの精度を損なうことなくタイムスタンプの記憶領域を小さくすることが出来る事が可能になり、デジタル・カメラのような比較的記憶領域に制約の大きい機器などで発生する様々な問題に対処しながら、より正確なタイムスタンプを記録できるようになる。 As described above, according to the present invention, it is possible to reduce the time stamp storage area without losing the accuracy of the time stamp, and a relatively storage area such as a digital camera can be used. It is possible to record more accurate time stamps while dealing with various problems that occur in devices with large restrictions.
以上説明したように、本発明によれば、論理的に誤差の発生しない高精度なタイムスタンプを生成する事が可能になり、視覚的に劣化のない正確なタイムスタンプを維持しながらタイムスタンプの格納テーブルの格納効率を向上させる事ができ、格納ファイルのファイルサイズを効率的に縮小することができる。 As described above, according to the present invention, it is possible to generate a highly accurate time stamp that does not logically generate an error, while maintaining an accurate time stamp that is not visually deteriorated. The storage efficiency of the storage table can be improved, and the file size of the storage file can be efficiently reduced.
また、このことにより結果として、小さなメモリーしか持たない制約のあるデバイスにおいても、メモリー圧迫による重大な処理異常を誘発する可能性を小さくすることが可能となる。 As a result, even in a restricted device having only a small memory, it is possible to reduce the possibility of inducing a serious processing abnormality due to memory compression.
<その他>
実施の形態の処理は、各機能を具現化したソフトウェアのプログラムコードを記録した記憶媒体をシステム或は装置に提供し、そのシステム或は装置のコンピュータ(又はCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによっても実現することができる。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。このようなプログラムコードを供給するための記憶媒体としては、例えば、フロッピィ(登録商標)ディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM,CD−R、磁気テープ、不揮発性のメモリカード、ROMなどを用いることができる。
<Others>
In the processing of the embodiment, a storage medium recording software program codes embodying each function is provided to a system or apparatus, and a computer (or CPU or MPU) of the system or apparatus is stored in the storage medium. It can also be realized by reading and executing the program code. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention. As a storage medium for supplying such program code, for example, floppy (registered trademark) disk, hard disk, optical disk, magneto-optical disk, CD-ROM, CD-R, magnetic tape, nonvolatile memory card, ROM Etc. can be used.
また、コンピュータが読み出したプログラムコードを実行することにより、前述した各実施の形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOS(オペレーティングシステム)などが実際の処理の一部又は全部を行い、その処理によって前述した各実施の形態の機能が実現される場合も含まれている。 Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an OS (Operating System) running on the computer based on the instruction of the program code. Includes the case where the functions of the above-described embodiments are realized by performing part or all of the actual processing.
更に、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書きこまれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部又は全部を行い、その処理によって前述した各実施の形態の機能が実現される場合も含むものである。 Furthermore, after the program code read from the storage medium is written in the memory provided in the function expansion board inserted into the computer or the function expansion unit connected to the computer, the function is determined based on the instruction of the program code. This includes a case where a CPU or the like provided in an expansion board or function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments are realized by the processing.
Claims (23)
前記符号化データからタイムスタンプを読み取るタイムスタンプ読取手段と、
前記符号化データのフレームレートと前記タイムスタンプに係る第1のクロック精度とに基づいて、第2のクロック精度を提供するための高精度タイムスケールを計算するタイムスケール計算手段と、
前記符号化データ内の2フレーム間の前記タイムスタンプの理論的オフセットである第1のオフセットと、前記高精度タイムスケールにおける2フレーム間の高精度タイムスタンプの理論的オフセットである第2のオフセットを計算するオフセット計算手段と、
前記第1及び第2のオフセットの対応関係に基づいて、前記符号化データのタイムスタンプを、前記高精度タイムスタンプに変換するタイムスタンプ変換手段と、
前記高精度タイムスタンプを用いてタイムスタンプテーブルを生成するタイムスタンプテーブル生成手段と、
を備えることを特徴とするデータ生成装置。 Storage means for storing encoded data;
Time stamp reading means for reading a time stamp from the encoded data;
A time scale calculating means for calculating a high accuracy time scale for providing a second clock accuracy based on a frame rate of the encoded data and a first clock accuracy related to the time stamp;
A first offset that is a theoretical offset of the time stamp between two frames in the encoded data, and a second offset that is a theoretical offset of a high precision time stamp between two frames in the high precision time scale. Offset calculating means for calculating,
A time stamp conversion means for converting a time stamp of the encoded data into the high-accuracy time stamp based on the correspondence relationship between the first and second offsets;
A time stamp table generating means for generating a time stamp table using the high precision time stamp;
A data generation device comprising:
前記誤差判定手段の判定結果に応じて、前記タイムスタンプテーブルを生成することを特徴とする請求項5に記載のデータ生成装置。 The time stamp table generation means further relates to the high precision time stamp obtained by the time stamp conversion means, wherein a third offset which is an actual offset of the high precision time stamp between two consecutive frames is a predetermined error. Error determining means for determining whether or not it is within the range of
The data generation apparatus according to claim 5, wherein the time stamp table is generated according to a determination result of the error determination unit.
前記誤差判定手段の判定結果に応じて、前記タイムスタンプテーブルを生成することを特徴とする請求項9に記載のデータ生成装置。 The time stamp table generation means further comprises error determination means for determining whether or not the fourth offset is within a predetermined error range,
The data generation apparatus according to claim 9, wherein the time stamp table is generated according to a determination result of the error determination unit.
前記マルチメディアデータを符号化して前記符号化データを生成する符号化データ生成手段とを更に備えることを特徴とする請求項1乃至18のいずれか1項に記載のデータ生成装置。 Data receiving means for receiving multimedia data;
The data generation apparatus according to any one of claims 1 to 18, further comprising encoded data generation means for encoding the multimedia data to generate the encoded data.
前記符号化データからタイムスタンプを読み取るタイムスタンプ読取ステップと、
前記符号化データのフレームレートと前記タイムスタンプに係る第1のクロック精度とに基づいて、第2のクロック精度を提供するための高精度タイムスケールを計算するタイムスケール計算ステップと、
前記符号化データ内の2フレーム間の前記タイムスタンプの理論的オフセットである第1のオフセットと、前記高精度タイムスケールにおける2フレーム間の高精度タイムスタンプの理論的オフセットである第2のオフセットを計算するオフセット計算ステップと、
前記第1及び第2のオフセットの対応関係に基づいて、前記符号化データのタイムスタンプを、前記高精度タイムスタンプに変換するタイムスタンプ変換ステップと、
前記高精度タイムスタンプを用いてタイムスタンプテーブルを生成するタイムスタンプテーブル生成ステップと、
を備えることを特徴とするデータ生成方法。 A storage step for storing encoded data;
A time stamp reading step of reading a time stamp from the encoded data;
A time scale calculating step for calculating a high accuracy time scale for providing a second clock accuracy based on a frame rate of the encoded data and a first clock accuracy related to the time stamp;
A first offset that is a theoretical offset of the time stamp between two frames in the encoded data, and a second offset that is a theoretical offset of a high precision time stamp between two frames in the high precision time scale. An offset calculation step to calculate,
A time stamp conversion step of converting a time stamp of the encoded data into the high-accuracy time stamp based on the correspondence between the first and second offsets;
A time stamp table generating step for generating a time stamp table using the high-accuracy time stamp;
A data generation method comprising:
前記符号化データからタイムスタンプを読み取るタイムスタンプ読取ステップを実行するためのコードと、
前記符号化データのフレームレートと前記タイムスタンプに係る第1のクロック精度とに基づいて、第2のクロック精度を提供するための高精度タイムスケールを計算するタイムスケール計算ステップを実行するためのコードと、
前記符号化データ内の2フレーム間の前記タイムスタンプの理論的オフセットである第1のオフセットと、前記高精度タイムスケールにおける2フレーム間の高精度タイムスタンプの理論的オフセットである第2のオフセットを計算するオフセット計算ステップを実行するためのコードと、
前記第1及び第2のオフセットの対応関係に基づいて、前記符号化データのタイムスタンプを、前記高精度タイムスタンプに変換するタイムスタンプ変換ステップを実行するためのコードと、
前記高精度タイムスタンプを用いてタイムスタンプテーブルを生成するタイムスタンプテーブル生成ステップを実行するためのコードと、
を備えることを特徴とするプログラム。 Code for executing a storage step for storing encoded data;
A code for executing a time stamp reading step of reading a time stamp from the encoded data;
Code for executing a time scale calculation step for calculating a high accuracy time scale for providing a second clock accuracy based on a frame rate of the encoded data and a first clock accuracy related to the time stamp When,
A first offset that is a theoretical offset of the time stamp between two frames in the encoded data, and a second offset that is a theoretical offset of a high precision time stamp between two frames in the high precision time scale. Code to perform the offset calculation step to calculate,
A code for executing a time stamp conversion step for converting a time stamp of the encoded data into the high-accuracy time stamp based on the correspondence between the first and second offsets;
A code for executing a time stamp table generating step for generating a time stamp table using the high-precision time stamp;
A program comprising:
A computer-readable storage medium storing the program according to claim 22.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004029594A JP2005223617A (en) | 2004-02-05 | 2004-02-05 | Data generation device and method, and program and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004029594A JP2005223617A (en) | 2004-02-05 | 2004-02-05 | Data generation device and method, and program and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005223617A true JP2005223617A (en) | 2005-08-18 |
Family
ID=34998922
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004029594A Withdrawn JP2005223617A (en) | 2004-02-05 | 2004-02-05 | Data generation device and method, and program and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005223617A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010226585A (en) * | 2009-03-25 | 2010-10-07 | Saxa Inc | Video processing apparatus and control program for the same |
US20220138468A1 (en) * | 2020-11-05 | 2022-05-05 | Axis Ab | Method and image-processing device for video processing |
-
2004
- 2004-02-05 JP JP2004029594A patent/JP2005223617A/en not_active Withdrawn
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010226585A (en) * | 2009-03-25 | 2010-10-07 | Saxa Inc | Video processing apparatus and control program for the same |
US20220138468A1 (en) * | 2020-11-05 | 2022-05-05 | Axis Ab | Method and image-processing device for video processing |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6920181B1 (en) | Method for synchronizing audio and video streams | |
CN101317450B (en) | Recording device, reproduction device, recording method | |
KR101387212B1 (en) | System and method for generating and playing three dimensional image files based on two dimensional image media standards | |
JPH04507484A (en) | digital signal processing system | |
WO2007081477A1 (en) | Converting a still image in a slide show to a plurality of video frame images | |
US7840290B2 (en) | Encoded digital audio reproducing apparatus | |
EP2184740A2 (en) | Reproducing device for reproducing subtitle data having transparency information and corresponding reproducing method, program, and data structure | |
US7835618B2 (en) | Recording apparatus, recording method, program of recording method, and recording medium having program of recording method recorded thereon | |
JP5753418B2 (en) | Image processing device | |
CN104184980A (en) | Data processing method and electronic device | |
US7551838B2 (en) | Moving picture recording apparatus and method thereof with correlating of representative image with thumbnail image recorded in thumbnail file corresponding to moving picture stream data referenced by reference moving picture data | |
US20070154164A1 (en) | Converting a still image in a slide show to a plurality of video frame images | |
MXPA01011505A (en) | Storage of compressed data items. | |
JP2006074391A (en) | File recording method and recorder | |
JP2005223617A (en) | Data generation device and method, and program and computer readable storage medium | |
CN113747159B (en) | Method, device and related components for generating variable frame rate video media file | |
JP2757818B2 (en) | Auxiliary data processing circuit | |
US20030083864A1 (en) | File creating method and data reproduction method | |
KR100899046B1 (en) | Moving-image shooting device, moving-image reproducing device, method of shooting moving-image, method of reproducing a coded video signal and method of reproducing the moving-image | |
JP2007243824A (en) | Apparatus, method and program for multiplexing | |
JP2738659B2 (en) | Encoding method, encoding device, and decoding device | |
JP6806577B2 (en) | Recording device and its control method and program | |
US11863818B2 (en) | Partial frame replacement enabling multiple versions in an integrated video package | |
JP5326724B2 (en) | Video processing apparatus and control program for video processing apparatus | |
TW398130B (en) | The image encoding and decoding device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20070501 |