iOS 11 API HEVC support

Hi all,


we were very excited in the past when Video Toolbox was first added to iOS 8 with H264 support. The new API made it possible to use AVSampleBufferDisplayLayer with a custom H264 video stream coming from the network for example. Now, there has been much talk about HEVC support in iOS11 so I am bit surprised that the Video Toolbox API does not yet support HEVC (as it seems). To start with, I am missing for example a function similar to CMVideoFormatDescriptionCreateFromH264ParameterSets for HEVC. Does anybody have any information about if / when HEVC support will be added to Video Toolbox API like H264? Or is there another way of decoding (HW accelerated) HEVC single samples in iOS11 preferred over the Video Toolbox API?


Thanks.


Alex

Answered by koby@zixi in 271741022

Hi Alex

I dont' know if AVSampleBufferDisplayLayer supports HEVC (my guess it does) but I know for sure that VTDecompressionSession does support and decodes HEVC streams.

Video Toolbox API exposes a similar function for HEVC and it's called CMVideoFormatDescriptionCreateFromHEVCParametersSet(check CMFormatDescription.h line 920).


You will need to supply (at least) 3 parameters sets : VPS, SPS and PPS. some HEVC streams are using more than 1 PPS.

Please note that this function available for iOS 11 only.


I hope it helps.

Koby

Accepted Answer

Hi Alex

I dont' know if AVSampleBufferDisplayLayer supports HEVC (my guess it does) but I know for sure that VTDecompressionSession does support and decodes HEVC streams.

Video Toolbox API exposes a similar function for HEVC and it's called CMVideoFormatDescriptionCreateFromHEVCParametersSet(check CMFormatDescription.h line 920).


You will need to supply (at least) 3 parameters sets : VPS, SPS and PPS. some HEVC streams are using more than 1 PPS.

Please note that this function available for iOS 11 only.


I hope it helps.

Koby

Hi Koby,


thank you very much for pointing out this function. I was checking this page https://developer.apple.com/documentation/coremedia/cmformatdescription-u8g and there is only the H264 version of the function listed. Seems like the docs are not 100 percent ready yet.


Thanks.


Alex

Hi Koby,


one more thing regarding this. I am trying to make VTDecompressionSession (and AVSampleBufferDisplayLayer) work with HEVC in iOS11 emulator, however, I am having some problems. Passing valid VPS, SPS and PPS I can successfully create the CMVideoFormatDescription, but VTDecompressionSessionCreate still does not create a valid session from it. I posted another question here https://forums.developer.apple.com/thread/92184


You mentioned, that VTDecompressionSession does support HEVC in iOS11, but does this also hold for the emulator or do I need a real device?


Thanks.


Alex

Hi Alex

I don't know if it works for the simulator.

It works for me on real devices (iPad mini 2, iPhone 6/7)


Koby

iOS 11 API HEVC support
 
 
Q