comparison h264.c @ 5698:9a26cb6747a9 libavcodec

Apply skip_loop_filter before checking if we can parallelize with the selected loop filter
author reimar
date Sat, 22 Sep 2007 10:28:22 +0000
parents 7c2ce28a0314
children c08c9340c7ca
comparison
equal deleted inserted replaced
5697:a3fec73667af 5698:9a26cb6747a9
3812 h->slice_alpha_c0_offset = get_se_golomb(&s->gb) << 1; 3812 h->slice_alpha_c0_offset = get_se_golomb(&s->gb) << 1;
3813 h->slice_beta_offset = get_se_golomb(&s->gb) << 1; 3813 h->slice_beta_offset = get_se_golomb(&s->gb) << 1;
3814 } 3814 }
3815 } 3815 }
3816 3816
3817 if( s->avctx->skip_loop_filter >= AVDISCARD_ALL
3818 ||(s->avctx->skip_loop_filter >= AVDISCARD_NONKEY && h->slice_type != I_TYPE)
3819 ||(s->avctx->skip_loop_filter >= AVDISCARD_BIDIR && h->slice_type == B_TYPE)
3820 ||(s->avctx->skip_loop_filter >= AVDISCARD_NONREF && h->nal_ref_idc == 0))
3821 h->deblocking_filter= 0;
3822
3817 if(h->deblocking_filter == 1 && h0->max_contexts > 1) { 3823 if(h->deblocking_filter == 1 && h0->max_contexts > 1) {
3818 if(s->avctx->flags2 & CODEC_FLAG2_FAST) { 3824 if(s->avctx->flags2 & CODEC_FLAG2_FAST) {
3819 /* Cheat slightly for speed: 3825 /* Cheat slightly for speed:
3820 Dont bother to deblock across slices */ 3826 Dont bother to deblock across slices */
3821 h->deblocking_filter = 2; 3827 h->deblocking_filter = 2;
3827 } 3833 }
3828 if(h != h0) 3834 if(h != h0)
3829 return 1; // deblocking switched inside frame 3835 return 1; // deblocking switched inside frame
3830 } 3836 }
3831 } 3837 }
3832
3833 if( s->avctx->skip_loop_filter >= AVDISCARD_ALL
3834 ||(s->avctx->skip_loop_filter >= AVDISCARD_NONKEY && h->slice_type != I_TYPE)
3835 ||(s->avctx->skip_loop_filter >= AVDISCARD_BIDIR && h->slice_type == B_TYPE)
3836 ||(s->avctx->skip_loop_filter >= AVDISCARD_NONREF && h->nal_ref_idc == 0))
3837 h->deblocking_filter= 0;
3838 3838
3839 #if 0 //FMO 3839 #if 0 //FMO
3840 if( h->pps.num_slice_groups > 1 && h->pps.mb_slice_group_map_type >= 3 && h->pps.mb_slice_group_map_type <= 5) 3840 if( h->pps.num_slice_groups > 1 && h->pps.mb_slice_group_map_type >= 3 && h->pps.mb_slice_group_map_type <= 5)
3841 slice_group_change_cycle= get_bits(&s->gb, ?); 3841 slice_group_change_cycle= get_bits(&s->gb, ?);
3842 #endif 3842 #endif