comparison h264.c @ 7312:f9eaaadcd611 libavcodec

simplify
author michael
date Sat, 19 Jul 2008 03:13:11 +0000
parents 033d10927d45
children 094536cc2e18
comparison
equal deleted inserted replaced
7311:b5dacf4fc65b 7312:f9eaaadcd611
7853 out_idx = i; 7853 out_idx = i;
7854 } 7854 }
7855 7855
7856 out_of_order = !cross_idr && out->poc < h->outputed_poc; 7856 out_of_order = !cross_idr && out->poc < h->outputed_poc;
7857 7857
7858 if(pics <= s->avctx->has_b_frames || out_of_order)
7859 out = NULL;
7860
7861 if(h->sps.bitstream_restriction_flag && s->avctx->has_b_frames >= h->sps.num_reorder_frames) 7858 if(h->sps.bitstream_restriction_flag && s->avctx->has_b_frames >= h->sps.num_reorder_frames)
7862 { } 7859 { }
7863 else if((out_of_order && pics-1 == s->avctx->has_b_frames && pics < 15) 7860 else if((out_of_order && pics-1 == s->avctx->has_b_frames && pics < 15)
7864 || (s->low_delay && 7861 || (s->low_delay &&
7865 ((!cross_idr && out && out->poc > h->outputed_poc + 2) 7862 ((!cross_idr && out && out->poc > h->outputed_poc + 2)
7866 || cur->pict_type == FF_B_TYPE))) 7863 || cur->pict_type == FF_B_TYPE)))
7867 { 7864 {
7868 s->low_delay = 0; 7865 s->low_delay = 0;
7869 s->avctx->has_b_frames++; 7866 s->avctx->has_b_frames++;
7870 out= NULL; 7867 }
7871 } 7868
7869 if(pics <= s->avctx->has_b_frames || out_of_order)
7870 out = NULL;
7872 7871
7873 if(out_of_order || pics > s->avctx->has_b_frames){ 7872 if(out_of_order || pics > s->avctx->has_b_frames){
7874 for(i=out_idx; h->delayed_pic[i]; i++) 7873 for(i=out_idx; h->delayed_pic[i]; i++)
7875 h->delayed_pic[i] = h->delayed_pic[i+1]; 7874 h->delayed_pic[i] = h->delayed_pic[i+1];
7876 } 7875 }