diff options
author | Cameron Gutman <[email protected]> | 2025-09-05 23:42:52 -0500 |
---|---|---|
committer | Zhao Zhili <[email protected]> | 2025-09-10 11:55:18 +0000 |
commit | d87210745e09f6d55a7e43f70bf9d8f81b5f739a (patch) | |
tree | f9275277d1a3b42ae5fd8ec1d542042e74ba883a | |
parent | 4691c5623854760b1327a9fac8ba8c51e7c0d4d2 (diff) |
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 <[email protected]>
-rw-r--r-- | libavcodec/videotoolboxenc.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |