[vlc-commits] [Git][videolan/vlc][master] 2 commits: aarch64/sve: honor byte count in deinterlace merge
Steve Lhomme (@robUx4)
gitlab at videolan.org
Mon Jun 22 10:47:38 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
ccf38fe1 by markoub at 2026-06-22T12:31:03+02:00
aarch64/sve: honor byte count in deinterlace merge
The merge callback receives a byte length. merge16_arm_sve indexes 16-bit samples, so convert x3 from bytes to samples before the whilelt loop.
This matches Merge16BitGeneric, which iterates i_bytes / 2 words.
- - - - -
85b9e847 by markoub at 2026-06-22T12:31:03+02:00
aarch64: use rounded average for deinterlace merge
Match the generic deinterlace merge semantics in the AArch64 AdvSIMD backend.
AdvSIMD can use rounded halving add directly.
- - - - -
2 changed files:
- modules/isa/aarch64/simd/merge.S
- modules/isa/aarch64/sve/merge.S
Changes:
=====================================
modules/isa/aarch64/simd/merge.S
=====================================
@@ -43,12 +43,12 @@ function merge8_arm64
ld1 {v0.16b,v1.16b}, [SRC1], x10
ld1 {v4.16b,v5.16b}, [SRC2], x10
ld1 {v2.16b,v3.16b}, [x11], x10
- uhadd v0.16b, v0.16b, v4.16b
+ urhadd v0.16b, v0.16b, v4.16b
ld1 {v6.16b,v7.16b}, [x12], x10
subs x5, x5, #64
- uhadd v1.16b, v1.16b, v5.16b
- uhadd v2.16b, v2.16b, v6.16b
- uhadd v3.16b, v3.16b, v7.16b
+ urhadd v1.16b, v1.16b, v5.16b
+ urhadd v2.16b, v2.16b, v6.16b
+ urhadd v3.16b, v3.16b, v7.16b
st1 {v0.16b,v1.16b}, [DEST], #32
st1 {v2.16b,v3.16b}, [DEST], #32
b.gt 1b
@@ -56,14 +56,14 @@ function merge8_arm64
tbz SIZE, #5, 3f
ld1 {v0.16b,v1.16b}, [SRC1], #32
ld1 {v4.16b,v5.16b}, [SRC2], #32
- uhadd v0.16b, v0.16b, v4.16b
- uhadd v1.16b, v1.16b, v5.16b
+ urhadd v0.16b, v0.16b, v4.16b
+ urhadd v1.16b, v1.16b, v5.16b
st1 {v0.16b,v1.16b}, [DEST], #32
3:
tbz SIZE, #4, 4f
ld1 {v0.16b}, [SRC1]
ld1 {v4.16b}, [SRC2]
- uhadd v0.16b, v0.16b, v4.16b
+ urhadd v0.16b, v0.16b, v4.16b
st1 {v0.16b}, [DEST]
4:
ret
@@ -77,11 +77,11 @@ function merge16_arm64
ld1 {v0.8h,v1.8h}, [SRC1], #32
ld1 {v4.8h,v5.8h}, [SRC2], #32
ld1 {v2.8h,v3.8h}, [SRC1], #32
- uhadd v0.8h, v0.8h, v4.8h
+ urhadd v0.8h, v0.8h, v4.8h
ld1 {v6.8h,v7.8h}, [SRC2], #32
- uhadd v1.8h, v1.8h, v5.8h
- uhadd v2.8h, v2.8h, v6.8h
- uhadd v3.8h, v3.8h, v7.8h
+ urhadd v1.8h, v1.8h, v5.8h
+ urhadd v2.8h, v2.8h, v6.8h
+ urhadd v3.8h, v3.8h, v7.8h
st1 {v0.8h,v1.8h}, [DEST], #32
st1 {v2.8h,v3.8h}, [DEST], #32
subs x5, x5, #64
@@ -90,14 +90,14 @@ function merge16_arm64
tbz SIZE, #5, 3f
ld1 {v0.8h,v1.8h}, [SRC1], #32
ld1 {v4.8h,v5.8h}, [SRC2], #32
- uhadd v0.8h, v0.8h, v4.8h
- uhadd v1.8h, v1.8h, v5.8h
+ urhadd v0.8h, v0.8h, v4.8h
+ urhadd v1.8h, v1.8h, v5.8h
st1 {v0.8h,v1.8h}, [DEST], #32
3:
tbz SIZE, #4, 4f
ld1 {v0.8h}, [SRC1]
ld1 {v4.8h}, [SRC2]
- uhadd v0.8h, v0.8h, v4.8h
+ urhadd v0.8h, v0.8h, v4.8h
st1 {v0.8h}, [DEST]
4:
ret
=====================================
modules/isa/aarch64/sve/merge.S
=====================================
@@ -43,6 +43,7 @@ function merge8_arm_sve
function merge16_arm_sve
bti c
+ lsr x3, x3, #1
mov x4, #0
b 2f
1: ld1h {z0.s}, p0/z, [x1, x4, lsl #1]
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/85d4a8074be8c0f26c43c55b977ef0c84db62ad6...85b9e8476423327d33f5aaee973874358957c34d
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/85d4a8074be8c0f26c43c55b977ef0c84db62ad6...85b9e8476423327d33f5aaee973874358957c34d
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list