提交 7a32f555 编写于 作者: 赵奇可

fix resize bicubic code format

上级 eef28c62
......@@ -64,11 +64,12 @@ inline void GetWeightsAndIndices(float scale, int64_t out_loc, int64_t limit,
const float delta = scale * out_loc - in_loc;
const int64_t offset = lrintf(delta * kTableSize);
const float *coeffs_tab = GetCoeffsTable();
*weights = {coeffs_tab[offset * 2 + 1], coeffs_tab[offset * 2],
coeffs_tab[(kTableSize - offset) * 2],
coeffs_tab[(kTableSize - offset) * 2 + 1]};
*weights = {coeffs_tab[offset * 2 + 1],
coeffs_tab[offset * 2],
coeffs_tab[(kTableSize - offset) * 2],
coeffs_tab[(kTableSize - offset) * 2 + 1]};
*indices = {Bound(in_loc - 1, limit), Bound(in_loc, limit),
Bound(in_loc + 1, limit), Bound(in_loc + 2, limit)};
Bound(in_loc + 1, limit), Bound(in_loc + 2, limit)};
}
inline float Interpolate1D(const std::vector<float> &weights,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册