Mercurial > mplayer.hg
comparison DOCS/tech/mpcf.txt @ 17887:f20bba087cc8
flags cleanup
author | michael |
---|---|
date | Sat, 18 Mar 2006 12:13:48 +0000 |
parents | 063c90340a34 |
children | daa0fdad26ed |
comparison
equal
deleted
inserted
replaced
17886:d526e19c56c3 | 17887:f20bba087cc8 |
---|---|
180 flags[i]= FLAG_INVALID; | 180 flags[i]= FLAG_INVALID; |
181 j--; | 181 j--; |
182 continue; | 182 continue; |
183 } | 183 } |
184 flags[i]= tmp_flag; | 184 flags[i]= tmp_flag; |
185 stream_id_plus1[i]= tmp_stream; | 185 stream_id[i]= tmp_stream; |
186 data_size_mul[i]= tmp_mul; | 186 data_size_mul[i]= tmp_mul; |
187 data_size_lsb[i]= tmp_size + j; | 187 data_size_lsb[i]= tmp_size + j; |
188 pts_delta[i]= tmp_pts; | 188 pts_delta[i]= tmp_pts; |
189 reserved_count[i]= tmp_res; | 189 reserved_count[i]= tmp_res; |
190 } | 190 } |
215 | 215 |
216 Basic Packets: | 216 Basic Packets: |
217 | 217 |
218 frame: | 218 frame: |
219 frame_code f(8) | 219 frame_code f(8) |
220 if(stream_id_plus1[frame_code]==0){ | |
221 stream_id v | |
222 } | |
223 if(pts_delta[frame_code]==0){ | |
224 coded_pts v | |
225 } | |
226 frame_flags= flags[frame_code] | 220 frame_flags= flags[frame_code] |
227 if(frame_flags&FLAG_CODED){ | 221 if(frame_flags&FLAG_CODED){ |
228 coded_flags v | 222 coded_flags v |
229 frame_flags ^= coded_flags | 223 frame_flags ^= coded_flags |
230 } | 224 } |
225 if(frame_flags&FLAG_STREAM_ID){ | |
226 stream_id v | |
227 } | |
228 if(frame_flags&FLAG_CODED_PTS){ | |
229 coded_pts v | |
230 } | |
231 if(frame_flags&FLAG_SIZE_MSB){ | 231 if(frame_flags&FLAG_SIZE_MSB){ |
232 data_size_msb v | 232 data_size_msb v |
233 } | 233 } |
234 if(frame_flags&FLAG_RESERVED) | |
235 reserved_count[frame_code] v | |
234 for(i=0; i<reserved_count[frame_code]; i++) | 236 for(i=0; i<reserved_count[frame_code]; i++) |
235 reserved v | 237 reserved v |
236 if(frame_flags&FLAG_CHECKSUM){ | 238 if(frame_flags&FLAG_CHECKSUM){ |
237 checksum u(32) | 239 checksum u(32) |
238 } | 240 } |
511 flags[frame_code], frame_flags | 513 flags[frame_code], frame_flags |
512 Bit Name Description | 514 Bit Name Description |
513 1 FLAG_KEY if set, frame is keyframe | 515 1 FLAG_KEY if set, frame is keyframe |
514 2 FLAG_EOR if set, stream has no relevance on | 516 2 FLAG_EOR if set, stream has no relevance on |
515 presentation. (EOR) | 517 presentation. (EOR) |
518 8 FLAG_CODED_PTS if set, coded_pts is in the frame header | |
519 16 FLAG_STREAM_ID if set, stream_id is coded in the frame header | |
516 32 FLAG_SIZE_MSB if set, data_size_msb is at frame header, | 520 32 FLAG_SIZE_MSB if set, data_size_msb is at frame header, |
517 otherwise data_size_msb is 0 | 521 otherwise data_size_msb is 0 |
518 64 FLAG_CHECKSUM if set then the frame header contains a checksum | 522 64 FLAG_CHECKSUM if set then the frame header contains a checksum |
523 128 FLAG_RESERVED if set, reserved_count is coded in the frame header | |
519 4096 FLAG_CODED if set, coded_flags are stored in the frame header. | 524 4096 FLAG_CODED if set, coded_flags are stored in the frame header. |
520 8192 FLAG_INVALID if set, frame_code is invalid. | 525 8192 FLAG_INVALID if set, frame_code is invalid. |
521 | 526 |
522 EOR frames MUST be zero-length and must be set keyframe. | 527 EOR frames MUST be zero-length and must be set keyframe. |
523 All streams SHOULD end with EOR, where the pts of the EOR indicates the | 528 All streams SHOULD end with EOR, where the pts of the EOR indicates the |
525 An EOR set stream is unset by the first content frames. | 530 An EOR set stream is unset by the first content frames. |
526 EOR can only be unset in streams with zero decode_delay . | 531 EOR can only be unset in streams with zero decode_delay . |
527 FLAG_CHECKSUM MUST be set if the frame is larger than 2*max_distance or | 532 FLAG_CHECKSUM MUST be set if the frame is larger than 2*max_distance or |
528 its pts differs by more then max_pts_distance from the last frame | 533 its pts differs by more then max_pts_distance from the last frame |
529 | 534 |
530 stream_id_plus1[frame_code] | 535 stream_id[frame_code] |
531 MUST be <250 | 536 MUST be <250 |
532 if it is 0, then the stream_id is coded in the frame | |
533 | 537 |
534 data_size_mul[frame_code] | 538 data_size_mul[frame_code] |
535 MUST be <16384 | 539 MUST be <16384 |
536 | 540 |
537 data_size_lsb[frame_code] | 541 data_size_lsb[frame_code] |