From patchwork Wed May 10 20:29:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Degawa X-Patchwork-Id: 41572 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:dca6:b0:f3:34fa:f187 with SMTP id ky38csp4130751pzb; Wed, 10 May 2023 13:29:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ44X79elqXXKX/9zTJifWAqkaeWzv2qroXTdIXPLBeenggm/+lSSkndMIPuFIt/NzxEfuxg X-Received: by 2002:aa7:da47:0:b0:50d:56df:fca7 with SMTP id w7-20020aa7da47000000b0050d56dffca7mr15374039eds.6.1683750571564; Wed, 10 May 2023 13:29:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683750571; cv=none; d=google.com; s=arc-20160816; b=DWB7j/RGQ8UH6fOfA0myk98ow8+XEJdWjNmixNOCKbEnOiuqdZr6g/iv97GjFJtlRn QnYibNk6Jlv53kRwjazIWWHV4oaFU3uNUAhLK06rbioXZMV7yMixhOnbulDt8AFjNxo+ g7eCcki5TC6JiveKA998KpjO+AFv8MthSOJu4gRDxyMyl/2DS5FDHW0eqPyrwOPoHByf 7/Os3USlXP3cqUX92+0rmlokbHxYCG5gtVRAX4VMbi0ELoDxfwmf5XH8f/8jLUmAud2f ZIdHXBg4KczyEzXAlZkCvCkAqYH5ausmhvX8z9RwZL3fnqeGw09oPPneE9uczGYLdFFd RPzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc: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=imM/UipFU2S938sSnucLWSPCwRsnCPJepHXPIh9ZJNc=; b=hRcc6kSSwjOtisixLMSQIP2m/69Lj1cvNIqCLrNKC0xc2nDZ11/qJxsqt60m+1jLAI 5BKD8hbnvnx8ZJbkdEmrbNV0xGKbHSbsmN9vqIyIDlsNAFDbaXgtV+pExKuVYPPxg4Rw q5f0naQnZnub4PYOBPnDMBiM4+IWn8DcsulBwXrvg4b6zdu1vZDDIDCxAAe4BTTXexoh 7mvsxfucLAKYj1HyfBTSVjgMQ/23MlSYtG6gj091zBIPc5I2E6yQ8quBcL3sAzwvq3Oq C+eQHXczNGOy7/vNwMGeqHXopc48tdwajqe6fhVEn1WcLHXTyykfEuPpxM/4YHc5eWaZ nGmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@randomderp.com header.s=default header.b=Qcj1s0rb; 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=randomderp.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id y19-20020aa7d513000000b00509ee597a42si3041498edq.588.2023.05.10.13.29.31; Wed, 10 May 2023 13:29: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; dkim=neutral (body hash did not verify) header.i=@randomderp.com header.s=default header.b=Qcj1s0rb; 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=randomderp.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E5FC868C148; Wed, 10 May 2023 23:29:27 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from degawa.com (174-127-109-95.slc.westdc.net [174.127.109.95]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 831C468C133 for ; Wed, 10 May 2023 23:29:21 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomderp.com; s=default; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=OxgglQmXt5XgCDJVuB0hn9jjlO6aZA0m6FJmuSqKjIU=; b=Qcj1s0rbeZZLZnTkCbBd3BtNIV nAjIQjfjmQAHc3L0MUiAu4BknVGXiURVMnMa00c/SNeIaMwUS1/CqNKMCDhdxzAlMV5De3Za6q+/V Almj3VoZ8W5enxDoQfl9oLBlPquRu9zxGjlHTlQDFt3J9zpIw5/2vfZ6X1NqFQjcK76sSiVepzxIi 25LdqVWyn9bV4TtInZIAu1LVeUqUhJwOcjahVMI7mbqD2uKcvCycD/niWvXvIBhCQxm2OeOyunPv9 jWt9zjv+b+Mo+farr2ErHuiRvPmc7Mb2QkuZ2ZnZy4/6gGg5UdBb+EJZFYUQqkcK0DmFa7C/mKiKo QdX2gcuA==; Received: from 108-216-168-194.lightspeed.mmphtn.sbcglobal.net ([108.216.168.194]:59576 helo=ccom-pc.dnsdojo.com) by slmp-550-1.slc.westdc.net with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1pwqR6-0006kC-0P; Wed, 10 May 2023 14:29:18 -0600 From: Christopher Degawa To: ffmpeg-devel@ffmpeg.org Date: Wed, 10 May 2023 15:29:12 -0500 Message-Id: <20230510202912.658437-1-ccom@randomderp.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - slmp-550-1.slc.westdc.net X-AntiAbuse: Original Domain - ffmpeg.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - randomderp.com X-Get-Message-Sender-Via: slmp-550-1.slc.westdc.net: authenticated_id: ccom/from_h X-Authenticated-Sender: slmp-550-1.slc.westdc.net: ccom@randomderp.com X-Source: X-Source-Args: X-Source-Dir: Subject: [FFmpeg-devel] [PATCH] libavcodec/libsvtav1: Allow -1 for preset option 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 Cc: Christopher Degawa Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 8c1q1zbYrF5z Currently, the -1 (MR) preset is disallowed as it's taken as the preset option not set, and the only way to access it was through svtav1-params. Signed-off-by: Christopher Degawa --- libavcodec/libsvtav1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c index 9174e2753c..952ed0e1e7 100644 --- a/libavcodec/libsvtav1.c +++ b/libavcodec/libsvtav1.c @@ -170,7 +170,7 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param, param->look_ahead_distance = svt_enc->la_depth; #endif - if (svt_enc->enc_mode >= 0) + if (svt_enc->enc_mode >= -1) param->enc_mode = svt_enc->enc_mode; if (avctx->bit_rate) { @@ -593,7 +593,7 @@ static const AVOption options[] = { { "high", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, 0, 0, VE, "tier" }, #endif { "preset", "Encoding preset", - OFFSET(enc_mode), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, MAX_ENC_PRESET, VE }, + OFFSET(enc_mode), AV_OPT_TYPE_INT, { .i64 = -2 }, -2, MAX_ENC_PRESET, VE }, FF_AV1_PROFILE_OPTS