aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-07-14 21:39:36 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-07-14 21:39:36 +0000
commit8c3eba7c625fb9bf4b6e254b216871cac2b91283 (patch)
tree5e709f18b895d14f5b10bbe9f6e458a7e98d0e49 /libavcodec/h264.c
parentfec9ccb7e6fdc6844b1e2d1bb95436b36f47a412 (diff)
downloadffmpeg-8c3eba7c625fb9bf4b6e254b216871cac2b91283.tar.gz
skip_idct
skip_frame skip_loop_filter Originally committed as revision 4440 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 741c0503c6..3e318bddeb 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -4349,6 +4349,11 @@ static int decode_slice_header(H264Context *h){
h->slice_beta_offset = get_se_golomb(&s->gb) << 1;
}
}
+ if( s->avctx->skip_loop_filter >= AVDISCARD_ALL
+ ||(s->avctx->skip_loop_filter >= AVDISCARD_NONKEY && h->slice_type != I_TYPE)
+ ||(s->avctx->skip_loop_filter >= AVDISCARD_BIDIR && h->slice_type == B_TYPE)
+ ||(s->avctx->skip_loop_filter >= AVDISCARD_NONREF && h->nal_ref_idc == 0))
+ h->deblocking_filter= 0;
#if 0 //FMO
if( h->pps.num_slice_groups > 1 && h->pps.mb_slice_group_map_type >= 3 && h->pps.mb_slice_group_map_type <= 5)
@@ -7245,7 +7250,8 @@ static int decode_nal_units(H264Context *h, uint8_t *buf, int buf_size){
buf_index += consumed;
- if( s->hurry_up == 1 && h->nal_ref_idc == 0 )
+ if( (s->hurry_up == 1 && h->nal_ref_idc == 0)
+ ||(avctx->skip_frame >= AVDISCARD_NONREF && h->nal_ref_idc == 0))
continue;
switch(h->nal_unit_type){
@@ -7261,7 +7267,7 @@ static int decode_nal_units(H264Context *h, uint8_t *buf, int buf_size){
av_log(h->s.avctx, AV_LOG_ERROR, "decode_slice_header error\n");
break;
}
- if(h->redundant_pic_count==0 && s->hurry_up < 5 )
+ if(h->redundant_pic_count==0 && s->hurry_up < 5 && avctx->skip_frame < AVDISCARD_ALL)
decode_slice(h);
break;
case NAL_DPA:
@@ -7282,7 +7288,8 @@ static int decode_nal_units(H264Context *h, uint8_t *buf, int buf_size){
init_get_bits(&h->inter_gb, ptr, bit_length);
h->inter_gb_ptr= &h->inter_gb;
- if(h->redundant_pic_count==0 && h->intra_gb_ptr && s->data_partitioning && s->hurry_up < 5 )
+ if(h->redundant_pic_count==0 && h->intra_gb_ptr && s->data_partitioning
+ && s->hurry_up < 5 && avctx->skip_frame < AVDISCARD_ALL)
decode_slice(h);
break;
case NAL_SEI: