Skip to content

Commit

Permalink
--vpp-resize ngx-vsrを使用すると、その後の処理が正常に動作しない問題を修正。( #608 )
Browse files Browse the repository at this point in the history
  • Loading branch information
rigaya committed Aug 4, 2024
1 parent 1ede9ef commit a378b1c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions NVEncCore/NVEncFilterResize.cu
Original file line number Diff line number Diff line change
Expand Up @@ -831,15 +831,6 @@ RGY_ERR NVEncFilterResize::init(shared_ptr<NVEncFilterParam> pParam, shared_ptr<
return RGY_ERR_INVALID_PARAM;
}

sts = AllocFrameBuf(pResizeParam->frameOut, 1);
if (sts != RGY_ERR_NONE) {
AddMessage(RGY_LOG_ERROR, _T("failed to allocate memory: %s.\n"), get_err_mes(sts));
return sts;
}
for (int i = 0; i < RGY_CSP_PLANES[pParam->frameOut.csp]; i++) {
pResizeParam->frameOut.pitch[i] = m_frameBuf[0]->frame.pitch[i];
}

auto resizeInterp = pResizeParam->interp;
if (isNvvfxResizeFiter(pResizeParam->interp)) {
if (!pResizeParam->nvvfxSuperRes) {
Expand Down Expand Up @@ -873,6 +864,15 @@ RGY_ERR NVEncFilterResize::init(shared_ptr<NVEncFilterParam> pParam, shared_ptr<
pResizeParam->ngxvsr.reset();
}

sts = AllocFrameBuf(pResizeParam->frameOut, 1);
if (sts != RGY_ERR_NONE) {
AddMessage(RGY_LOG_ERROR, _T("failed to allocate memory: %s.\n"), get_err_mes(sts));
return sts;
}
for (int i = 0; i < RGY_CSP_PLANES[pParam->frameOut.csp]; i++) {
pResizeParam->frameOut.pitch[i] = m_frameBuf[0]->frame.pitch[i];
}

if ((!m_weightSpline || m_weightSplineAlgo != resizeInterp)
&& (resizeInterp == RGY_VPP_RESIZE_SPLINE16 || resizeInterp == RGY_VPP_RESIZE_SPLINE36 || resizeInterp == RGY_VPP_RESIZE_SPLINE64)) {
static const auto SPLINE16_WEIGHT = std::vector<float>{
Expand Down

0 comments on commit a378b1c

Please sign in to comment.