From f87001d1da259b729795741bb89a948c006631c0 Mon Sep 17 00:00:00 2001 From: rigaya Date: Fri, 15 Dec 2023 18:48:41 +0900 Subject: [PATCH] =?UTF-8?q?arm64=E3=81=A7=E3=81=AE=E3=83=93=E3=83=AB?= =?UTF-8?q?=E3=83=89=E7=94=A8=E3=81=AB=E4=BF=AE=E6=AD=A3=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NVEncCore/rgy_output.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/NVEncCore/rgy_output.cpp b/NVEncCore/rgy_output.cpp index b7a0ec57..ce736bfe 100644 --- a/NVEncCore/rgy_output.cpp +++ b/NVEncCore/rgy_output.cpp @@ -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));