History

Fix arm downsampler to add horizontally first

When rounding inbetween each step, the order of the additions matter. This fixes the testsuite when running on arm and arm64, after a56b927135a61c4363a21d6e779f611de6304932.

Martin Storsjö committed 9 years ago

Commit ea4bb891 parent 02e824d2 files · +20 −14Browse files

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

Unified · Split

2 files
  1. codec/processing/src/arm/down_sample_neon.S +6 −4
  2. codec/processing/src/arm64/down_sample_aarch64_neon.S +14 −10
codec/processing/src/arm/down_sample_neon.S+6−4
@@ -57,10 +57,11 @@ comp_ds_bilinear_loop0: · 56 unmodified lines
5757
5858 vld1.8 {q0,q1}, [r2]!
5959 vld1.8 {q2,q3}, [r7]!
60− vrhadd.u8 q0, q0, q2
61− vrhadd.u8 q1, q1, q3
6260 vuzp.8 q0, q1
61+ vuzp.8 q2, q3
6362 vrhadd.u8 q0, q0, q1
63+ vrhadd.u8 q2, q2, q3
64+ vrhadd.u8 q0, q0, q2
6465 vst1.32 {q0}, [r0]!
6566 add lr, #32
6667
@@ -188,10 +189,11 @@ comp_ds_bilinear_w_x32_loop1: · 121 unmodified lines
188189
189190 vld1.8 {q0,q1}, [r2]!
190191 vld1.8 {q2,q3}, [r7]!
191− vrhadd.u8 q0, q0, q2
192− vrhadd.u8 q1, q1, q3
193192 vuzp.8 q0, q1
193+ vuzp.8 q2, q3
194194 vrhadd.u8 q0, q0, q1
195+ vrhadd.u8 q2, q2, q3
196+ vrhadd.u8 q0, q0, q2
195197 vst1.32 {q0}, [r0]!
196198 subs r6, #1
197199 bne comp_ds_bilinear_w_x32_loop1
codec/processing/src/arm64/down_sample_aarch64_neon.S+14−10
@@ -51,11 +51,13 @@ comp_ds_bilinear_loop0: · 50 unmodified lines
5151
5252 ld1 {v0.16b, v1.16b}, [x2], #32
5353 ld1 {v2.16b, v3.16b}, [x7], #32
54− urhadd v0.16b, v0.16b, v2.16b
55− urhadd v1.16b, v1.16b, v3.16b
56− uzp1 v2.16b, v0.16b, v1.16b
57− uzp2 v3.16b, v0.16b, v1.16b
58− urhadd v2.16b, v2.16b, v3.16b
54+ uzp1 v4.16b, v0.16b, v1.16b
55+ uzp2 v5.16b, v0.16b, v1.16b
56+ uzp1 v6.16b, v2.16b, v3.16b
57+ uzp2 v7.16b, v2.16b, v3.16b
58+ urhadd v0.16b, v4.16b, v5.16b
59+ urhadd v1.16b, v6.16b, v7.16b
60+ urhadd v2.16b, v0.16b, v1.16b
5961 st1 {v2.16b}, [x0], #16
6062 add w9, w9, #32
6163
@@ -92,11 +94,13 @@ comp_ds_bilinear_w_x32_loop1: · 30 unmodified lines
9294
9395 ld1 {v0.16b, v1.16b}, [x2], #32
9496 ld1 {v2.16b, v3.16b}, [x7], #32
95− urhadd v0.16b, v0.16b, v2.16b
96− urhadd v1.16b, v1.16b, v3.16b
97− uzp1 v2.16b, v0.16b, v1.16b
98− uzp2 v3.16b, v0.16b, v1.16b
99− urhadd v2.16b, v2.16b, v3.16b
97+ uzp1 v4.16b, v0.16b, v1.16b
98+ uzp2 v5.16b, v0.16b, v1.16b
99+ uzp1 v6.16b, v2.16b, v3.16b
100+ uzp2 v7.16b, v2.16b, v3.16b
101+ urhadd v0.16b, v4.16b, v5.16b
102+ urhadd v1.16b, v6.16b, v7.16b
103+ urhadd v2.16b, v0.16b, v1.16b
100104 st1 {v2.16b}, [x0], #16
101105
102106 sub w6, w6, #1

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