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 62ED6400A8 for ; Sun, 19 Dec 2021 16:37:21 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D0C0168AF2C; Sun, 19 Dec 2021 18:37:19 +0200 (EET) Received: from mail-ua1-f43.google.com (mail-ua1-f43.google.com [209.85.222.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 805FC68AED4 for ; Sun, 19 Dec 2021 18:37:13 +0200 (EET) Received: by mail-ua1-f43.google.com with SMTP id 30so13536950uag.13 for ; Sun, 19 Dec 2021 08:37:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=DPVoLQ31WUSBG3koT7ocpbgWOggfzoCs0besylh0Jpo=; b=bOF1td1zADioNb9tU1Sw91C1XFRgVff3H/09EFIqusJbpG6HROoe9BGKjYafrGuSl9 iXgypwu4jYTPVy6SQQ9V/SzUiyKhdL/SJIw2z2RjJoPyYi4VO94N0XLowamkiOwJCvLt zoKHJ50qDOL6ZfOppr+D/yuVzD29S+FjNS/yWnSDR6cwct7Bnnn4bv8a5tVZrtyuPHJn XFTovKiUBHF6BLh2jiqHhAYbKrIIgQUu6HGtSXesIdB737g80ggAI65CkyotdipKcZwK lMUMH+4dj0TQgP9CzZ4qjIzCRS44OI5b0sgoFtDml3h2FBGUgg0e4fk7ztehpf7qOLoe sE6Q== X-Gm-Message-State: AOAM531W/p4evfRxeayqRts6EkwlCGoV8jjaJC/SeuRLyBHgkzHUcQ4G 60vLZi6/k/cUA7SU4/JyTwxdXW89f2H3fXPovVebMisFXDI= X-Google-Smtp-Source: ABdhPJxKzjsukwzU9hGsG0rxFwckswA36AeevV6KojbzvMmVvD9t76jZHkaXy6Ac31sUHsG/olORcXWlBQX3K2fSRpQ= X-Received: by 2002:ab0:298f:: with SMTP id u15mr3756022uap.79.1639931831802; Sun, 19 Dec 2021 08:37:11 -0800 (PST) MIME-Version: 1.0 References: <20211218215319.84070-1-rcombs@rcombs.me> <20211218215319.84070-2-rcombs@rcombs.me> In-Reply-To: <20211218215319.84070-2-rcombs@rcombs.me> From: Aman Karmani Date: Sun, 19 Dec 2021 08:37:00 -0800 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [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 Sat, Dec 18, 2021 at 1:53 PM rcombs wrote: > 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); LGTM > > 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". > _______________________________________________ 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".