Changeset 595
- Timestamp:
- 06/20/07 22:11:21 (1 year ago)
- Files:
-
- trunk/FFusionCodec.c (modified) (1 diff)
- trunk/bitstream_info.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/FFusionCodec.c
r594 r595 948 948 949 949 drp->frameType = qtTypeForFrameInfo(drp->frameType, type, skippable); 950 myDrp->frameData->frameNumber = p->frameNumber; 951 myDrp->frameData->skippabble = skippable; 950 if(myDrp->frameData != NULL) 951 { 952 myDrp->frameData->frameNumber = p->frameNumber; 953 myDrp->frameData->skippabble = skippable; 954 } 952 955 Codecprintf(glob->fileLog, "began frame %d as %d:%d\n", p->frameNumber, type, skippable); 953 956 } trunk/bitstream_info.c
r588 r595 138 138 acl->mChannelLayoutTag = ac3_layout_no_lfe[acmod]; 139 139 140 return 1; 141 } 142 143 static int parse_mpeg4_extra(FFusionParserContext *parser, const uint8_t *buf, int buf_size) 144 { 145 ParseContext1 *pc1 = (ParseContext1 *)parser->pc->priv_data; 146 pc1->pc.frame_start_found = 0; 147 148 MpegEncContext *s = pc1->enc; 149 GetBitContext gb1, *gb = &gb1; 150 151 s->avctx = parser->avctx; 152 s->current_picture_ptr = &s->current_picture; 153 154 init_get_bits(gb, buf, 8 * buf_size); 155 ff_mpeg4_decode_picture_header(s, gb); 140 156 return 1; 141 157 } … … 208 224 sizeof(uint64_t), 209 225 NULL, 210 NULL,226 parse_mpeg4_extra, 211 227 parse_mpeg4_stream, 212 228 }; … … 216 232 int is_avc; 217 233 int nal_length_size; 218 #if 0 /*this was an attempt to figure out the PTS information and detect an out of order P frame before we hit its B frame */219 234 int prevPts; 220 #endif221 235 222 236 int poc_type; … … 226 240 227 241 int log2_max_poc_lsb; 228 #if 0 /*this was an attempt to figure out the PTS information and detect an out of order P frame before we hit its B frame */229 242 int poc_msb; 230 243 int prev_poc_lsb; 231 #endif232 244 233 245 int delta_pic_order_always_zero_flag; … … 362 374 GetBitContext getbit, *gb = &getbit; 363 375 int slice_type; 364 #if 0 /*this was an attempt to figure out the PTS information and detect an out of order P frame before we hit its B frame */365 376 int field_pic_flag = 0; 366 377 int bottom_field_flag = 0; 367 378 int frame_number; 368 #endif 369 static const uint8_t slice_type_map[5] = {FF_P_TYPE, FF_ B_TYPE, FF_I_TYPE, FF_SP_TYPE, FF_SI_TYPE};379 // static const uint8_t slice_type_map[5] = {FF_P_TYPE, FF_B_TYPE, FF_I_TYPE, FF_SP_TYPE, FF_SI_TYPE}; 380 static const uint8_t slice_type_map[5] = {FF_P_TYPE, FF_P_TYPE, FF_I_TYPE, FF_SP_TYPE, FF_SI_TYPE}; 370 381 371 382 init_get_bits(gb, buf, 8 * buf_size); … … 382 393 if(just_type) 383 394 return 1; 384 #if 0 /*this was an attempt to figure out the PTS information and detect an out of order P frame before we hit its B frame */385 395 386 396 get_ue_golomb(gb); //pic_parameter_set_id … … 449 459 *pts = expectedpoc + delta_pic_order_cnt[0]; 450 460 } 451 #endif452 461 453 462 return 1; … … 461 470 int buf_index = 0; 462 471 int ret = 0; 463 int pts_decoded = 1;472 int pts_decoded = 0; 464 473 int lowestType = 20; 465 474 … … 557 566 if(nal_ref_idc) 558 567 *skippable = 0; 559 #if 0 /*this was an attempt to figure out the PTS information and detect an out of order P frame before we hit its B frame */560 568 if(pts_decoded == 0) 561 569 { … … 563 571 if(pts > context->prevPts) 564 572 { 565 if(pts > context->prevPts + 1) 566 *precedesAPastFrame = 1; 567 else 568 *precedesAPastFrame = 0; 573 if(pts < context->prevPts) 574 lowestType = FF_B_TYPE; 569 575 context->prevPts = pts; 570 576 } 571 else572 *precedesAPastFrame = 0;573 577 } 574 #endif575 578 } 576 579 }
