[MPlayer-cvslog] CVS: main/DOCS/tech mpcf.txt,1.88,1.89
Oded Shimon CVS
syncmail at mplayerhq.hu
Fri Jan 6 03:06:25 CET 2006
CVS change done by Oded Shimon CVS
Update of /cvsroot/mplayer/main/DOCS/tech
In directory mail:/var2/tmp/cvs-serv1458
Modified Files:
mpcf.txt
Log Message:
1) remove global_timebase
2) define convert_ts
3) use coded_pts for syncpoint
Index: mpcf.txt
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/tech/mpcf.txt,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -r1.88 -r1.89
--- mpcf.txt 6 Jan 2006 02:05:57 -0000 1.88
+++ mpcf.txt 6 Jan 2006 02:06:22 -0000 1.89
@@ -135,8 +135,6 @@
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 @@
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 @@
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 @@
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
More information about the MPlayer-cvslog
mailing list