From patchwork Thu Jun 1 07:58:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinath K R X-Patchwork-Id: 3776 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.10.2 with SMTP id 2csp647540vsk; Thu, 1 Jun 2017 00:58:31 -0700 (PDT) X-Received: by 10.28.138.73 with SMTP id m70mr7347651wmd.99.1496303911816; Thu, 01 Jun 2017 00:58:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496303911; cv=none; d=google.com; s=arc-20160816; b=htt9qXO0mvXOL9VpkwLqfcR3GbkCoawP/27m7KrgE++9IzyNbn11bNdf3VcVBwymw3 /18FsikdsL6IW0on1tIEOE/jX/V6gZ8nt6Ck/fmrQgu3aSSX9d1qO/Zcag4qhaWO9E6W DWvkur3RsXrqABm+92qDjRDuVTpcMT03nuOhysKtI/Qvzsefl4YZ+zdMuUvh8DioAcTD Db+20sNVg4CX+x0dzqhJLoAyJsgwpX5h1QzykrOLDKatFMXC+6hNXPnI2MkR2CQTRr0d Qa0WABUr/J77Bp4QAgLl8VKe/M5H4/v0l2Y1lBvRJFwr/kmCQAXtZFuMjz3jouyGYwwo MRjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :delivered-to:arc-authentication-results; bh=KRAB1xBbY95PI8H/QWppofh33LChEq7FXq4/v8EA1eM=; b=CqTZDsQoj2Ez/TEmfP5aK6SYYxdi/qkE07vyJ5ryc6SKwq9uds7EVTNhFSiHm3Fz8K JnENQJIpQbCBlPjtN4rLS7esUKXS2M4iplaHpoq1NpaTEnykti1XWDsWZqbJ2/KIziK1 wQ1I+nccmszYmPunJD4R9fo2z8d9QtAV6pxJjk7e2ORQCvLhtkGf4MzhUOe1/Bltf8Pi feEQgoibk28qSqkdSXoF7mFQ/EtuD9E0bxlLmvsRZnL8SXHmgjlhMUte65ynmungOsnK 1sIiYfNPYzsU4aSPLiU/QepHF7p4d+L3t/sEmFivNdY1J7eQ11cQfcza8bi1gChFsgTc 8qgw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id g43si19361822wra.232.2017.06.01.00.58.31; Thu, 01 Jun 2017 00:58:31 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D6C66689735; Thu, 1 Jun 2017 10:58:22 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from hqemgate15.nvidia.com (hqemgate15.nvidia.com [216.228.121.64]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6F9D96882BA for ; Thu, 1 Jun 2017 10:58:16 +0300 (EEST) Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate15.nvidia.com id ; Thu, 01 Jun 2017 00:58:14 -0700 Received: from HQMAIL105.nvidia.com ([172.20.13.39]) by hqpgpgate102.nvidia.com (PGP Universal service); Thu, 01 Jun 2017 00:58:18 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Thu, 01 Jun 2017 00:58:18 -0700 Received: from BGMAIL102.nvidia.com (10.25.59.11) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Thu, 1 Jun 2017 07:58:18 +0000 Received: from nvidia.com (10.24.216.213) by bgmail102.nvidia.com (10.25.59.11) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Thu, 1 Jun 2017 07:58:14 +0000 From: Srinath K R To: Date: Thu, 1 Jun 2017 13:28:07 +0530 Message-ID: <1496303887-27675-1-git-send-email-skr@nvidia.com> X-Mailer: git-send-email 2.7.4 X-NVConfidentiality: public MIME-Version: 1.0 X-Originating-IP: [10.24.216.213] X-ClientProxiedBy: BGMAIL101.nvidia.com (10.25.59.10) To bgmail102.nvidia.com (10.25.59.11) Subject: [FFmpeg-devel] [PATCH] avcodec/nvenc: Add default value for AVCodecContext::refs 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" AVCodecContext::refs is used to control the DPB size to be used by the encoder. The default value for AVCodecContext::refs as set in libavcodec/options_table.h is 1. This patch sets AVCodecContext::refs to 0 for h264_nvenc and hevc_nvenc in order to let the driver take the decision of the correct DPB size to use in all cases. Signed-off-by: Srinath K R --- libavcodec/nvenc_h264.c | 1 + libavcodec/nvenc_hevc.c | 1 + 2 files changed, 2 insertions(+) diff --git a/libavcodec/nvenc_h264.c b/libavcodec/nvenc_h264.c index 20f47ec..5fcbcb9 100644 --- a/libavcodec/nvenc_h264.c +++ b/libavcodec/nvenc_h264.c @@ -131,6 +131,7 @@ static const AVCodecDefault defaults[] = { { "qcomp", "-1" }, { "g", "250" }, { "bf", "0" }, + { "refs", "0" }, { NULL }, }; diff --git a/libavcodec/nvenc_hevc.c b/libavcodec/nvenc_hevc.c index 66db145..81da9d2 100644 --- a/libavcodec/nvenc_hevc.c +++ b/libavcodec/nvenc_hevc.c @@ -128,6 +128,7 @@ static const AVCodecDefault defaults[] = { { "qcomp", "-1" }, { "g", "250" }, { "bf", "0" }, + { "refs", "0" }, { NULL }, };