History

fix 32-bit parameters issue on arm64 assembly function

Karina committed 10 years ago

Commit d34e2091 parent 794376413 files · +322 −40Browse files

Showing the changes to codec/processing/src (4 of 13 files). Show all

Unified · Split

4 files
  1. codec/processing/src/arm64/adaptive_quantization_aarch64_neon.S +2 −0
  2. codec/processing/src/arm64/down_sample_aarch64_neon.S +13 −0
  3. codec/processing/src/arm64/pixel_sad_aarch64_neon.S +3 −1
  4. codec/processing/src/arm64/vaa_calc_aarch64_neon.S +6 −0
codec/processing/src/arm64/adaptive_quantization_aarch64_neon.S+2−0
@@ -33,6 +33,8 @@ · 32 unmodified lines
33#ifdef HAVE_NEON_AARCH6433#ifdef HAVE_NEON_AARCH64
34#include "arm_arch64_common_macro.S"34#include "arm_arch64_common_macro.S"
35WELS_ASM_AARCH64_FUNC_BEGIN SampleVariance16x16_AArch64_neon35WELS_ASM_AARCH64_FUNC_BEGIN SampleVariance16x16_AArch64_neon
36 SIGN_EXTENSION x1, w1
37 SIGN_EXTENSION x3, w3
36 ld1 {v1.16b}, [x0], x1 //save the ref data (16bytes)38 ld1 {v1.16b}, [x0], x1 //save the ref data (16bytes)
37 ld1 {v0.16b}, [x2], x3 //save the src data (16bytes)39 ld1 {v0.16b}, [x2], x3 //save the src data (16bytes)
38 uabd v2.16b, v0.16b, v1.16b40 uabd v2.16b, v0.16b, v1.16b
codec/processing/src/arm64/down_sample_aarch64_neon.S+13−0
@@ -174,6 +174,9 @@ comp_ds_bilinear_onethird_loop0: · 173 unmodified lines
174 //restore the tailer for the unasigned size174 //restore the tailer for the unasigned size
175 st1 {v16.16b}, [x0]175 st1 {v16.16b}, [x0]
176WELS_ASM_AARCH64_FUNC_END176WELS_ASM_AARCH64_FUNC_END
177;void DyadicBilinearQuarterDownsampler_AArch64_neon(uint8_t* pDst, const int32_t kiDstStride,
178;uint8_t* pSrc, const int32_t kiSrcStride,
179;const int32_t kiSrcWidth, const int32_t kiHeight);
177 180
178WELS_ASM_AARCH64_FUNC_BEGIN DyadicBilinearQuarterDownsampler_AArch64_neon181WELS_ASM_AARCH64_FUNC_BEGIN DyadicBilinearQuarterDownsampler_AArch64_neon
179 //Initialize the register182 //Initialize the register
@@ -229,6 +232,9 @@ comp_ds_bilinear_quarter_loop0: · 49 unmodified lines
229 st1 {v16.16b}, [x0]232 st1 {v16.16b}, [x0]
230WELS_ASM_AARCH64_FUNC_END233WELS_ASM_AARCH64_FUNC_END
231 234
235;void GeneralBilinearAccurateDownsampler_AArch64_neon (uint8_t* pDst, const int32_t kiDstStride,
236; const int32_t kiDstWidth, const int32_t kiDstHeight,
237; uint8_t* pSrc, const int32_t kiSrcStride, const uint32_t kuiScaleX, const uint32_t kuiScaleY);
232WELS_ASM_AARCH64_FUNC_BEGIN GeneralBilinearAccurateDownsampler_AArch64_neon238WELS_ASM_AARCH64_FUNC_BEGIN GeneralBilinearAccurateDownsampler_AArch64_neon
233 mov w10, #32767239 mov w10, #32767
234 and w8, w6, w10240 and w8, w6, w10
@@ -259,6 +265,13 @@ WELS_ASM_AARCH64_FUNC_BEGIN GeneralBilinearAccurateDownsampler_AArch64_neon · 24 unmodified lines
259 265
260 eor v26.16b, v26.16b, v26.16b266 eor v26.16b, v26.16b, v26.16b
261 eor v27.16b, v27.16b, v27.16b267 eor v27.16b, v27.16b, v27.16b
268 SIGN_EXTENSION x1, w1
269 SIGN_EXTENSION x2, w2
270 SIGN_EXTENSION x3, w3
271 SIGN_EXTENSION x5, w5
272 SIGN_EXTENSION x6, w6
273 SIGN_EXTENSION x7, w7
274
262 sub x1, x1, x2275 sub x1, x1, x2
263 sub x3, x3, #1276 sub x3, x3, #1
264 277
codec/processing/src/arm64/pixel_sad_aarch64_neon.S+3−1
@@ -32,8 +32,10 @@ · 31 unmodified lines
32 32
33#ifdef HAVE_NEON_AARCH6433#ifdef HAVE_NEON_AARCH64
34#include "arm_arch64_common_macro.S"34#include "arm_arch64_common_macro.S"
35 35;int32_t WelsProcessingSampleSad8x8_AArch64_neon (uint8_t*, int32_t, uint8_t*, int32_t);
36WELS_ASM_AARCH64_FUNC_BEGIN WelsProcessingSampleSad8x8_AArch64_neon36WELS_ASM_AARCH64_FUNC_BEGIN WelsProcessingSampleSad8x8_AArch64_neon
37 SIGN_EXTENSION x1, w1
38 SIGN_EXTENSION x3, w3
37 ld1 {v0.8b}, [x0], x139 ld1 {v0.8b}, [x0], x1
38 ld1 {v1.8b}, [x2], x340 ld1 {v1.8b}, [x2], x3
39 uabdl v2.8h, v0.8b, v1.8b41 uabdl v2.8h, v0.8b, v1.8b
codec/processing/src/arm64/vaa_calc_aarch64_neon.S+6−0
@@ -61,6 +61,8 @@ · 60 unmodified lines
61 */61 */
62WELS_ASM_AARCH64_FUNC_BEGIN VAACalcSad_AArch64_neon62WELS_ASM_AARCH64_FUNC_BEGIN VAACalcSad_AArch64_neon
63 eor v31.16b, v31.16b, v31.16b63 eor v31.16b, v31.16b, v31.16b
64
65 SIGN_EXTENSION x4, w4
64 lsl x9, x4, #466 lsl x9, x4, #4
65 sub x10, x9, #16 //x10 keep the 16*pic_stride-1667 sub x10, x9, #16 //x10 keep the 16*pic_stride-16
66 sub x9, x9, x2 //x9 keep the 16*pic_stride-pic_width68 sub x9, x9, x2 //x9 keep the 16*pic_stride-pic_width
@@ -119,6 +121,7 @@ WELS_ASM_AARCH64_FUNC_BEGIN VAACalcSadBgd_AArch64_neon · 52 unmodified lines
119 ldr x15, [sp, #0]121 ldr x15, [sp, #0]
120 eor v28.16b, v28.16b, v28.16b122 eor v28.16b, v28.16b, v28.16b
121 123
124 SIGN_EXTENSION x4, w4
122 lsl x9, x4, #4125 lsl x9, x4, #4
123 sub x10, x9, #16 //x10 keep the 16*pic_stride-16126 sub x10, x9, #16 //x10 keep the 16*pic_stride-16
124 sub x9, x9, x2 //x9 keep the 16*pic_stride-pic_width127 sub x9, x9, x2 //x9 keep the 16*pic_stride-pic_width
@@ -260,6 +263,7 @@ WELS_ASM_AARCH64_FUNC_BEGIN VAACalcSadSsdBgd_AArch64_neon · 135 unmodified lines
260 ldr x15, [sp, #24] //p_mad8x8263 ldr x15, [sp, #24] //p_mad8x8
261 eor v17.16b, v17.16b, v17.16b264 eor v17.16b, v17.16b, v17.16b
262 265
266 SIGN_EXTENSION x4, w4
263 lsl x9, x4, #4267 lsl x9, x4, #4
264 sub x10, x9, #16 //x10 keep the 16*pic_stride-16268 sub x10, x9, #16 //x10 keep the 16*pic_stride-16
265 sub x9, x9, x2 //x9 keep the 16*pic_stride-pic_width269 sub x9, x9, x2 //x9 keep the 16*pic_stride-pic_width
@@ -400,6 +404,7 @@ WELS_ASM_AARCH64_FUNC_BEGIN VAACalcSadSsd_AArch64_neon · 134 unmodified lines
400 ldr x13, [sp, #8] //psqdiff16x16404 ldr x13, [sp, #8] //psqdiff16x16
401 eor v17.16b, v17.16b, v17.16b405 eor v17.16b, v17.16b, v17.16b
402 406
407 SIGN_EXTENSION x4, w4
403 lsl x9, x4, #4408 lsl x9, x4, #4
404 sub x10, x9, #16 //x10 keep the 16*pic_stride-16409 sub x10, x9, #16 //x10 keep the 16*pic_stride-16
405 sub x9, x9, x2 //x9 keep the 16*pic_stride-pic_width410 sub x9, x9, x2 //x9 keep the 16*pic_stride-pic_width
@@ -500,6 +505,7 @@ WELS_ASM_AARCH64_FUNC_BEGIN VAACalcSadVar_AArch64_neon · 94 unmodified lines
500 ldr x12, [sp, #0] //psqsum16x16505 ldr x12, [sp, #0] //psqsum16x16
501 eor v17.16b, v17.16b, v17.16b506 eor v17.16b, v17.16b, v17.16b
502 507
508 SIGN_EXTENSION x4, w4
503 lsl x9, x4, #4509 lsl x9, x4, #4
504 sub x10, x9, #16 //x10 keep the 16*pic_stride-16510 sub x10, x9, #16 //x10 keep the 16*pic_stride-16
505 sub x9, x9, x2 //x9 keep the 16*pic_stride-pic_width511 sub x9, x9, x2 //x9 keep the 16*pic_stride-pic_width

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t