]> git.sesse.net Git - ffmpeg/commitdiff
qsvdec: do not sync PIX_FMT_QSV surfaces
authorAnton Khirnov <anton@khirnov.net>
Sat, 7 Jan 2017 20:06:16 +0000 (21:06 +0100)
committerAnton Khirnov <anton@khirnov.net>
Thu, 12 Jan 2017 15:21:39 +0000 (16:21 +0100)
Introducing enforced sync points in arbitrary places is bad for
performance. Since the vast majority of receiving code (QSV VPP or
encoders, retrieving frames through hwcontext) will do the syncing, this
change should not be visible to most callers. But bumping micro just in
case.

This is also consistent with what VAAPI hwaccel does.

libavcodec/qsvdec.c
libavcodec/version.h

index b83b0fcda82f3c2c5aa7326359c29963139f90e3..0cbe5094c76aec9b39920bd52ed084a6b6542dcd 100644 (file)
@@ -363,9 +363,11 @@ static int qsv_decode(AVCodecContext *avctx, QSVContext *q,
         av_fifo_generic_read(q->async_fifo, &sync,      sizeof(sync),      NULL);
         out_frame->queued = 0;
 
-        do {
-            ret = MFXVideoCORE_SyncOperation(q->session, *sync, 1000);
-        } while (ret == MFX_WRN_IN_EXECUTION);
+        if (avctx->pix_fmt != AV_PIX_FMT_QSV) {
+            do {
+                ret = MFXVideoCORE_SyncOperation(q->session, *sync, 1000);
+            } while (ret == MFX_WRN_IN_EXECUTION);
+        }
 
         av_freep(&sync);
 
index 7348a0c2672628584e902b807493a65ca17756e4..106543de531f27bba244993abf377d7f06a50a67 100644 (file)
@@ -29,7 +29,7 @@
 
 #define LIBAVCODEC_VERSION_MAJOR 57
 #define LIBAVCODEC_VERSION_MINOR 30
-#define LIBAVCODEC_VERSION_MICRO  3
+#define LIBAVCODEC_VERSION_MICRO  4
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \