From f2df8d3481f04ee198cfc9f0b601bbf0db9ea9a1 Mon Sep 17 00:00:00 2001 From: rigaya Date: Wed, 7 Feb 2024 18:10:35 +0900 Subject: [PATCH] =?UTF-8?q?spline=E7=B3=BB=E3=83=AA=E3=82=B5=E3=82=A4?= =?UTF-8?q?=E3=82=BA=E3=82=92=E4=BD=BF=E7=94=A8=E3=81=97=E3=81=9F=E3=81=A8?= =?UTF-8?q?=E3=81=8D=E3=81=AEmisalign=20access=E3=81=AE=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E6=80=A7=E3=81=8C=E3=81=82=E3=81=A3=E3=81=9F=E3=81=AE=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E3=80=82(=20#553=20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NVEncCore/NVEncFilterResize.cu | 11 ++++++----- NVEncCore/rgy_version.h | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/NVEncCore/NVEncFilterResize.cu b/NVEncCore/NVEncFilterResize.cu index 851e331f..42c50621 100644 --- a/NVEncCore/NVEncFilterResize.cu +++ b/NVEncCore/NVEncFilterResize.cu @@ -302,13 +302,14 @@ __inline__ __device__ float factor_spline(const float x_raw, const float *psCopyFactor) { const float x = fabs(x_raw); if (x >= (float)radius) return 0.0f; - const float4 weight = ((const float4 *)psCopyFactor)[min((int)x, radius - 1)]; + const int pos = min((int)x, radius - 1); + const float *psWeight = psCopyFactor + min((int)x, radius - 1) * 4; //重みを計算 - float w = weight.w; - w += x * weight.z; + float w = psWeight[3]; + w += x * psWeight[2]; const float x2 = x * x; - w += x2 * weight.y; - w += x2 * x * weight.x; + w += x2 * psWeight[1]; + w += x2 * x * psWeight[0]; return w; } diff --git a/NVEncCore/rgy_version.h b/NVEncCore/rgy_version.h index 7b12d6d8..f5ed8a3c 100644 --- a/NVEncCore/rgy_version.h +++ b/NVEncCore/rgy_version.h @@ -29,9 +29,9 @@ #ifndef __RGY_CONFIG_H__ #define __RGY_CONFIG_H__ -#define VER_FILEVERSION 0,7,42,0 -#define VER_STR_FILEVERSION "7.42beta1" -#define VER_STR_FILEVERSION_TCHAR _T("7.42beta1") +#define VER_FILEVERSION 0,7,42,1 +#define VER_STR_FILEVERSION "7.42beta2" +#define VER_STR_FILEVERSION_TCHAR _T("7.42beta2") #ifdef _M_IX86 #define BUILD_ARCH_STR _T("x86")