将CopyConvertedFrameDataToArray与LockRawImageBuffer进行比较的性能是什么 [英] What is the performance comparing CopyConvertedFrameDataToArray with LockRawImageBuffer

查看:167
本文介绍了将CopyConvertedFrameDataToArray与LockRawImageBuffer进行比较的性能是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 在Class ColorFrame中,我找到了一些将帧数据复制到数组的方法,还有一个方法-LockRawImageBuffer。在Sdk浏览器中,演示使用了lockRawImageBuffer.Is LockRawImageBuffer方法之前的复制方法在性能上?谢谢!

  In Class ColorFrame,I find some methods that copy frame data to array,also there is a method-LockRawImageBuffer.In Sdk browser,the demos use the lockRawImageBuffer.Is the LockRawImageBuffer methods prior with copy methods in performance?Thank you!

推荐答案

答案取决于您对数据的处理方式以及如何从原始缓冲区复制数据。副本是数据的优化/并行副本。如果您锁定缓冲区并按顺序访问它,则复制速度会更快。
副本将转储整个帧,并使用颜色进行转换。使用锁定,您必须进行颜色转换,但您可以访问具有偏移量的特定区域。 
The answer depends on what you are doing with the data and how you make your copy from the raw buffer as apposed to getting a copy. The copy is an optimized/parallel copy of the data. If you lock the buffer and access it sequentially then the copy is faster. The copy will dump the entire frame, and with color, do a conversion. Using the lock, you would have to do a color conversion, but you can access specific areas with an offset. 


这篇关于将CopyConvertedFrameDataToArray与LockRawImageBuffer进行比较的性能是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆