开发者

first memcpy into buffer faster than direct access to pixels of CVPixelBufferGetBaseAddress

开发者 https://www.devze.com 2023-03-03 19:10 出处:网络
I noticed that accessing the pixels returned by CVPixelBufferGetBaseAddress directly (I\'m u开发者_JAVA百科sing two nested for-loops) is about 100 times slower than first allocating a buffer with mall

I noticed that accessing the pixels returned by CVPixelBufferGetBaseAddress directly (I'm u开发者_JAVA百科sing two nested for-loops) is about 100 times slower than first allocating a buffer with malloc, memcpy the pixels into that buffer and then accessing the pixels in that buffer. Why is that?

0

精彩评论

暂无评论...
验证码 换一张
取 消