Question regarding the kVTVideoEncoderList_IsHardwareAccelerated flag

I am a bit confused on whether certain Video Toolbox (VT) encoders support hardware acceleration or not.

When I query the list of VT encoders (VTCopyVideoEncoderList(nil,&encoderList)) on an iPhone 14 Pro device, for avc1 (AVC / H.264) and hevc1 (HEVC / H.265) encoders, the kVTVideoEncoderList_IsHardwareAccelerated flag is not there, which -based on the documentation found on the VTVideoEncoderList.h- means that the encoders do not support hardware acceleration:

optional. CFBoolean. If present and set to kCFBooleanTrue, indicates that the encoder is hardware accelerated.

In fact, no encoders from this list return this flag as true and most of them do not include the flag at all on their dictionaries.

On the other hand, when I create a compression session using the VTCompressionSessionCreate() and pass the kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder as true in the encoder specifications, after querying the kVTCompressionPropertyKey_UsingHardwareAcceleratedVideoEncoder using the following code, I get a CFBoolean value of true for both H.264 and H.265 encoder.

In fact, I get a true value (for both of the aforementioned encoders) even if I don't specify the kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder during the creation of the compression session (note here that this flag was introduced in iOS 17.4 ^1).

So the question is: Are those encoders actually hardware accelerated on my device, and if so, why isn't that reflected on the VTCopyVideoEncoderList() call?

Just noticed that I forgot to post the code that queries the value of the kVTCompressionPropertyKey_UsingHardwareAcceleratedVideoEncoder flag:

if (@available(iOS 17.4, *)) {
    CFTypeRef value = NULL;
    OSStatus result = VTSessionCopyProperty(session,
                                            kVTCompressionPropertyKey_UsingHardwareAcceleratedVideoEncoder,
                                            kCFAllocatorDefault,
                                            &value);

    if (result == noErr) {
        NSLog(@"value: %@", value);
    }
}

From my experience, VideoToolbox dictionaries are often incomplete or wrong. Anyway, yes, H.264 and HEVC encoders and others are always hardware accelerated on iOS.

Something's that is also interesting is that when I set the kVTVideoEncoderSpecification_EnableLowLatencyRateControl flag during the creation of the compression session, then if I attempt to query back the value of the kVTCompressionPropertyKey_UsingHardwareAcceleratedVideoEncoder flag using the code I pasted above, I get an error (-12900 kVTPropertyNotSupportedErr), which it's either wrong or it means that the low-latency mode does not support hardware acceleration?

Question regarding the kVTVideoEncoderList_IsHardwareAccelerated flag
 
 
Q