comparison h264.c @ 9877:7c769effb964 libavcodec

Revert r19239: It broke four conformance tests.
author cehoyos
date Sat, 20 Jun 2009 14:47:38 +0000
parents c4ef915fbefa
children ffc0f9de5743
comparison
equal deleted inserted replaced
9876:2719d29359c6 9877:7c769effb964
7706 int i, out_idx; 7706 int i, out_idx;
7707 7707
7708 //FIXME factorize this with the output code below 7708 //FIXME factorize this with the output code below
7709 out = h->delayed_pic[0]; 7709 out = h->delayed_pic[0];
7710 out_idx = 0; 7710 out_idx = 0;
7711 for(i=1; h->delayed_pic[i] && !h->delayed_pic[i]->key_frame; i++) 7711 for(i=1; h->delayed_pic[i] && (h->delayed_pic[i]->poc && !h->delayed_pic[i]->key_frame); i++)
7712 if(h->delayed_pic[i]->poc < out->poc){ 7712 if(h->delayed_pic[i]->poc < out->poc){
7713 out = h->delayed_pic[i]; 7713 out = h->delayed_pic[i];
7714 out_idx = i; 7714 out_idx = i;
7715 } 7715 }
7716 7716
7882 if(cur->reference == 0) 7882 if(cur->reference == 0)
7883 cur->reference = DELAYED_PIC_REF; 7883 cur->reference = DELAYED_PIC_REF;
7884 7884
7885 out = h->delayed_pic[0]; 7885 out = h->delayed_pic[0];
7886 out_idx = 0; 7886 out_idx = 0;
7887 for(i=1; h->delayed_pic[i] && !h->delayed_pic[i]->key_frame; i++) 7887 for(i=1; h->delayed_pic[i] && (h->delayed_pic[i]->poc && !h->delayed_pic[i]->key_frame); i++)
7888 if(h->delayed_pic[i]->poc < out->poc){ 7888 if(h->delayed_pic[i]->poc < out->poc){
7889 out = h->delayed_pic[i]; 7889 out = h->delayed_pic[i];
7890 out_idx = i; 7890 out_idx = i;
7891 } 7891 }
7892 cross_idr = !!h->delayed_pic[i] || h->delayed_pic[0]->key_frame; 7892 cross_idr = !h->delayed_pic[0]->poc || !!h->delayed_pic[i] || h->delayed_pic[0]->key_frame;
7893 7893
7894 out_of_order = !cross_idr && out->poc < h->outputed_poc; 7894 out_of_order = !cross_idr && out->poc < h->outputed_poc;
7895 7895
7896 if(h->sps.bitstream_restriction_flag && s->avctx->has_b_frames >= h->sps.num_reorder_frames) 7896 if(h->sps.bitstream_restriction_flag && s->avctx->has_b_frames >= h->sps.num_reorder_frames)
7897 { } 7897 { }