From patchwork Thu Feb 14 18:13:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Miroslav_Sluge=C5=88?= X-Patchwork-Id: 12072 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 7BBF6448290 for ; Thu, 14 Feb 2019 20:21:20 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 56DC068A703; Thu, 14 Feb 2019 20:21:20 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mxc1.seznam.cz (mxc1.seznam.cz [77.75.79.23]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 30DB868A5A4 for ; Thu, 14 Feb 2019 20:13:56 +0200 (EET) Received: from email.seznam.cz by email-smtpc9a.ko.seznam.cz (email-smtpc9a.ko.seznam.cz [10.53.11.15]) id 6ac543a45e125bb86a576aa9; Thu, 14 Feb 2019 19:13:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=email.cz; s=beta; t=1550168035; bh=ucMqST8mqQl+UyBwiQvO75gErK4G0lGSrk6QK95VK2M=; h=Received:To:From:Subject:Message-ID:Date:User-Agent:MIME-Version: Content-Type:Content-Language; b=C9EffeSHTysUff8CEIVLi3ftCCs5FaSum+yRYM00Dy5aJ5QSYlb9WtXLLe9FUYOcU P+HopKNRWJbFDE+PlgUF9oz+HGaooY1ukVO7/C/RaY5WqFcPGCYYev/j1lQXab8a7x ms4cNSGifRYTEnBw0Aw1g73OFsyGLlH7Ih4XfgVw= Received: from [192.168.1.6] (thunderm.czela.net [78.108.96.65]) by email-relay2.ko.seznam.cz (Seznam SMTPD 1.3.103) with ESMTP; Thu, 14 Feb 2019 19:13:49 +0100 (CET) To: FFmpeg development discussions and patches From: =?UTF-8?Q?Miroslav_Sluge=c5=88?= Message-ID: Date: Thu, 14 Feb 2019 19:13:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 Content-Language: cs X-Mailman-Approved-At: Thu, 14 Feb 2019 20:21:18 +0200 Subject: [FFmpeg-devel] [PATCH] nvenc: add support for b_adapt option also for HEVC encoder 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" Hi, this will add support for b_adapt for HEVC encoder, now Turing HEVC NVENC with SDK 9.0 also supports B-frames and this option is in default mode disabled. Enable it by default, because it could add around 0.02 PSNR for free. diff --git a/libavcodec/nvenc_hevc.c b/libavcodec/nvenc_hevc.c index d567d960ba..19c04e4aa7 100644 --- a/libavcodec/nvenc_hevc.c +++ b/libavcodec/nvenc_hevc.c @@ -95,6 +95,8 @@ static const AVOption options[] = { OFFSET(no_scenecut), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, { "forced-idr", "If forcing keyframes, force them as IDR frames.", OFFSET(forced_idr), AV_OPT_TYPE_BOOL, { .i64 = 0 }, -1, 1, VE }, + { "b_adapt", "When lookahead is enabled, set this to 0 to disable adaptive B-frame decision", + OFFSET(b_adapt), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, VE }, { "spatial_aq", "set to 1 to enable Spatial AQ", OFFSET(aq), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, { "temporal_aq", "set to 1 to enable Temporal AQ", OFFSET(temporal_aq), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, { "zerolatency", "Set 1 to indicate zero latency operation (no reordering delay)",