Mercurial > mplayer.hg
comparison DOCS/tech/mpcf.txt @ 9299:aa26f77e7aae
remove non byte sized stuff
remove more useless startcode emulation prevention stuff
author | michael |
---|---|
date | Thu, 06 Feb 2003 20:18:59 +0000 |
parents | 8a19be9649e7 |
children | ec18ad315bbe |
comparison
equal
deleted
inserted
replaced
9298:9d247c54923e | 9299:aa26f77e7aae |
---|---|
40 do{ | 40 do{ |
41 more_data u(1) | 41 more_data u(1) |
42 data u(7) | 42 data u(7) |
43 value= 128*value + data | 43 value= 128*value + data |
44 }while(more_data) | 44 }while(more_data) |
45 value-=4 | |
46 | 45 |
47 sz (zero terminated string) | 46 sz (zero terminated string) |
48 for(i=0; next_byte != 0; i++){ | 47 for(i=0; next_byte != 0; i++){ |
49 string[i] u(8) | 48 string[i] u(8) |
50 } | 49 } |
122 frame | 121 frame |
123 packet header | 122 packet header |
124 if(keyframe){ | 123 if(keyframe){ |
125 keyframe_startcode f(64) | 124 keyframe_startcode f(64) |
126 } | 125 } |
127 lsb_timestamp u(lsb_timestamp_length) | 126 lsb_timestamp v |
128 stream_id u(log2_stream_count) | 127 stream_id v |
129 priority u(2) | 128 priority u(2) |
130 checksum_flag u(1) | 129 checksum_flag u(1) |
131 msb_timestamp_flag u(1) | 130 msb_timestamp_flag u(1) |
132 align_byte | 131 reserved u(4) |
133 if(msb_timestamp_flag) | 132 if(msb_timestamp_flag) |
134 msb_timestamp v | 133 msb_timestamp v |
135 bitstream | 134 bitstream |
136 if(checksum_flag) | 135 if(checksum_flag) |
137 checksum u(32) | 136 checksum u(32) |
351 for(;;){ | 350 for(;;){ |
352 int tmp= *(bc->buf_ptr++); | 351 int tmp= *(bc->buf_ptr++); |
353 if(tmp&0x80) | 352 if(tmp&0x80) |
354 val= (val<<7) + tmp - 0x80; | 353 val= (val<<7) + tmp - 0x80; |
355 else | 354 else |
356 return (val<<7) + tmp - 4; | 355 return (val<<7) + tmp; |
357 } | 356 } |
358 } | 357 } |
359 | 358 |
360 static inline void put_v(BufferContext *bc, uint64_t val){ | 359 static inline void put_v(BufferContext *bc, uint64_t val){ |
361 int i; | 360 int i; |
362 val+=4; | |
363 | 361 |
364 assert(val); | 362 assert(val); |
365 | 363 |
366 for(i=56;; i-=8){ | 364 for(i=56;; i-=8){ |
367 if(val>>i) break; | 365 if(val>>i) break; |