[FFmpeg-cvslog] r26015 - in trunk/libavcodec: h264.c svq3.c

astrange subversion
Wed Dec 15 01:22:48 CET 2010


Author: astrange
Date: Wed Dec 15 01:22:47 2010
New Revision: 26015

Log:
SVQ3: Allow decoding if thread_count is > 1

svq3 still doesn't support multithreading, but it's simpler for clients if
they can enable threading for all codecs by default.

Modified:
   trunk/libavcodec/h264.c
   trunk/libavcodec/svq3.c

Modified: trunk/libavcodec/h264.c
==============================================================================
--- trunk/libavcodec/h264.c	Wed Dec 15 00:03:05 2010	(r26014)
+++ trunk/libavcodec/h264.c	Wed Dec 15 01:22:47 2010	(r26015)
@@ -979,7 +979,7 @@ int ff_h264_frame_start(H264Context *h){
     /* can't be in alloc_tables because linesize isn't known there.
      * FIXME: redo bipred weight to not require extra buffer? */
     for(i = 0; i < s->avctx->thread_count; i++)
-        if(!h->thread_context[i]->s.obmc_scratchpad)
+        if(h->thread_context[i] && !h->thread_context[i]->s.obmc_scratchpad)
             h->thread_context[i]->s.obmc_scratchpad = av_malloc(16*2*s->linesize + 8*2*s->uvlinesize);
 
     /* some macroblocks can be accessed before they're available in case of lost slices, mbaff or threading*/

Modified: trunk/libavcodec/svq3.c
==============================================================================
--- trunk/libavcodec/svq3.c	Wed Dec 15 00:03:05 2010	(r26014)
+++ trunk/libavcodec/svq3.c	Wed Dec 15 01:22:47 2010	(r26015)
@@ -796,11 +796,6 @@ static av_cold int svq3_decode_init(AVCo
     unsigned char *extradata;
     unsigned int size;
 
-    if(avctx->thread_count > 1){
-        av_log(avctx, AV_LOG_ERROR, "SVQ3 does not support multithreaded decoding, patch welcome! (check latest SVN too)\n");
-        return -1;
-    }
-
     if (ff_h264_decode_init(avctx) < 0)
         return -1;
 



More information about the ffmpeg-cvslog mailing list