changeset 10831:3f716efeb27a

moved packet header after startcodes
author alex
date Sun, 07 Sep 2003 01:15:01 +0000
parents ca838366710d
children a8d999c7bb83
files DOCS/tech/mpcf.txt
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/tech/mpcf.txt	Sat Sep 06 22:42:02 2003 +0000
+++ b/DOCS/tech/mpcf.txt	Sun Sep 07 01:15:01 2003 +0000
@@ -18,6 +18,8 @@
 Compact
 	~0.2% overhead, for normal bitrates
 	index is <10kb per hour (1 keyframe every 3sec)
+	a usual header for a file is about 100bytes (audio + video headers together)
+	a packet header is about ~8 bytes
 Error resistant
 	seeking / playback without an index
 	headers & index can be repeated
@@ -82,8 +84,8 @@
 	a compatible way
 
 main header:
+	main_startcode				f(64)
 	packet header
-	main_startcode				f(64)
 	version					v
 	stream_count				v
 	file_size				v
@@ -92,8 +94,8 @@
 	checksum				u(32)
 
 stream_header:
+	stream_startcode			f(64)
 	packet_header
-	stream_startcode			f(64)
 	stream_id				v
 	stream_class				v
 	fourcc					b
@@ -130,7 +132,6 @@
 	checksum				u(32)
 
 frame
-	packet header
 	if(keyframe){
 		keyframe_startcode		f(64)
 	}
@@ -140,6 +141,7 @@
 	msb_timestamp_flag			u(1)
 	subpacket_type				u(2)
 	reserved				u(1)
+	packet header
 	stream_id				v
 	if(msb_timestamp_flag)
 		msb_timestamp			v
@@ -168,8 +170,8 @@
 		frame_checksum			u(32)
 
 Index:
+	index_startcode				f(64)
 	packet header
-	index_startcode				f(64)
 	stream_id				v
 	index_length				v
 	for(i=0; i<index_length; i++){
@@ -180,8 +182,8 @@
 	checksum				u(32)
 
 info_packet: (optional)
+	info_startcode				f(64)
 	packet header
-	info_startcode				f(64)
 	for(;;){
 		id				v
 		if(id==0) break