comparison h264.c @ 8967:f0abc5f9e726 libavcodec

Parse cbp_removal_delay in SEI picture structure. Patch by Ivan Schreter, schreter gmx net
author cehoyos
date Wed, 18 Feb 2009 00:38:10 +0000
parents 328b7d545d0b
children 9757b2f87d83
comparison
equal deleted inserted replaced
8966:328b7d545d0b 8967:f0abc5f9e726
2208 h->thread_context[0] = h; 2208 h->thread_context[0] = h;
2209 h->outputed_poc = INT_MIN; 2209 h->outputed_poc = INT_MIN;
2210 h->prev_poc_msb= 1<<16; 2210 h->prev_poc_msb= 1<<16;
2211 h->sei_recovery_frame_cnt = -1; 2211 h->sei_recovery_frame_cnt = -1;
2212 h->sei_dpb_output_delay = 0; 2212 h->sei_dpb_output_delay = 0;
2213 h->sei_cpb_removal_delay = -1;
2213 return 0; 2214 return 0;
2214 } 2215 }
2215 2216
2216 static int frame_start(H264Context *h){ 2217 static int frame_start(H264Context *h){
2217 MpegEncContext * const s = &h->s; 2218 MpegEncContext * const s = &h->s;
3144 if(h->s.current_picture_ptr) 3145 if(h->s.current_picture_ptr)
3145 h->s.current_picture_ptr->reference= 0; 3146 h->s.current_picture_ptr->reference= 0;
3146 h->s.first_field= 0; 3147 h->s.first_field= 0;
3147 h->sei_recovery_frame_cnt = -1; 3148 h->sei_recovery_frame_cnt = -1;
3148 h->sei_dpb_output_delay = 0; 3149 h->sei_dpb_output_delay = 0;
3150 h->sei_cpb_removal_delay = -1;
3149 ff_mpeg_flush(avctx); 3151 ff_mpeg_flush(avctx);
3150 } 3152 }
3151 3153
3152 /** 3154 /**
3153 * Find a Picture in the short term reference list by frame number. 3155 * Find a Picture in the short term reference list by frame number.
6781 } 6783 }
6782 6784
6783 static int decode_picture_timing(H264Context *h){ 6785 static int decode_picture_timing(H264Context *h){
6784 MpegEncContext * const s = &h->s; 6786 MpegEncContext * const s = &h->s;
6785 if(h->sps.nal_hrd_parameters_present_flag || h->sps.vcl_hrd_parameters_present_flag){ 6787 if(h->sps.nal_hrd_parameters_present_flag || h->sps.vcl_hrd_parameters_present_flag){
6786 skip_bits(&s->gb, h->sps.cpb_removal_delay_length); /* cpb_removal_delay */ 6788 h->sei_cpb_removal_delay = get_bits(&s->gb, h->sps.cpb_removal_delay_length);
6787 h->sei_dpb_output_delay = get_bits(&s->gb, h->sps.dpb_output_delay_length); 6789 h->sei_dpb_output_delay = get_bits(&s->gb, h->sps.dpb_output_delay_length);
6788 } 6790 }
6789 if(h->sps.pic_struct_present_flag){ 6791 if(h->sps.pic_struct_present_flag){
6790 unsigned int i, num_clock_ts; 6792 unsigned int i, num_clock_ts;
6791 h->sei_pic_struct = get_bits(&s->gb, 4); 6793 h->sei_pic_struct = get_bits(&s->gb, 4);
7692 ff_er_frame_end(s); 7694 ff_er_frame_end(s);
7693 7695
7694 MPV_frame_end(s); 7696 MPV_frame_end(s);
7695 h->sei_recovery_frame_cnt = -1; 7697 h->sei_recovery_frame_cnt = -1;
7696 h->sei_dpb_output_delay = 0; 7698 h->sei_dpb_output_delay = 0;
7699 h->sei_cpb_removal_delay = -1;
7697 7700
7698 if (cur->field_poc[0]==INT_MAX || cur->field_poc[1]==INT_MAX) { 7701 if (cur->field_poc[0]==INT_MAX || cur->field_poc[1]==INT_MAX) {
7699 /* Wait for second field. */ 7702 /* Wait for second field. */
7700 *data_size = 0; 7703 *data_size = 0;
7701 7704