1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

Merge pull request #25984 from fengyuentau:imgproc/warpaffine_opt

imgproc: add optimized warpAffine kernels for 8U/16U/32F + C1/C3/C4 inputs #25984

Merge wtih https://github.com/opencv/opencv_extra/pull/1198.
Merge with https://github.com/opencv/opencv_contrib/pull/3787.


### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
Yuantao Feng
2024-10-03 19:01:36 +08:00
committed by GitHub
parent ebf11d36f4
commit 97681bdfce
16 changed files with 3070 additions and 179 deletions
@@ -2228,9 +2228,7 @@ inline v_int16x8 v_round(const v_float16x8 &a)
inline v_int16x8 v_floor(const v_float16x8 &a)
{
int16x8_t a1 = vcvtq_s16_f16(a.val);
uint16x8_t mask = vcgtq_f16(vcvtq_f16_s16(a1), a.val);
return v_int16x8(vaddq_s16(a1, vreinterpretq_s16_u16(mask)));
return v_int16x8(vcvtmq_s16_f16(a.val));
}
inline v_int16x8 v_ceil(const v_float16x8 &a)
@@ -2271,9 +2269,13 @@ inline v_int32x4 v_round(const v_float32x4& a)
#endif
inline v_int32x4 v_floor(const v_float32x4& a)
{
#if __ARM_ARCH > 7
return v_int32x4(vcvtmq_s32_f32(a.val));
#else
int32x4_t a1 = vcvtq_s32_f32(a.val);
uint32x4_t mask = vcgtq_f32(vcvtq_f32_s32(a1), a.val);
return v_int32x4(vaddq_s32(a1, vreinterpretq_s32_u32(mask)));
#endif
}
inline v_int32x4 v_ceil(const v_float32x4& a)