From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 82E0E424B9 for ; Sat, 18 Dec 2021 21:53:46 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 924B168AF42; Sat, 18 Dec 2021 23:53:33 +0200 (EET) Received: from mail-il1-f171.google.com (mail-il1-f171.google.com [209.85.166.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B774168A588 for ; Sat, 18 Dec 2021 23:53:25 +0200 (EET) Received: by mail-il1-f171.google.com with SMTP id 15so4561888ilq.2 for ; Sat, 18 Dec 2021 13:53:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rcombs.me; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=VlgrpKjCQ5XqwMCVHQ3QxV9taLD8Ejx86JoTJ7rZKG4=; b=Ak8RpMW0IqVr2fs8gvqhtMSvZzWsWZs6fbYZqZpgoWHW4bjL/6QFsqsyecNWgqXTKk oTAHD3b+0cgDo+12gctMpAeT3B8gOeh0yeIVUpmeELt+nc0R1VxY9CCsfmakXKhJSHVe OTU+2ONpDpL6IHeQapgENuF/vELEngWLR7WBUhWWzeACgcXHwS2oAMQ2Jynk6SI1Er1l vXSNivsTF2+pU9vpGIT7CBZiJ/24hyh3ZS0jAxUdZTZkXd7R8VItZOzgtvLNsFw29UN1 RqdRREaur6pBAV0ksGRfdlpj4fLteUSfciyTntmrQDzz7v9WtVH3YAMNyg1zWaye8iTw mmqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VlgrpKjCQ5XqwMCVHQ3QxV9taLD8Ejx86JoTJ7rZKG4=; b=wxAR+0u/U0Y+kLIq1jm5Z4/ifTnefWMT6BIHOCaW2d4hj/fsL9DDrY9Bqa1k1D/ir5 EGLLNJVy/wChwKplXxWVbHy5CtYz0L/9BqNXSMLwLUjKU2K0iZJESbpVSN0DE2j5KLTk c+8suris99G8Lk+H0AjjmWk7CCW4nd4xZ3b2cP9o3hhnGpYrqHR0WH4r5ry+o/DBEodi 4fHibyeaJm5hKWyb0m9nwWot+p6mqgOD0dbwuYcWr8+ZRPZp9H+ksJ/9E5160uZBJXqI jF/VPoApnKXpj3wF4P783E4rKEQO89wg5mBItq0uEdN12dB/1661OkqAFe+wxQT4HvJD 1CnA== X-Gm-Message-State: AOAM532aVzvQMJ56E5c4Srg+2UQSX/qNYHYnwexZzGpgW2M5jbdqfTRP gJUtRKkjgIme0i84UmbxJ9hdhdPxQUe28l4= X-Google-Smtp-Source: ABdhPJyU4MzlS/+FTysW97B7DjkruV1yi5yFpsiwpDIOKfKdq2T8++VJC7qLmSWyUleAy1QDUJnNYQ== X-Received: by 2002:a05:6e02:156e:: with SMTP id k14mr4668762ilu.41.1639864404107; Sat, 18 Dec 2021 13:53:24 -0800 (PST) Received: from rcombs-mbp.localdomain ([2601:243:2000:5ac:70a5:b034:a3a1:e733]) by smtp.gmail.com with ESMTPSA id o14sm3536975ilm.7.2021.12.18.13.53.23 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 18 Dec 2021 13:53:23 -0800 (PST) From: rcombs To: ffmpeg-devel@ffmpeg.org Date: Sat, 18 Dec 2021 15:53:19 -0600 Message-Id: <20211218215319.84070-2-rcombs@rcombs.me> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211218215319.84070-1-rcombs@rcombs.me> References: <20211218215319.84070-1-rcombs@rcombs.me> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] lavc/videotoolboxenc: explicitly set realtime=false 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On some encoders, this defaults to true, which can result in encode speed being _limited_ to only slightly above realtime (as a power-saving measure), so we need a way to disable it. --- libavcodec/videotoolboxenc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c index 5f1e3a9b9c..3599d730d8 100644 --- a/libavcodec/videotoolboxenc.c +++ b/libavcodec/videotoolboxenc.c @@ -1391,10 +1391,10 @@ static int vtenc_create_encoder(AVCodecContext *avctx, } } - if (vtctx->realtime) { + if (vtctx->realtime >= 0) { status = VTSessionSetProperty(vtctx->session, compat_keys.kVTCompressionPropertyKey_RealTime, - kCFBooleanTrue); + vtctx->realtime ? kCFBooleanTrue : kCFBooleanFalse); if (status) { av_log(avctx, AV_LOG_ERROR, "Error setting realtime property: %d\n", status); @@ -2676,7 +2676,7 @@ static const enum AVPixelFormat prores_pix_fmts[] = { { "require_sw", "Require software encoding", OFFSET(require_sw), AV_OPT_TYPE_BOOL, \ { .i64 = 0 }, 0, 1, VE }, \ { "realtime", "Hint that encoding should happen in real-time if not faster (e.g. capturing from camera).", \ - OFFSET(realtime), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, \ + OFFSET(realtime), AV_OPT_TYPE_BOOL, { .i64 = 0 }, -1, 1, VE }, \ { "frames_before", "Other frames will come before the frames in this session. This helps smooth concatenation issues.", \ OFFSET(frames_before), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, \ { "frames_after", "Other frames will come after the frames in this session. This helps smooth concatenation issues.", \ -- 2.33.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".