GetStream / stream-video-swift

SwiftUI Video SDK ➡️ Stream Video 📹
https://getstream.io/video/sdk/ios/
Other
112 stars 21 forks source link

i420->NV12 vs i420->ARGB #398

Closed nathanwhy closed 2 months ago

nathanwhy commented 3 months ago

I just read the Boost Performance by Over 100x Using the Accelerate Framework. Actually AVSampleBufferDisplayLayer of PIP accepts two types of streams, RGBA and YUV-NV12. Why not consider converting the stream directly to YUV-NV12? This might perform better than ARGB.

ipavlidakis commented 3 months ago

Hi @nathanwhy, do you have any resources that you can share about the support for YUV-NV12 on AVSampleBufferDisplayLayer?

nathanwhy commented 3 months ago

How about: https://github.com/TelegramMessenger/tgcalls/blob/master/tgcalls/platform/darwin/VideoSampleBufferView.mm#L425

testableapple commented 2 months ago

Hi @nathanwhy,

Thanks for your suggestion. We might consider leveraging it in the future, but for now, we are happy with our current solution and don't plan to change it anytime soon.

Kind regards, Alexey