VideoToolbox AV1 decoding on Apple platforms

As some have clocked, this was added in a recent SDK release...

kCMVideoCodecType_AV1

...does anyone know if and when AV1 decode support, even if software-only, is going to be available on Apple platforms?

At the moment, one must decode using dav1d, (which is pretty performant, to be fair) but are we expecting at least software AV1 support on existing hardware any time soon, does anybody know?

On my macOS 13.1 there is this file inside /System/Library/Plug-Ins

AV1DecoderSW.bundle

Inside the contents there is this plist:

However, when creating a VTDecompressionSession for AV1, it cannot find a decoder, failing with kVTCouldNotFindVideoDecoderErr.

If I export the symbols from the binary inside the above bundle, it has the following top two entries:

/Users/oliver/Desktop/AV1DecoderSW (for architecture arm64e):

00000000000362dc T _AV1Decoder_CreateInstance 0000000000037794 T _AV1RegisterDecoder

I tried manually loading the plugin bundle as an CFBundleRef and getting a pointer to the AV1RegisterDecoder function shown above, and called AV1RegisterDecoder but this still didn't make a difference.

Would it be a correct assumption, then, that this is WIP that hasn't been enabled yet, or does anyone know of a way to enable it?

Finally, I loaded the executable into a text file and noticed that it appears to be linked directly to a static build of libdav1d, as I could see the function names and error messages.

What about it on iPhone 15 pro has AV1 decoder

AV1 not only supported on iPhone 15 Pro, but it is available without special entitlement.

Used this code to check

func listVideoDecoders() {
    let codecTypes: [CMVideoCodecType: String] = [
        kCMVideoCodecType_H264: "H.264",
        kCMVideoCodecType_HEVC: "H.265",
        kCMVideoCodecType_HEVCWithAlpha: "H.265 alpha",
        kCMVideoCodecType_DolbyVisionHEVC: "H.265 dolby vision",
        kCMVideoCodecType_AV1: "AV1",
        kCMVideoCodecType_VP9: "VP9",
    ]

    for (codecType, codecName) in codecTypes {
        let isSupported = VTIsHardwareDecodeSupported(codecType)
        if isSupported {
            print("Hardware decoder available for codec: \(codecName)")
        } else {
            print("Hardware decoder not available for codec: \(codecName)")
        }
    }
}

Result:

Hardware decoder available for codec: H.265 alpha
Hardware decoder available for codec: H.265 dolby vision
Hardware decoder available for codec: AV1
Hardware decoder available for codec: H.265
Hardware decoder available for codec: H.264
Hardware decoder not available for codec: VP9

But it's a bummer that you still need a special entitlement to use VP9

VideoToolbox AV1 decoding on Apple platforms
 
 
Q