Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remap fixes #266

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/include/cpu/rpp_cpu_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4995,10 +4995,10 @@ inline void compute_generic_bilinear_srclocs_and_interpolate(T *srcPtrChannel, R

for (int c = 0; c < srcDescPtr->c; c++)
{
dst[c] = (T)((*(srcPtrChannel + srcLoc[0]) * bilinearCoeffs[0]) + // TopRow R01 Pixel * coeff0
dst[c] = (T)std::nearbyintf(((*(srcPtrChannel + srcLoc[0]) * bilinearCoeffs[0]) + // TopRow R01 Pixel * coeff0
(*(srcPtrChannel + srcLoc[1]) * bilinearCoeffs[1]) + // TopRow R02 Pixel * coeff1
(*(srcPtrChannel + srcLoc[2]) * bilinearCoeffs[2]) + // BottomRow R01 Pixel * coeff2
(*(srcPtrChannel + srcLoc[3]) * bilinearCoeffs[3])); // BottomRow R02 Pixel * coeff3
(*(srcPtrChannel + srcLoc[3]) * bilinearCoeffs[3]))); // BottomRow R02 Pixel * coeff3
srcPtrChannel += srcDescPtr->strides.cStride;
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/include/cpu/rpp_cpu_simd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2973,7 +2973,8 @@ inline void rpp_store8_u8pln1_to_u8pln1_avx(Rpp8u* dstPtr, __m256i &p)
inline void rpp_store8_f32pln1_to_u8pln1_avx(Rpp8u* dstPtr, __m256 &p)
{
__m256i px1 = _mm256_permute4x64_epi64(_mm256_packus_epi32(_mm256_cvtps_epi32(p), avx_px0), _MM_SHUFFLE(3,1,2,0));
rpp_storeu_si64((__m128i *)(dstPtr), _mm256_packus_epi16(px1, avx_px0));
px1 = _mm256_packus_epi16(px1, avx_px0);
rpp_store8_u8pln1_to_u8pln1_avx(dstPtr, px1);
}

inline void rpp_store24_f32pln3_to_u8pln3_avx(Rpp8u* dstRPtr, Rpp8u* dstGPtr, Rpp8u* dstBPtr, __m256* p)
Expand Down