[vlc-commits] avcodec: DXVA2 is now frame multithreading safe

Steve Lhomme git at videolan.org
Tue Apr 28 15:11:40 CEST 2015


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Tue Apr 28 11:49:09 2015 +0200| [32ed30c7bdea3a02f75d81aef7b3ae3328e1b437] | committer: Jean-Baptiste Kempf

avcodec: DXVA2 is now frame multithreading safe

after changes on the way the codec is reinitialized after seeking and the internal lock

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=32ed30c7bdea3a02f75d81aef7b3ae3328e1b437
---

 modules/codec/avcodec/video.c |   15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 5c4e192..f872c6d 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -432,21 +432,6 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
             break;
     }
 
-    /* Workaround: frame multithreading is not compatible with
-     * DXVA2. When a frame is being copied to host memory, the frame
-     * is locked and cannot be used as a reference frame
-     * simultaneously and thus decoding fails for some frames. This
-     * causes major image corruption. */
-# if defined(_WIN32)
-    char *avcodec_hw = var_InheritString( p_dec, "avcodec-hw" );
-    if( avcodec_hw == NULL || strcasecmp( avcodec_hw, "none" ) )
-    {
-        msg_Warn( p_dec, "threaded frame decoding is not compatible with DXVA2, disabled" );
-        p_context->thread_type &= ~FF_THREAD_FRAME;
-    }
-    free( avcodec_hw );
-# endif
-
     if( p_context->thread_type & FF_THREAD_FRAME )
         p_dec->i_extra_picture_buffers = 2 * p_context->thread_count;
 #endif



More information about the vlc-commits mailing list