Skip to content
Snippets Groups Projects
Commit 33b1d658 authored by Liqiang Wang's avatar Liqiang Wang
Browse files

Merge branch 'test_fix_issue_18' into 'VTM-11.0_nnvc'

Fix for issue #18.

See merge request !49
parents 8241b681 f6f11c49
No related branches found
No related tags found
No related merge requests found
...@@ -253,11 +253,10 @@ void NNSuperResolution::CNNSRProcess(const CPelUnitBuf &recBuf, const PelUnitBuf ...@@ -253,11 +253,10 @@ void NNSuperResolution::CNNSRProcess(const CPelUnitBuf &recBuf, const PelUnitBuf
{ {
int id_x = ((pix_x + xx) << 1) + kk % 2; int id_x = ((pix_x + xx) << 1) + kk % 2;
int id_y = ((pix_y + yy) << 1) + kk / 2; int id_y = ((pix_y + yy) << 1) + kk / 2;
#if NN_FIXED_POINT_IMPLEMENTATION
int pos_x = pix_x - st_w + xx; int pos_x = pix_x - st_w + xx;
int pos_y = pix_y - st_h + yy; int pos_y = pix_y - st_h + yy;
#if NN_FIXED_POINT_IMPLEMENTATION
cnnBuf.get(COMPONENT_Y).at(id_x, id_y) = Pel(Clip3<int>(0, maxValue, int(m_SRYModel[sliceType == I_SLICE ? 0 : 1].result(0)(0, pos_y, pos_x, kk) + (rprBuf.get(COMPONENT_Y).at(id_x, id_y) << in_left_shift)) >> out_left_shift)); cnnBuf.get(COMPONENT_Y).at(id_x, id_y) = Pel(Clip3<int>(0, maxValue, int(m_SRYModel[sliceType == I_SLICE ? 0 : 1].result(0)(0, pos_y, pos_x, kk) + (rprBuf.get(COMPONENT_Y).at(id_x, id_y) << in_left_shift)) >> out_left_shift));
#else #else
cnnBuf.get(COMPONENT_Y).at(id_x, id_y) = Pel(Clip3<int>(0, maxValue, int((m_SRYModel[sliceType == I_SLICE ? 0 : 1].result(0)(0, (id_y - st_h) >> 1, (id_x - st_w) >> 1, kk) + (rprBuf.get(COMPONENT_Y).at(id_x, id_y) / maxValue)) * maxValue + 0.5))); cnnBuf.get(COMPONENT_Y).at(id_x, id_y) = Pel(Clip3<int>(0, maxValue, int((m_SRYModel[sliceType == I_SLICE ? 0 : 1].result(0)(0, (id_y - st_h) >> 1, (id_x - st_w) >> 1, kk) + (rprBuf.get(COMPONENT_Y).at(id_x, id_y) / maxValue)) * maxValue + 0.5)));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment