# HG changeset patch # User michael # Date 1044551949 0 # Node ID 6d845dfe66db9fa3053cb02766d0bd2e791812ad # Parent 7159ed6a4d0ba2c93470bc2030a35d9077ffcfad update diff -r 7159ed6a4d0b -r 6d845dfe66db DOCS/tech/mpcf.txt --- a/DOCS/tech/mpcf.txt Thu Feb 06 15:33:02 2003 +0000 +++ b/DOCS/tech/mpcf.txt Thu Feb 06 17:19:09 2003 +0000 @@ -9,6 +9,7 @@ Simple use the same encoding for nearly all fields + simple decoding, so slow cpus can handle it Extendible no limit for the possible values for all fields (using universal vlc) allow adding of new headers in the future @@ -35,6 +36,31 @@ Syntax: + Type definitions: +v + value=0 + do{ + more_data u(1) + data u(7) + value= 128*value + data + }while(more_data) + value-=4 + +sz (zero terminated string) + for(i=0; next_byte != 0; i++){ + string[i] u(8) + } + zero_byte f(8) +Note: the string MUST not be 0 bytes long (only a zero byte coded), instead + {'?', 0} should be used instead, this is done to avoid emulating + startcode prefixes (if we allow 0 then there could be 0,0,1 which + is a startcode prefix in mpeg) + +f(x) n fixed bits +u(x) unsigned number encoded in x bits in MSB first order + + + Bitstream syntax: packet header forward ptr v backward ptr v @@ -129,32 +155,13 @@ info_header: (optional) packet header info_startcode f(64) - title sz - author sz - copyright sz - description sz + entry_count v + for(i=0; i 0 - if there is a stream with id n>0 then there MUST be a stream with id n-1 + streams should use low ids stream_class 0 video @@ -274,6 +281,14 @@ position in bytes of the first byte of the keyframe header, relative to the last index_position +name + the name of the info entry, valid names are + "Author","Description","Copyright","Encoder","Title" + Note: if someone needs some others, please tell us about them, so we can + add them to the official standard (if they are sane) + +value + Structure: @@ -292,6 +307,9 @@ and repeated headers MUST be identical headers MUST be repeated every 10sec at least ? FIXME + +the info_header can be repeated, it can also contain different names & values +each time Sample code (GPL, & untested)