summaryrefslogtreecommitdiffstats
path: root/libswscale/aarch64
diff options
context:
space:
mode:
authorClément Bœsch <clement@stupeflix.com>2016-03-25 15:49:09 +0100
committerClément Bœsch <clement@stupeflix.com>2016-03-25 16:14:13 +0100
commit277408b7f16eeea60f1f7850638373307f967616 (patch)
treefd99716442e177da568943c715d1fb0048854052 /libswscale/aarch64
parent99388eb091d0435a7f4fdb12aaa37f17f2ff951a (diff)
downloadffmpeg-streaming-277408b7f16eeea60f1f7850638373307f967616.zip
ffmpeg-streaming-277408b7f16eeea60f1f7850638373307f967616.tar.gz
sws/aarch64/yuv2rgb: save a few mul and add
27ms to 26ms with UHD 2160 input.
Diffstat (limited to 'libswscale/aarch64')
-rw-r--r--libswscale/aarch64/yuv2rgb_neon.S25
1 files changed, 11 insertions, 14 deletions
diff --git a/libswscale/aarch64/yuv2rgb_neon.S b/libswscale/aarch64/yuv2rgb_neon.S
index cae5384..8cefe22 100644
--- a/libswscale/aarch64/yuv2rgb_neon.S
+++ b/libswscale/aarch64/yuv2rgb_neon.S
@@ -143,20 +143,17 @@ function ff_\ifmt\()_to_\ofmt\()_neon, export=1
load_chroma_\ifmt
sub v18.8H, v18.8H, v5.8H // U*(1<<3) - 128*(1<<3)
sub v19.8H, v19.8H, v5.8H // V*(1<<3) - 128*(1<<3)
- zip1 v6.8H, v19.8H, v19.8H // V1
- zip2 v7.8H, v19.8H, v19.8H // V2
- zip1 v4.8H, v18.8H, v18.8H // U1
- zip2 v5.8H, v18.8H, v18.8H // U2
- sqdmulh v20.8H, v6.8H, v1.H[0] // V1 * v2r (R1)
- sqdmulh v21.8H, v7.8H, v1.H[0] // V2 * v2r (R2)
- sqdmulh v22.8H, v4.8H, v1.H[1] // U1 * u2g
- sqdmulh v23.8H, v5.8H, v1.H[1] // U2 * u2g
- sqdmulh v6.8H, v6.8H, v1.H[2] // V1 * v2g
- sqdmulh v7.8H, v7.8H, v1.H[2] // V2 * v2g
- add v22.8H, v22.8H, v6.8H // U1 * u2g + V1 * v2g (G1)
- add v23.8H, v23.8H, v7.8H // U2 * u2g + V2 * v2g (G2)
- sqdmulh v24.8H, v4.8H, v1.H[3] // U1 * u2b (B1)
- sqdmulh v25.8H, v5.8H, v1.H[3] // U2 * u2b (B2)
+ sqdmulh v20.8H, v19.8H, v1.H[0] // V * v2r (R)
+ sqdmulh v22.8H, v18.8H, v1.H[1] // U * u2g
+ sqdmulh v19.8H, v19.8H, v1.H[2] // V * v2g
+ add v22.8H, v22.8H, v19.8H // U * u2g + V * v2g (G)
+ sqdmulh v24.8H, v18.8H, v1.H[3] // U * u2b (B)
+ zip2 v21.8H, v20.8H, v20.8H // R2
+ zip1 v20.8H, v20.8H, v20.8H // R1
+ zip2 v23.8H, v22.8H, v22.8H // G2
+ zip1 v22.8H, v22.8H, v22.8H // G1
+ zip2 v25.8H, v24.8H, v24.8H // B2
+ zip1 v24.8H, v24.8H, v24.8H // B1
ld1 {v2.16B}, [x4], #16 // load luma
ushll v26.8H, v2.8B, #3 // Y1*(1<<3)
ushll2 v27.8H, v2.16B, #3 // Y2*(1<<3)
OpenPOWER on IntegriCloud