Skip to content

Commit

Permalink
spline系リサイズを使用したときのmisalign accessの可能性があったのを修正。( #553 )
Browse files Browse the repository at this point in the history
  • Loading branch information
rigaya committed Feb 7, 2024
1 parent 9da82d7 commit f2df8d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
11 changes: 6 additions & 5 deletions NVEncCore/NVEncFilterResize.cu
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
6 changes: 3 additions & 3 deletions NVEncCore/rgy_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit f2df8d3

Please sign in to comment.