Closed zhoupc2015 closed 10 months ago
sorry, I should remove the commits of [Merge branch 'master']
you think faster? i did consider that but from .net5 makes no difference - in aspect of api - it is intresting, just wander if it actually is but have to powerfull system cant mesure it reliably. across versions of ffmpeg api.
You are right, it's great to learn from you, thank you! I ran my test method a little more, and it’s exactly what you said. I’m sorry.
No sorry needed. we come covered it here as community ;)
To improve performance, add the manually controllable macro HAS_SYSTEM_MEMORY_COPY, which can change the code from a for loop to the form of Buffer.MemoryCopy. For example, the method ToArray of the structure bytearray61440: public byte[] ToArray() { var a = new byte[61440]; for (uint i = 0; i < 61440; i++) a[i] = [i]; return a; } becomes public byte[] ToArray() { var a = new byte[61440];fixed (byte* src = _, dst = a){ Buffer.MemoryCopy(src, dst, 61440, 61440); } return a; }