Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
a4a4179e
Commit
a4a4179e
authored
Dec 19, 2017
by
Martin Vignali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/x86/vf_hflip : merge hflip byte and hflip short to one macro
parent
8fb1d63d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
44 deletions
+17
-44
vf_hflip.asm
libavfilter/x86/vf_hflip.asm
+17
-44
No files found.
libavfilter/x86/vf_hflip.asm
View file @
a4a4179e
...
...
@@ -29,11 +29,16 @@ pb_flip_short: db 14,15,12,13,10,11,8,9,6,7,4,5,2,3,0,1
SECTION
.
text
INIT_XMM
ssse3
cglobal
hflip_byte
,
3
,
5
,
3
,
src
,
dst
,
w
,
r
,
x
mova
m0
,
[
pb_flip_byte
]
;%1 byte or short, %2 b or w, %3 size in byte (1 for byte, 2 for short)
%macro
HFLIP
3
cglobal
hflip_
%1
,
3
,
5
,
3
,
src
,
dst
,
w
,
r
,
x
mova
m0
,
[
pb_flip_
%1
]
xor
xq
,
xq
%if
%3
==
1
movsxdifnidn
wq
,
wd
%else
; short
add
wd
,
wd
%endif
mov
rq
,
wq
and
rq
,
2
*
mmsize
-
1
cmp
wq
,
2
*
mmsize
...
...
@@ -42,8 +47,8 @@ cglobal hflip_byte, 3, 5, 3, src, dst, w, r, x
.
loop0
:
neg
xq
movu
m1
,
[
srcq
+
xq
-
mmsize
+
1
]
movu
m2
,
[
srcq
+
xq
-
2
*
mmsize
+
1
]
movu
m1
,
[
srcq
+
xq
-
mmsize
+
%3
]
movu
m2
,
[
srcq
+
xq
-
2
*
mmsize
+
%3
]
pshufb
m1
,
m0
pshufb
m2
,
m0
neg
xq
...
...
@@ -59,49 +64,17 @@ cglobal hflip_byte, 3, 5, 3, src, dst, w, r, x
.
loop1
:
neg
xq
mov
r
b
,
[
srcq
+
xq
]
mov
r
%2
,
[
srcq
+
xq
]
neg
xq
mov
[
dstq
+
xq
]
,
r
b
add
xq
,
1
mov
[
dstq
+
xq
]
,
r
%2
add
xq
,
%3
cmp
xq
,
wq
jl
.
loop1
.
end
:
RET
%endmacro
cglobal
hflip_short
,
3
,
5
,
3
,
src
,
dst
,
w
,
r
,
x
mova
m0
,
[
pb_flip_short
]
xor
xq
,
xq
add
wd
,
wd
mov
rq
,
wq
and
rq
,
2
*
mmsize
-
1
cmp
wq
,
2
*
mmsize
jl
.
loop1
sub
wq
,
rq
.
loop0
:
neg
xq
movu
m1
,
[
srcq
+
xq
-
mmsize
+
2
]
movu
m2
,
[
srcq
+
xq
-
2
*
mmsize
+
2
]
pshufb
m1
,
m0
pshufb
m2
,
m0
neg
xq
movu
[
dstq
+
xq
]
,
m1
movu
[
dstq
+
xq
+
mmsize
]
,
m2
add
xq
,
mmsize
*
2
cmp
xq
,
wq
jl
.
loop0
cmp
rq
,
0
je
.
end
add
wq
,
rq
INIT_XMM
ssse3
HFLIP
byte
,
b
,
1
HFLIP
short
,
w
,
2
.
loop1
:
neg
xq
mov
rw
,
[
srcq
+
xq
]
neg
xq
mov
[
dstq
+
xq
]
,
rw
add
xq
,
2
cmp
xq
,
wq
jl
.
loop1
.
end
:
RET
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment