Пример #1
0
static void CopyFrameNV12_SSE4_MT(const BYTE *pSourceData, BYTE *pY, BYTE *pUV, int surfaceHeight, int imageHeight, int pitch)
{
  const int halfSize = (imageHeight * pitch) >> 1;
  Concurrency::parallel_for(0, 3, [&](int i) {
    if (i < 2)
      gpu_memcpy(pY + (halfSize * i), pSourceData + (halfSize * i), halfSize);
    else
      gpu_memcpy(pUV, pSourceData + (surfaceHeight * pitch), halfSize);
  });
}
Пример #2
0
static void CopyFrameNV12_SSE4(const BYTE *pSourceData, BYTE *pY, BYTE *pUV, int srcLines, int dstLines, int pitch)
{
  const int size = dstLines * pitch;
  gpu_memcpy(pY, pSourceData, size);
  gpu_memcpy(pUV, pSourceData + (srcLines * pitch), size >> 1);
}
Пример #3
0
static void CopyFrameNV12_SSE4(const BYTE *pSourceData, BYTE *pY, BYTE *pUV, int surfaceHeight, int imageHeight, int pitch)
{
  const int size = imageHeight * pitch;
  gpu_memcpy(pY, pSourceData, size);
  gpu_memcpy(pUV, pSourceData + (surfaceHeight * pitch), size >> 1);
}