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
75ca1a5f
Commit
75ca1a5f
authored
Apr 05, 2006
by
Loren Merritt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gmc_mmx tweaks
Originally committed as revision 5269 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
87b041e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
dsputil_mmx.c
libavcodec/i386/dsputil_mmx.c
+11
-13
No files found.
libavcodec/i386/dsputil_mmx.c
View file @
75ca1a5f
...
...
@@ -2406,7 +2406,6 @@ static void just_return() { return; }
static
void
gmc_mmx
(
uint8_t
*
dst
,
uint8_t
*
src
,
int
stride
,
int
h
,
int
ox
,
int
oy
,
int
dxx
,
int
dxy
,
int
dyx
,
int
dyy
,
int
shift
,
int
r
,
int
width
,
int
height
){
const
int
w
=
8
;
const
int
s
=
1
<<
shift
;
const
int
ix
=
ox
>>
(
16
+
shift
);
const
int
iy
=
oy
>>
(
16
+
shift
);
const
int
oxs
=
ox
>>
4
;
...
...
@@ -2437,14 +2436,21 @@ static void gmc_mmx(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int o
return
;
}
src
+=
ix
+
iy
*
stride
;
if
(
(
unsigned
)
ix
>=
width
-
w
||
(
unsigned
)
iy
>=
height
-
h
)
{
ff_emulated_edge_mc
(
edge_buf
,
src
+
ix
+
iy
*
stride
,
stride
,
w
+
1
,
h
+
1
,
ix
,
iy
,
width
,
height
);
ff_emulated_edge_mc
(
edge_buf
,
src
,
stride
,
w
+
1
,
h
+
1
,
ix
,
iy
,
width
,
height
);
src
=
edge_buf
;
}
else
src
+=
ix
+
iy
*
stride
;
asm
volatile
(
"movd %0, %%mm6
\n\t
"
"pxor %%mm7, %%mm7
\n\t
"
"punpcklwd %%mm6, %%mm6
\n\t
"
"punpcklwd %%mm6, %%mm6
\n\t
"
::
"r"
(
1
<<
shift
)
);
for
(
x
=
0
;
x
<
w
;
x
+=
4
){
uint16_t
dx4
[
4
]
=
{
oxs
-
dxys
+
dxxs
*
(
x
+
0
),
...
...
@@ -2456,14 +2462,6 @@ static void gmc_mmx(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int o
oys
-
dyys
+
dyxs
*
(
x
+
2
),
oys
-
dyys
+
dyxs
*
(
x
+
3
)
};
asm
volatile
(
"movd %0, %%mm6
\n\t
"
"pxor %%mm7, %%mm7
\n\t
"
"punpcklwd %%mm6, %%mm6
\n\t
"
"punpcklwd %%mm6, %%mm6
\n\t
"
::
"g"
(
s
)
);
for
(
y
=
0
;
y
<
h
;
y
++
){
asm
volatile
(
"movq %0, %%mm4
\n\t
"
...
...
@@ -2503,10 +2501,10 @@ static void gmc_mmx(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int o
"punpcklbw %%mm7, %%mm4
\n\t
"
"pmullw %%mm5, %%mm1
\n\t
"
// src[1,0] * dx*(s-dy)
"pmullw %%mm4, %%mm0
\n\t
"
// src[0,0] * (s-dx)*(s-dy)
"paddw %5, %%mm1
\n\t
"
"paddw %%mm3, %%mm2
\n\t
"
"paddw %%mm1, %%mm0
\n\t
"
"paddw %%mm2, %%mm0
\n\t
"
"paddw %5, %%mm0
\n\t
"
"psrlw %6, %%mm0
\n\t
"
"packuswb %%mm0, %%mm0
\n\t
"
...
...
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