Skip to content

Commit

Permalink
arm64でのビルド用に修正。
Browse files Browse the repository at this point in the history
  • Loading branch information
rigaya committed Dec 15, 2023
1 parent 88cb01c commit f87001d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions NVEncCore/rgy_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -812,15 +812,15 @@ RGY_ERR RGYOutFrame::WriteNextFrame(RGYFrame *pSurface) {
void *ptrLineU = m_UVBuffer.get() + j * widthUV * pixSize;
void *ptrLineV = m_UVBuffer.get() + j * widthUV * pixSize + planeOffsetUV;
if (pSurface->csp() == RGY_CSP_NV12) {
const uint8_t *ptrUV = (const uint8_t *)ptrLineUV;
uint8_t *ptrU = (uint8_t *)ptrLineU;
uint8_t *ptrV = (uint8_t *)ptrLineV;
#if defined(_M_IX86) || defined(_M_X64) || defined(__x86_64)
alignas(16) static const uint16_t MASK_LOW8[] = {
0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff
};
const __m128i xMaskLow8 = _mm_load_si128((__m128i *)MASK_LOW8);

const uint8_t *ptrUV = (const uint8_t *)ptrLineUV;
uint8_t *ptrU = (uint8_t *)ptrLineU;
uint8_t *ptrV = (uint8_t *)ptrLineV;
#if defined(_M_IX86) || defined(_M_X64) || defined(__x86_64)
for (uint32_t i = 0; i < widthUV; i += 16, ptrUV += 32, ptrU += 16, ptrV += 16) {
__m128i x0 = _mm_loadu_si128((const __m128i *)(ptrUV + 0));
__m128i x1 = _mm_loadu_si128((const __m128i *)(ptrUV + 16));
Expand Down

0 comments on commit f87001d

Please sign in to comment.