# HG changeset patch # User benoit # Date 1189189633 0 # Node ID adc9ec0f7385437ab8e99993f86e5d01fee503cd # Parent abf90ea2c39266b38e5f33fb504b7bc8c1dfad9e Let H.264 decoder skip deblocking across slices if running with multiple threads and CODEC_FLAGS2_FAST is set. Thus, it may decode the slices in parallel to gain speed. Patch by Andreas ªÓman: [andreas olebyn nu] diff -r abf90ea2c392 -r adc9ec0f7385 h264.c --- a/h264.c Thu Sep 06 14:55:13 2007 +0000 +++ b/h264.c Fri Sep 07 18:27:13 2007 +0000 @@ -3815,6 +3815,11 @@ } if(h->deblocking_filter == 1 && h0->max_contexts > 1) { + if(s->avctx->flags2 & CODEC_FLAG2_FAST) { + /* Cheat slightly for speed: + Dont bother to deblock across slices */ + h->deblocking_filter = 2; + } else { h0->max_contexts = 1; if(!h0->single_decode_warning) { av_log(s->avctx, AV_LOG_INFO, "Cannot parallelize deblocking type 1, decoding such frames in sequential order\n"); @@ -3822,6 +3827,7 @@ } if(h != h0) return 1; // deblocking switched inside frame + } } if( s->avctx->skip_loop_filter >= AVDISCARD_ALL