comparison h264.c @ 2792:0a8c847ad5e7 libavcodec

skip_idct skip_frame skip_loop_filter
author michael
date Thu, 14 Jul 2005 21:39:36 +0000
parents 899a2ea0907c
children ae85da6c5c2f
comparison
equal deleted inserted replaced
2791:f191093dc8fe 2792:0a8c847ad5e7
4347 if( h->deblocking_filter ) { 4347 if( h->deblocking_filter ) {
4348 h->slice_alpha_c0_offset = get_se_golomb(&s->gb) << 1; 4348 h->slice_alpha_c0_offset = get_se_golomb(&s->gb) << 1;
4349 h->slice_beta_offset = get_se_golomb(&s->gb) << 1; 4349 h->slice_beta_offset = get_se_golomb(&s->gb) << 1;
4350 } 4350 }
4351 } 4351 }
4352 if( s->avctx->skip_loop_filter >= AVDISCARD_ALL
4353 ||(s->avctx->skip_loop_filter >= AVDISCARD_NONKEY && h->slice_type != I_TYPE)
4354 ||(s->avctx->skip_loop_filter >= AVDISCARD_BIDIR && h->slice_type == B_TYPE)
4355 ||(s->avctx->skip_loop_filter >= AVDISCARD_NONREF && h->nal_ref_idc == 0))
4356 h->deblocking_filter= 0;
4352 4357
4353 #if 0 //FMO 4358 #if 0 //FMO
4354 if( h->pps.num_slice_groups > 1 && h->pps.mb_slice_group_map_type >= 3 && h->pps.mb_slice_group_map_type <= 5) 4359 if( h->pps.num_slice_groups > 1 && h->pps.mb_slice_group_map_type >= 3 && h->pps.mb_slice_group_map_type <= 5)
4355 slice_group_change_cycle= get_bits(&s->gb, ?); 4360 slice_group_change_cycle= get_bits(&s->gb, ?);
4356 #endif 4361 #endif
7243 if (h->is_avc && (nalsize != consumed)) 7248 if (h->is_avc && (nalsize != consumed))
7244 av_log(h->s.avctx, AV_LOG_ERROR, "AVC: Consumed only %d bytes instead of %d\n", consumed, nalsize); 7249 av_log(h->s.avctx, AV_LOG_ERROR, "AVC: Consumed only %d bytes instead of %d\n", consumed, nalsize);
7245 7250
7246 buf_index += consumed; 7251 buf_index += consumed;
7247 7252
7248 if( s->hurry_up == 1 && h->nal_ref_idc == 0 ) 7253 if( (s->hurry_up == 1 && h->nal_ref_idc == 0)
7254 ||(avctx->skip_frame >= AVDISCARD_NONREF && h->nal_ref_idc == 0))
7249 continue; 7255 continue;
7250 7256
7251 switch(h->nal_unit_type){ 7257 switch(h->nal_unit_type){
7252 case NAL_IDR_SLICE: 7258 case NAL_IDR_SLICE:
7253 idr(h); //FIXME ensure we don't loose some frames if there is reordering 7259 idr(h); //FIXME ensure we don't loose some frames if there is reordering
7259 7265
7260 if(decode_slice_header(h) < 0){ 7266 if(decode_slice_header(h) < 0){
7261 av_log(h->s.avctx, AV_LOG_ERROR, "decode_slice_header error\n"); 7267 av_log(h->s.avctx, AV_LOG_ERROR, "decode_slice_header error\n");
7262 break; 7268 break;
7263 } 7269 }
7264 if(h->redundant_pic_count==0 && s->hurry_up < 5 ) 7270 if(h->redundant_pic_count==0 && s->hurry_up < 5 && avctx->skip_frame < AVDISCARD_ALL)
7265 decode_slice(h); 7271 decode_slice(h);
7266 break; 7272 break;
7267 case NAL_DPA: 7273 case NAL_DPA:
7268 init_get_bits(&s->gb, ptr, bit_length); 7274 init_get_bits(&s->gb, ptr, bit_length);
7269 h->intra_gb_ptr= 7275 h->intra_gb_ptr=
7280 break; 7286 break;
7281 case NAL_DPC: 7287 case NAL_DPC:
7282 init_get_bits(&h->inter_gb, ptr, bit_length); 7288 init_get_bits(&h->inter_gb, ptr, bit_length);
7283 h->inter_gb_ptr= &h->inter_gb; 7289 h->inter_gb_ptr= &h->inter_gb;
7284 7290
7285 if(h->redundant_pic_count==0 && h->intra_gb_ptr && s->data_partitioning && s->hurry_up < 5 ) 7291 if(h->redundant_pic_count==0 && h->intra_gb_ptr && s->data_partitioning
7292 && s->hurry_up < 5 && avctx->skip_frame < AVDISCARD_ALL)
7286 decode_slice(h); 7293 decode_slice(h);
7287 break; 7294 break;
7288 case NAL_SEI: 7295 case NAL_SEI:
7289 break; 7296 break;
7290 case NAL_SPS: 7297 case NAL_SPS: