summaryrefslogtreecommitdiffstats
path: root/DOCS/tech
diff options
context:
space:
mode:
authorods15 <ods15@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-01-06 02:06:22 +0000
committerods15 <ods15@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-01-06 02:06:22 +0000
commit877e48ebc9ccd580e7c7d06e25f8dc0845f0f025 (patch)
tree476bb5f6b16d9b8b3ad831cebb26e9ae72db5517 /DOCS/tech
parenta3b18c8f2760a6991805193b00af0819a065c6ac (diff)
downloadmpv-877e48ebc9ccd580e7c7d06e25f8dc0845f0f025.tar.bz2
mpv-877e48ebc9ccd580e7c7d06e25f8dc0845f0f025.tar.xz
1) remove global_timebase
2) define convert_ts 3) use coded_pts for syncpoint git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17329 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'DOCS/tech')
-rw-r--r--DOCS/tech/mpcf.txt35
1 files changed, 16 insertions, 19 deletions
diff --git a/DOCS/tech/mpcf.txt b/DOCS/tech/mpcf.txt
index ba79ffeb15..201ced84a2 100644
--- a/DOCS/tech/mpcf.txt
+++ b/DOCS/tech/mpcf.txt
@@ -135,8 +135,6 @@ main header:
stream_count v
max_distance v
max_index_distance v
- global_time_base_nom v
- global_time_base_denom v
for(i=0; i<256; ){
tmp_flag v
tmp_fields v
@@ -258,7 +256,9 @@ info_packet: (optional)
syncpoint:
syncpoint_startcode f(64)
- global_timestamp v
+ coded_pts v
+ stream = coded_pts % stream_count
+ global_key_pts = coded_pts/stream_count
back_ptr v
Complete definition:
@@ -306,6 +306,10 @@ back_ptr
one keyframe for each stream lies between the syncpoint to which
real_back_ptr points, and the current syncpoint.
+global_key_pts
+ After a syncpoint, last_pts of each stream is to be set to:
+ last_pts[i] = convert_ts(global_key_pts, timebase[stream], timebase[i])
+
file_id_string
"nut/multimedia container\0"
@@ -383,22 +387,15 @@ time_base_nom / time_base_denom = time_base
29.97 1001 30000
23.976 1001 24000
-global_time_base_nom / global_time_base_denom = global_time_base
- the length of a timer tick in seconds
- global_time_base_nom and global_time_base_denom MUST NOT be 0
- global_time_base_nom and global_time_base_denom MUST be relatively prime
- global_time_base_denom MUST be < 2^31
-
-global_timestamp
- timestamp in global_time_base units
- when a global_timestamp is encountered the last_pts of all
- streams is set to the following:
-
- ln = global_time_base_nom*time_base_denom
- sn = global_timestamp
- d1 = global_time_base_denom
- d2 = time_base_nom
- last_pts = (ln/d1*sn + ln%d1*sn/d1)/d2
+convert_ts
+ To switch from 2 different timebases, the following calculation is
+ defined:
+
+ ln = from_time_base_nom*to_time_base_denom
+ sn = from_timestamp
+ d1 = from_time_base_denom
+ d2 = to_time_base_nom
+ timestamp = (ln/d1*sn + ln%d1*sn/d1)/d2
Note: this calculation MUST be done with unsigned 64 bit integers, and
is equivalent to (ln*sn)/(d1*d2) but this would require a 96bit integer