[FFmpeg-cvslog] r10431 - trunk/libavcodec/h264.c

benoit subversion
Fri Sep 7 20:27:13 CEST 2007


Author: benoit
Date: Fri Sep  7 20:27:13 2007
New Revision: 10431

Log:
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]


Modified:
   trunk/libavcodec/h264.c

Modified: trunk/libavcodec/h264.c
==============================================================================
--- trunk/libavcodec/h264.c	(original)
+++ trunk/libavcodec/h264.c	Fri Sep  7 20:27:13 2007
@@ -3815,6 +3815,11 @@ static int decode_slice_header(H264Conte
     }
 
     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 @@ static int decode_slice_header(H264Conte
         }
         if(h != h0)
             return 1; // deblocking switched inside frame
+        }
     }
 
     if(   s->avctx->skip_loop_filter >= AVDISCARD_ALL




More information about the ffmpeg-cvslog mailing list