aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-07-14 21:57:22 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-07-14 21:57:22 +0000
commite0111b3243a759229656aebe45a5288b84fa6288 (patch)
treefadb5d654d609bd8d609bff0f84a8b976e6ecac6
parent8c3eba7c625fb9bf4b6e254b216871cac2b91283 (diff)
downloadffmpeg-e0111b3243a759229656aebe45a5288b84fa6288.tar.gz
more fine grained skip_frame
Originally committed as revision 4441 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/h264.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 3e318bddeb..10baf27092 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -7267,7 +7267,11 @@ 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 && avctx->skip_frame < AVDISCARD_ALL)
+ if(h->redundant_pic_count==0 && s->hurry_up < 5
+ && (avctx->skip_frame < AVDISCARD_NONREF || h->nal_ref_idc)
+ && (avctx->skip_frame < AVDISCARD_BIDIR || h->slice_type!=B_TYPE)
+ && (avctx->skip_frame < AVDISCARD_NONKEY || h->slice_type==I_TYPE)
+ && avctx->skip_frame < AVDISCARD_ALL)
decode_slice(h);
break;
case NAL_DPA:
@@ -7289,7 +7293,11 @@ static int decode_nal_units(H264Context *h, uint8_t *buf, int buf_size){
h->inter_gb_ptr= &h->inter_gb;
if(h->redundant_pic_count==0 && h->intra_gb_ptr && s->data_partitioning
- && s->hurry_up < 5 && avctx->skip_frame < AVDISCARD_ALL)
+ && s->hurry_up < 5
+ && (avctx->skip_frame < AVDISCARD_NONREF || h->nal_ref_idc)
+ && (avctx->skip_frame < AVDISCARD_BIDIR || h->slice_type!=B_TYPE)
+ && (avctx->skip_frame < AVDISCARD_NONKEY || h->slice_type==I_TYPE)
+ && avctx->skip_frame < AVDISCARD_ALL)
decode_slice(h);
break;
case NAL_SEI: