Mercurial > mplayer.hg
comparison DOCS/tech/mpcf.txt @ 9420:8a1a8f5e9c91
variable subpacket size support
author | michael |
---|---|
date | Fri, 14 Feb 2003 11:11:11 +0000 |
parents | e1e2177841ef |
children | 4baee69b8e39 |
comparison
equal
deleted
inserted
replaced
9419:dfefd7f0c0a8 | 9420:8a1a8f5e9c91 |
---|---|
111 | 111 |
112 audio_stream_header: | 112 audio_stream_header: |
113 stream_header | 113 stream_header |
114 samplerate v | 114 samplerate v |
115 channel_count v | 115 channel_count v |
116 sub_packet_size v | |
117 shuffle_type v | |
118 reserved_bytes | 116 reserved_bytes |
119 checksum u(32) | 117 checksum u(32) |
120 | 118 |
121 frame | 119 frame |
122 packet header | 120 packet header |
123 if(keyframe){ | 121 if(keyframe){ |
124 keyframe_startcode f(64) | 122 keyframe_startcode f(64) |
125 } | 123 } |
126 zero_bit f(1) | 124 zero_bit f(1) |
127 priority u(2) | 125 priority u(2) |
128 checksum_flag u(1) | 126 checksum_flag u(1) |
129 msb_timestamp_flag u(1) | 127 msb_timestamp_flag u(1) |
130 reserved u(3) | 128 subpacket_type u(2) |
129 reserved u(1) | |
131 lsb_timestamp v | 130 lsb_timestamp v |
132 stream_id v | 131 stream_id v |
133 if(msb_timestamp_flag) | 132 if(msb_timestamp_flag) |
134 msb_timestamp v | 133 msb_timestamp v |
135 bitstream | 134 if(sub_packet_type==00) |
136 if(checksum_flag) | 135 sub_packet[0] |
136 else{ | |
137 subpacket_base_size v | |
138 subpacket_count v | |
139 shuffle_type v | |
140 if(subpacket_type==10){ | |
141 for(i=0; i<subpacket_count; i++) | |
142 subpacket_size_diff[i] v | |
143 } | |
144 for(i=0; i<subpacket_count; i++) | |
145 subpacket[i] | |
146 } | |
147 } | |
148 if(checksum_flag) | |
137 frame_checksum u(32) | 149 frame_checksum u(32) |
138 | 150 |
139 Index: | 151 Index: |
140 packet header | 152 packet header |
141 index_startcode f(64) | 153 index_startcode f(64) |
269 | 281 |
270 msb_timestamp_flag | 282 msb_timestamp_flag |
271 indicates that the msb_timestamp is coded | 283 indicates that the msb_timestamp is coded |
272 MUST be 1 for keyframes | 284 MUST be 1 for keyframes |
273 | 285 |
286 subpacket_type | |
287 00 1 subpacket per packet (normally used for video) | |
288 01 subpacket_count fixed length subpackets per packet | |
289 10 subpacket_count variable length subpackets per packet | |
290 11 reserved | |
291 Note, if there are multiple subpackets then the timestamp of the packet | |
292 is the timestamp of the first subpacket | |
293 Note, if multiple subpackets are stored in one frame then the resulting | |
294 framesize SHOULD be < 16kbyte and not more then 0.5 sec of data SHOULD | |
295 be put in a single packet | |
296 | |
297 subpacket_base_size | |
298 the size of the subpackets for fixed fize subpackets | |
299 an offset which should be added to the subpacket_size_diff of each | |
300 subpacket to get the actual size, so its normally the size of the | |
301 smallest subpacket | |
302 | |
303 subpacket_count | |
304 the number of subpackets, if not pressent then 1 | |
305 | |
306 subpacket_size_diff | |
307 the (allways positive) difference from the subpacket_base_size to the | |
308 actual size of the current subpacket, if its not coded | |
309 (subpacket_type != 10) then its 0 | |
310 Note a subpacket MUST be in exactly one packet, it cannot be split | |
311 | |
274 msb_timestamp | 312 msb_timestamp |
275 most significant bits of the timestamp, SHOULD be 0 for the first frame | 313 most significant bits of the timestamp, SHOULD be 0 for the first frame |
276 | 314 |
277 lsb_timestamp | 315 lsb_timestamp |
278 most significant bits of the timestamp in time_base precission, with | 316 most significant bits of the timestamp in time_base precission, with |
308 | 346 |
309 priority | 347 priority |
310 if 0 then the frame isnt used as reference (b frame) and can be droped | 348 if 0 then the frame isnt used as reference (b frame) and can be droped |
311 MUST be > 0 for keyframes | 349 MUST be > 0 for keyframes |
312 | 350 |
313 sub_packet_size | |
314 size of an audio packet | |
315 Note a subpacket MUST be in exactly one packet, it cannot be split | |
316 | |
317 shuffle_type | 351 shuffle_type |
318 audio is often encoded in small fixed size packets, and to increase the | 352 audio is often encoded in small subpackets, and to increase the |
319 error robustness these can be shuffled | 353 error robustness these can be shuffled |
320 0 -> no shuffle | 354 0 -> no shuffle |
321 1-16 -> interleave packets by 2^n | 355 1-16 -> interleave packets by 2^n |
322 | 356 |
323 checksum | 357 checksum |