Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] avcodec/videotoolboxenc: allow low latency RC with HEVC on Apple Silicon (PR #20453)
@ 2025-09-06  5:35 cgutman via ffmpeg-devel
  0 siblings, 0 replies; only message in thread
From: cgutman via ffmpeg-devel @ 2025-09-06  5:35 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: cgutman

PR #20453 opened by cgutman
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20453
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20453.patch

`kVTVideoEncoderSpecification_EnableLowLatencyRateControl` was supported only for H.264 on Intel Macs, but it can be used with both H.264 and HEVC on Apple Silicon.


>From d59660b787c940076a87583597bb8cbf28015d91 Mon Sep 17 00:00:00 2001
From: Cameron Gutman <aicommander@gmail.com>
Date: Fri, 5 Sep 2025 23:42:52 -0500
Subject: [PATCH] avcodec/videotoolboxenc: allow low latency RC with HEVC

It is supported only for H.264 on Intel Macs, but it can be used with
both H.264 and HEVC on Apple Silicon.

Signed-off-by: Cameron Gutman <aicommander@gmail.com>
---
 libavcodec/videotoolboxenc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index e423da6933..f0d3a15897 100644
--- a/libavcodec/videotoolboxenc.c
+++ b/libavcodec/videotoolboxenc.c
@@ -1709,7 +1709,8 @@ static int vtenc_configure_encoder(AVCodecContext *avctx)
 #endif
 
     // low-latency mode: eliminate frame reordering, follow a one-in-one-out encoding mode
-    if ((avctx->flags & AV_CODEC_FLAG_LOW_DELAY) && avctx->codec_id == AV_CODEC_ID_H264) {
+    if ((avctx->flags & AV_CODEC_FLAG_LOW_DELAY) &&
+        ((avctx->codec_id == AV_CODEC_ID_H264) || (TARGET_CPU_ARM64 && avctx->codec_id == AV_CODEC_ID_HEVC))) {
         CFDictionarySetValue(enc_info,
                              compat_keys.kVTVideoEncoderSpecification_EnableLowLatencyRateControl,
                              kCFBooleanTrue);
-- 
2.49.1

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-09-06  5:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-06  5:35 [FFmpeg-devel] [PATCH] avcodec/videotoolboxenc: allow low latency RC with HEVC on Apple Silicon (PR #20453) cgutman via ffmpeg-devel

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git