From patchwork Fri Dec 15 00:03:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michele Lim X-Patchwork-Id: 6783 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.94 with SMTP id m30csp7396807jah; Thu, 14 Dec 2017 16:02:57 -0800 (PST) X-Google-Smtp-Source: ACJfBouR6Y3CmdvzDWIkH8yna79ONaHCpqrwtT4Yb3YyVa/K9qBup+4G/B7Gl1MlQ8FQcKTgsXjr X-Received: by 10.28.0.193 with SMTP id 184mr3788682wma.58.1513296177273; Thu, 14 Dec 2017 16:02:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513296177; cv=none; d=google.com; s=arc-20160816; b=rxMhXiGEd+658U+okI6tB06240cx1Ww3vwTthOMjkC2lDYjF1xXyIII+AABF7YnHr1 3Vc7yrREVCVO+xU9xOBezo1LJhrh+zMw/B356MIayMuk7md92NOnbELxx7iOSewmoJqD Xv6st0z3/ccVJ85oZ3IsEBZlUZF5T0+Yl9bGZR5wwpHM7xl4NQOzuaGyfm7YrkrfOEaC m4JMzyEIPE2gjs32FXd6JYeQ4io5YDRe7AabYV906BBeCzgepiBQV10GLwTRRSa1QtPA n5DCS1rFPEuxDbSA6YgvZZjA3x0RsMqSWx56nWW/NZvnscqKQOS8XhVZTwEoIAWCMOp4 1UoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to :arc-authentication-results; bh=SIMfm2uMM78MdEMzkmx117yMCnHEA19GvHsgxdRB7mk=; b=Ut3DBiWFeA9xzREXP9UYxVQzUQvYSA7oZafwUftpbRZnKgc6sLf7ZYfWtPhlQS7aS5 GckDzoA7vONswuh0S7LqhoORU7vmoFFy2UW0FU15MPalgC7zdV7WdGc5hlsWtWW/VjGC KkIg8vbXuYgTBO6J3h41TaGRxYRq19EdvJEglabcX20NsGkWKVj2tx3S4RbGZuLYDfWz fzsO4uQVs6GHNcg8gFY7P+UTbH6Gmf9/nGO7/kGPCuxo7FLHzNMyXwE5nyRUIQX19ScC PmkUPiWNvlVwa2joHy+toPz/wkq3eXA1sEx1CdK7FMCMKsHiPE0vcXluekkryPYKI5CQ FCuw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id c16si4324075wrb.267.2017.12.14.16.02.55; Thu, 14 Dec 2017 16:02:57 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A355C680981; Fri, 15 Dec 2017 02:02:45 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 753FB680507 for ; Fri, 15 Dec 2017 02:02:38 +0200 (EET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Dec 2017 16:02:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,402,1508828400"; d="scan'208";a="184306854" Received: from michele-yoga-910.jf.intel.com ([10.7.199.54]) by orsmga005.jf.intel.com with ESMTP; 14 Dec 2017 16:02:44 -0800 From: Michele Lim To: ffmpeg-devel@ffmpeg.org Date: Thu, 14 Dec 2017 16:03:11 -0800 Message-Id: <1513296191-16611-1-git-send-email-michele.lim@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [FFmpeg-devel] [PATCH] HW accelerator: Indicate when hardware acceleration is used for processing encode or decode. X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Michele Lim MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" 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)