From patchwork Mon Aug 21 03:05:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhong Li X-Patchwork-Id: 4783 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.37.132 with SMTP id g126csp2463660jag; Sun, 20 Aug 2017 20:08:41 -0700 (PDT) X-Received: by 10.223.152.19 with SMTP id v19mr10247566wrb.60.1503284921827; Sun, 20 Aug 2017 20:08:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503284921; cv=none; d=google.com; s=arc-20160816; b=JG+pNMxU+Zj7Zxr7Tr4s7y5sbWY9Lti2OXp5hvX7vZ+afvGFfJFztUSACug+EGiQF5 L4aOUAPrPefbOQmbAG2T+mDQD4IdrqNL2EIERaHd/FzDuQmPHKC8YmnjwJubwynajkyy a+1VDdD1QplAQ8QzDYeHrvJM5v6nndVtgZ2GpWEVzBJGQuylUiZDFjBMV7IyjweeAoEm wtwiZzHN4O7EA9mzajKdg00kjAjCyPIGYS4qzmaLbJ4dWLTU0vjOHySYf7B75LRprm/Q 5qGNf6EXifeEaGZ8Q0GGcyeDPbvjcEgxfbuauWv3tG2lA+DIlKyNRdaFyFm+Fjh76q3n MNsw== 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=5xrIgPtYel+PAiFq9cU0A/IoKf+68lJ5nqZgMZs0h7U=; b=EOMJ+GGuk3CK1w83W8Hslx+idku0imuueGMsknSQc22nWwL3lGWNSAkhrsuupS34HA gD/vAq3qQUqsQbHxbWjGJdxR+P649PkuMjutknSqDr3DpobEUZ2oBadP9+QwbOB23H1I BBiJqhrO+sgHxz8CPnOcrZLqsjweTOHPk8vdgqiPCpWX/Q8+5wvewB1dlXbfL3mSHczN tWrN+nnrgWQxn1DDXuVIIjdVppbf/MHJZtPl4uD0ULCde/PeBwT/HQQpHzYvfHIC2dA2 u0l6wBxMr0vkZ75VKYuRIM7l8lWFGa9be1TX3AdTbiqySFPmrK5/pmrX3AVaEQc2cCgg 3PyA== 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 13si5069732wmn.58.2017.08.20.20.08.41; Sun, 20 Aug 2017 20:08:41 -0700 (PDT) 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 29D44689B1C; Mon, 21 Aug 2017 06:08:32 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9D836689AEA for ; Mon, 21 Aug 2017 06:08:24 +0300 (EEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP; 20 Aug 2017 20:08:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.41,407,1498546800"; d="scan'208"; a="1164584280" Received: from bluekbl.sh.intel.com (HELO localhost.localdomain) ([10.239.159.160]) by orsmga001.jf.intel.com with ESMTP; 20 Aug 2017 20:08:28 -0700 From: Zhong Li To: ffmpeg-devel@ffmpeg.org Date: Mon, 21 Aug 2017 11:05:02 +0800 Message-Id: <20170821030502.14430-1-zhong.li@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [FFmpeg-devel] [PATCH 2/2] vaapi_h264: fix quality level setting range 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: Zhong Li , sw@jkqxz.net, jun.zhao@intel.com, nfxjfg@googlemail.com MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" The max value of quality should be 7 instead of 8. It has been fixed in intel-vaapi-driver(https://github.com/01org/intel-vaapi-driver/commit/53fa3daa12f6dbdd391d24ab479dc601ae37a89d) Signed-off-by: Zhong Li --- libavcodec/vaapi_encode_h264.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c index f9fcd805a4..cf48cc9340 100644 --- a/libavcodec/vaapi_encode_h264.c +++ b/libavcodec/vaapi_encode_h264.c @@ -1279,7 +1279,7 @@ static const AVOption vaapi_encode_h264_options[] = { { "qp", "Constant QP (for P-frames; scaled by qfactor/qoffset for I/B)", OFFSET(qp), AV_OPT_TYPE_INT, { .i64 = 20 }, 0, 52, FLAGS }, { "quality", "Set encode quality (trades off against speed, higher is faster)", - OFFSET(quality), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 8, FLAGS }, + OFFSET(quality), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 7, FLAGS }, { "low_power", "Use low-power encoding mode (experimental: only supported " "on some platforms, does not support all features)", OFFSET(low_power), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, FLAGS },