comparison h264.c @ 7417:5b281979b60e libavcodec

Simple refactoring to resolve a FIXME. Patch by Paul Kendall.
author darkshikari
date Sat, 26 Jul 2008 15:07:04 +0000
parents f25c192ce081
children 30e8c4bf08a4
comparison
equal deleted inserted replaced
7416:a65363f8ab4b 7417:5b281979b60e
2909 MpegEncContext * const s = &h->s; 2909 MpegEncContext * const s = &h->s;
2910 int list, index, pic_structure; 2910 int list, index, pic_structure;
2911 2911
2912 print_short_term(h); 2912 print_short_term(h);
2913 print_long_term(h); 2913 print_long_term(h);
2914 if(h->slice_type_nos==FF_I_TYPE) return 0; //FIXME move before function
2915 2914
2916 for(list=0; list<h->list_count; list++){ 2915 for(list=0; list<h->list_count; list++){
2917 memcpy(h->ref_list[list], h->default_ref_list[list], sizeof(Picture)*h->ref_count[list]); 2916 memcpy(h->ref_list[list], h->default_ref_list[list], sizeof(Picture)*h->ref_count[list]);
2918 2917
2919 if(get_bits1(&s->gb)){ 2918 if(get_bits1(&s->gb)){
3986 3985
3987 if(!default_ref_list_done){ 3986 if(!default_ref_list_done){
3988 fill_default_ref_list(h); 3987 fill_default_ref_list(h);
3989 } 3988 }
3990 3989
3991 if(decode_ref_pic_list_reordering(h) < 0) 3990 if(h->slice_type_nos!=FF_I_TYPE && decode_ref_pic_list_reordering(h) < 0)
3992 return -1; 3991 return -1;
3993 3992
3994 if( (h->pps.weighted_pred && h->slice_type_nos == FF_P_TYPE ) 3993 if( (h->pps.weighted_pred && h->slice_type_nos == FF_P_TYPE )
3995 || (h->pps.weighted_bipred_idc==1 && h->slice_type_nos== FF_B_TYPE ) ) 3994 || (h->pps.weighted_bipred_idc==1 && h->slice_type_nos== FF_B_TYPE ) )
3996 pred_weight_table(h); 3995 pred_weight_table(h);