From patchwork Mon Sep 26 08:34:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Chen, Wenbin" X-Patchwork-Id: 38324 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3b1c:b0:96:9ee8:5cfd with SMTP id c28csp2106032pzh; Mon, 26 Sep 2022 01:38:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM68sY5cTwUvdg/kIosyAVrOGmw105WzBuKuNoPap3UzKMovxz9Dow6id52ZzNU/Fpe9Nj1x X-Received: by 2002:a05:6402:1761:b0:455:37bb:93c3 with SMTP id da1-20020a056402176100b0045537bb93c3mr18546343edb.403.1664181524828; Mon, 26 Sep 2022 01:38:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664181524; cv=none; d=google.com; s=arc-20160816; b=yeoK1JAw0qFYvZGfdNZNQRMdV6kU8tfZR9msVCDt/i6IUHMBUu9jcdI6tBqwkS5teI O0qYOwPh+6Yhx+618hU4PklmyIaj4669/NAKFXDh0ovdHJKhAI9VrtaVeg+ClozzyOAv ynpe9BVfLceedryo8rPl8+dfBykq4pxIWC30NFcqDpIUaxBcvZZNbw/c+HDELOmKMXrQ WqoUvNuaQ4SDGit0a+4mfLZpOshWAWttPU5maTG7wZ5qvkBbgpEmmSaCzohhBjaUEa0J c3uyCvz1NTWfvUkv5NgG0tHGIJEPGgaQWsmUTfTSIzW4DQxy+JTgFHIAZcpuTyyg7hLy oTrw== 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 :dkim-signature:delivered-to; bh=R0AB0M4JN2328Ohj54A5G+UoaiwXs7oVgdmIucyt1IU=; b=xbkp4E7/MGcjcvOrqv1aVsv+tB81/LDiBk6cUj75lvcRDSsA3rNt+rGgnpJ+qpJzLV UOHLbpb4oSdTL+5bU7X1ZkqgvJZO7uYZY36cU1bPW7fosEGGIaaxingkDa9oB86IsPZS Cam5lDhiSjgkUzmwuJc/DRxJ481XGQxAN0N1CtedPSl8/WL4rnAF1r93YCKmvJwlpJVm 9RKKuIw5Es9RK0f9MhAdiZt9NnkjcvuDT7rLxGZoWvbYYewMSWBeJPyTXLLN/G47VL45 P1oGtlnuecW57eOedL1kSpLsVbd9P+aoUqaHoTQ8gUoFx7kzR6ztJ9m5Xe5YTM6niZ/U KpYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=BHQkUeBc; 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 gs12-20020a1709072d0c00b00783c03b2322si611064ejc.695.2022.09.26.01.38.44; Mon, 26 Sep 2022 01:38:44 -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; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=BHQkUeBc; 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 3308468B9CD; Mon, 26 Sep 2022 11:38:42 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6765A68AFF7 for ; Mon, 26 Sep 2022 11:38:34 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664181519; x=1695717519; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=3BK/dHrrXj9iMeEJSoHpbPAO3bqVyhGzNYMY/5GPZQs=; b=BHQkUeBcSFTdPWufYe+kSO2rUZ1fL+7u2qy3ikjPfI3maHDHYQCYRnXx DMxF4j9NDqUVCGt15VeaXnyolAfRMBc+J8zNthNEGsiiEeknuaLvznehl 5FneXZ/HvaI/NrJ23sIyk1RzoxxRRMAl6pyoyXl1psX3g81JtxjB7Ys92 bL5wcSAFOJ0ZtvxNEnA0ivO1kqw2X7He+u1tFx9y5dWCLBpvGju7UjjDv +pyibiDKg25woZ6EmUx7pvW9dGJhMxAW/jdWQCdVz55PV+7PCCd0XkQ+X jeV95HsFRwfH1ij3/EsI4+rKoxa9cfrPaB8htBsjrIhq/HDJQuUATj6Zv A==; X-IronPort-AV: E=McAfee;i="6500,9779,10481"; a="302443630" X-IronPort-AV: E=Sophos;i="5.93,345,1654585200"; d="scan'208";a="302443630" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2022 01:38:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10481"; a="598650930" X-IronPort-AV: E=Sophos;i="5.93,345,1654585200"; d="scan'208";a="598650930" Received: from wenbin-z390-aorus-ultra.sh.intel.com ([10.239.35.4]) by orsmga006.jf.intel.com with ESMTP; 26 Sep 2022 01:38:31 -0700 From: Wenbin Chen To: ffmpeg-devel@ffmpeg.org Date: Mon, 26 Sep 2022 16:34:48 +0800 Message-Id: <20220926083449.70287-1-wenbin.chen@intel.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] libavcodec/qsvenc: Let runtime to set default parameter. X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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" X-TUID: ZSSmm17T1tVg Unset qsv_h264 and qsv_hevc's default settings. Let runtime to decide these parameters, so that it can choose the best parameter and ffmpeg-qsv can keep up with runtime's update. Signed-off-by: Wenbin Chen --- libavcodec/qsvenc_h264.c | 4 ++-- libavcodec/qsvenc_hevc.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c index 85826ae4be..fe777a6ae3 100644 --- a/libavcodec/qsvenc_h264.c +++ b/libavcodec/qsvenc_h264.c @@ -177,8 +177,8 @@ static const FFCodecDefault qsv_enc_defaults[] = { { "b", "1M" }, { "refs", "0" }, // same as the x264 default - { "g", "250" }, - { "bf", "3" }, + { "g", "-1" }, + { "bf", "-1" }, { "qmin", "-1" }, { "qmax", "-1" }, { "trellis", "-1" }, diff --git a/libavcodec/qsvenc_hevc.c b/libavcodec/qsvenc_hevc.c index 6ec6230999..0c5bec231d 100644 --- a/libavcodec/qsvenc_hevc.c +++ b/libavcodec/qsvenc_hevc.c @@ -290,7 +290,7 @@ static const FFCodecDefault qsv_enc_defaults[] = { { "b", "1M" }, { "refs", "0" }, // same as the x264 default - { "g", "248" }, + { "g", "-1" }, { "bf", "-1" }, { "qmin", "-1" }, { "qmax", "-1" },