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
ba8d0be9
Commit
ba8d0be9
authored
Apr 21, 2002
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rounding bugfix
Originally committed as revision 409 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
8b4c7dbc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
motion_est_mmx.c
libavcodec/i386/motion_est_mmx.c
+6
-0
No files found.
libavcodec/i386/motion_est_mmx.c
View file @
ba8d0be9
...
...
@@ -19,6 +19,7 @@
* mostly by Michael Niedermayer <michaelni@gmx.at>
*/
#include "../dsputil.h"
#include "../mangle.h"
static
const
__attribute__
((
aligned
(
8
)))
UINT64
round_tab
[
3
]
=
{
0x0000000000000000
,
...
...
@@ -26,6 +27,8 @@ static const __attribute__ ((aligned(8))) UINT64 round_tab[3]={
0x0002000200020002
,
};
static
__attribute__
((
aligned
(
8
)))
uint64_t
bone
=
0x0101010101010101LL
;
static
inline
void
sad8_mmx
(
UINT8
*
blk1
,
UINT8
*
blk2
,
int
stride
,
int
h
)
{
int
len
=
-
(
stride
<<
h
);
...
...
@@ -115,6 +118,7 @@ static inline void sad8_4_mmx2(UINT8 *blk1, UINT8 *blk2, int stride, int h)
int
len
=
-
(
stride
<<
h
);
asm
volatile
(
".balign 16
\n\t
"
"movq "
MANGLE
(
bone
)
", %%mm5
\n\t
"
"1:
\n\t
"
"movq (%1, %%eax), %%mm0
\n\t
"
"movq (%2, %%eax), %%mm2
\n\t
"
...
...
@@ -122,6 +126,7 @@ static inline void sad8_4_mmx2(UINT8 *blk1, UINT8 *blk2, int stride, int h)
"movq 1(%2, %%eax), %%mm3
\n\t
"
"pavgb %%mm2, %%mm0
\n\t
"
"pavgb %%mm1, %%mm3
\n\t
"
"psubusb %%mm5, %%mm3
\n\t
"
"pavgb %%mm3, %%mm0
\n\t
"
"movq (%3, %%eax), %%mm2
\n\t
"
"psadbw %%mm2, %%mm0
\n\t
"
...
...
@@ -132,6 +137,7 @@ static inline void sad8_4_mmx2(UINT8 *blk1, UINT8 *blk2, int stride, int h)
"movq 1(%2, %%eax), %%mm4
\n\t
"
"pavgb %%mm3, %%mm1
\n\t
"
"pavgb %%mm4, %%mm2
\n\t
"
"psubusb %%mm5, %%mm2
\n\t
"
"pavgb %%mm1, %%mm2
\n\t
"
"movq (%3, %%eax), %%mm1
\n\t
"
"psadbw %%mm1, %%mm2
\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