[FFmpeg-devel] [PATCH] HW accelerator: Indicate when hardware acceleration is used for processing encode or decode.
Michele Lim
michele.lim at intel.com
Fri Dec 15 02:03:11 EET 2017
Clear indication of when a hardware accelerator is in operation
prevents false assumptions in situations when the command line
argument inadvertently omits certain required options for
enabling it.
---
libavutil/hwcontext_vaapi.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
index 29698d1..0decf6d 100644
--- a/libavutil/hwcontext_vaapi.c
+++ b/libavutil/hwcontext_vaapi.c
@@ -1193,8 +1193,11 @@ static void vaapi_device_free(AVHWDeviceContext *ctx)
AVVAAPIDeviceContext *hwctx = ctx->hwctx;
VAAPIDevicePriv *priv = ctx->user_opaque;
- if (hwctx->display)
+ if (hwctx->display) {
vaTerminate(hwctx->display);
+ /* Indicate hardware acceleration was utilized to complete either encode or decode */
+ av_log(ctx, AV_LOG_INFO, "Processing completed with HW acceleration\n");
+ }
#if HAVE_VAAPI_X11
if (priv->x11_display)
--
2.7.4
More information about the ffmpeg-devel
mailing list