diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-06-23 20:34:25 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-23 20:35:33 +0200 |
commit | 32cf26cc6a0dc1425ed60b8ac99552fd858fab9b (patch) | |
tree | f989a4b7a14b2429f32a6ee0d639a044ecd8e122 /libavcodec/aarch64/h264cmc_neon.S | |
parent | 957457a044f6b03453cbc4f817a051cbe1e388eb (diff) | |
parent | f23d26a6864128001b03876b0b92fffe131f2060 (diff) | |
download | ffmpeg-32cf26cc6a0dc1425ed60b8ac99552fd858fab9b.tar.gz |
Merge commit 'f23d26a6864128001b03876b0b92fffe131f2060'
* commit 'f23d26a6864128001b03876b0b92fffe131f2060':
h264: avoid using uninitialized memory in NEON chroma mc
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/aarch64/h264cmc_neon.S')
-rw-r--r-- | libavcodec/aarch64/h264cmc_neon.S | 59 |
1 files changed, 55 insertions, 4 deletions
diff --git a/libavcodec/aarch64/h264cmc_neon.S b/libavcodec/aarch64/h264cmc_neon.S index a6ed877f2d..486079f87c 100644 --- a/libavcodec/aarch64/h264cmc_neon.S +++ b/libavcodec/aarch64/h264cmc_neon.S @@ -95,9 +95,10 @@ function ff_\type\()_\codec\()_chroma_mc8_neon, export=1 b.gt 1b ret -2: tst w6, w6 - add w12, w12, w6 +2: adds w12, w12, w6 dup v0.8B, w4 + b.eq 5f + tst w6, w6 dup v1.8B, w12 b.eq 4f @@ -161,6 +162,33 @@ function ff_\type\()_\codec\()_chroma_mc8_neon, export=1 st1 {v17.8B}, [x0], x2 b.gt 4b ret + +5: ld1 {v4.8B}, [x1], x2 + ld1 {v5.8B}, [x1], x2 + prfm pldl1strm, [x1] + subs w3, w3, #2 + umull v16.8H, v4.8B, v0.8B + umull v17.8H, v5.8B, v0.8B + prfm pldl1strm, [x1, x2] + .ifc \codec,h264 + rshrn v16.8B, v16.8H, #6 + rshrn v17.8B, v17.8H, #6 + .else + add v16.8H, v16.8H, v22.8H + add v17.8H, v17.8H, v22.8H + shrn v16.8B, v16.8H, #6 + shrn v17.8B, v17.8H, #6 + .endif + .ifc \type,avg + ld1 {v20.8B}, [x8], x2 + ld1 {v21.8B}, [x8], x2 + urhadd v16.8B, v16.8B, v20.8B + urhadd v17.8B, v17.8B, v21.8B + .endif + st1 {v16.8B}, [x0], x2 + st1 {v17.8B}, [x0], x2 + b.gt 5b + ret endfunc .endm @@ -238,9 +266,10 @@ function ff_\type\()_\codec\()_chroma_mc4_neon, export=1 b.gt 1b ret -2: tst w6, w6 - add w12, w12, w6 +2: adds w12, w12, w6 dup v30.8B, w4 + b.eq 5f + tst w6, w6 dup v31.8B, w12 trn1 v0.2S, v30.2S, v31.2S trn2 v1.2S, v30.2S, v31.2S @@ -303,6 +332,28 @@ function ff_\type\()_\codec\()_chroma_mc4_neon, export=1 st1 {v16.S}[1], [x0], x2 b.gt 4b ret + +5: ld1 {v4.S}[0], [x1], x2 + ld1 {v4.S}[1], [x1], x2 + umull v18.8H, v4.8B, v30.8B + subs w3, w3, #2 + prfm pldl1strm, [x1] + .ifc \codec,h264 + rshrn v16.8B, v18.8H, #6 + .else + add v18.8H, v18.8H, v22.8H + shrn v16.8B, v18.8H, #6 + .endif + .ifc \type,avg + ld1 {v20.S}[0], [x8], x2 + ld1 {v20.S}[1], [x8], x2 + urhadd v16.8B, v16.8B, v20.8B + .endif + prfm pldl1strm, [x1] + st1 {v16.S}[0], [x0], x2 + st1 {v16.S}[1], [x0], x2 + b.gt 5b + ret endfunc .endm |