Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
a7bd8797
Commit
a7bd8797
authored
22 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
shared lib support (req by kabi) ...
Originally committed as revision 510 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
96c7b535
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavcodec/i386/dsputil_mmx.c
+10
-3
10 additions, 3 deletions
libavcodec/i386/dsputil_mmx.c
libavcodec/i386/dsputil_mmx_avg.h
+4
-4
4 additions, 4 deletions
libavcodec/i386/dsputil_mmx_avg.h
with
14 additions
and
7 deletions
libavcodec/i386/dsputil_mmx.c
+
10
−
3
View file @
a7bd8797
...
...
@@ -50,9 +50,9 @@ void ff_mmx_idct(DCTELEM *block);
void
ff_mmxext_idct
(
DCTELEM
*
block
);
/* pixel operations */
static
const
u
nsigned
long
long
in
t
mm_bone
__attribute__
((
aligned
(
8
)))
=
0x0101010101010101LL
;
static
const
u
nsigned
long
long
in
t
mm_wone
__attribute__
((
aligned
(
8
)))
=
0x0001000100010001LL
;
static
const
u
nsigned
long
long
in
t
mm_wtwo
__attribute__
((
aligned
(
8
)))
=
0x0002000200020002LL
;
static
const
u
int64_
t
mm_bone
__attribute__
((
aligned
(
8
)))
=
0x0101010101010101
U
LL
;
static
const
u
int64_
t
mm_wone
__attribute__
((
aligned
(
8
)))
=
0x0001000100010001
U
LL
;
static
const
u
int64_
t
mm_wtwo
__attribute__
((
aligned
(
8
)))
=
0x0002000200020002
U
LL
;
//static const unsigned short mm_wone[4] __attribute__ ((aligned(8))) = { 0x1, 0x1, 0x1, 0x1 };
//static const unsigned short mm_wtwo[4] __attribute__ ((aligned(8))) = { 0x2, 0x2, 0x2, 0x2 };
...
...
@@ -62,6 +62,7 @@ static const unsigned long long int mm_wtwo __attribute__ ((aligned(8))) = 0x000
#ifndef PIC
#define MOVQ_WONE(regd) __asm __volatile ("movq %0, %%" #regd " \n\t" ::"m"(mm_wone))
#define MOVQ_WTWO(regd) __asm __volatile ("movq %0, %%" #regd " \n\t" ::"m"(mm_wtwo))
#define MOVQ_BONE(regd) "movq "MANGLE(mm_bone)", "#regd" \n\t"
#else
// for shared library it's better to use this way for accessing constants
// pcmpeqd -> -1
...
...
@@ -75,8 +76,14 @@ static const unsigned long long int mm_wtwo __attribute__ ((aligned(8))) = 0x000
"pcmpeqd %%" #regd ", %%" #regd " \n\t" \
"psrlw $15, %%" #regd " \n\t" \
"psllw $1, %%" #regd ::)
#define MOVQ_BONE(regd) \
"pcmpeqd " #regd ", " #regd " \n\t" \
"psrlw $15, " #regd " \n\t"\
"packuswb " #regd ", " #regd " \n\t"
#endif
/***********************************/
/* 3Dnow specific */
...
...
This diff is collapsed.
Click to expand it.
libavcodec/i386/dsputil_mmx_avg.h
+
4
−
4
View file @
a7bd8797
...
...
@@ -20,7 +20,7 @@
* MMX optimization by Nick Kurshev <nickols_k@mail.ru>
* mostly rewritten by Michael Niedermayer <michaelni@gmx.at>
*/
static
void
DEF
(
put_pixels_x2
)(
UINT8
*
block
,
const
UINT8
*
pixels
,
int
line_size
,
int
h
)
{
__asm
__volatile
(
...
...
@@ -57,7 +57,7 @@ static void DEF(put_no_rnd_pixels_x2)(UINT8 *block, const UINT8 *pixels, int lin
{
__asm
__volatile
(
"xorl %%eax, %%eax
\n\t
"
"movq "
MANGLE
(
mm_bone
)
", %%mm7
\n\t
"
MOVQ_BONE
(
%%
mm7
)
".balign 16
\n\t
"
"1:
\n\t
"
"movq (%1, %%eax), %%mm0
\n\t
"
...
...
@@ -122,7 +122,7 @@ static void DEF(put_pixels_y2)(UINT8 *block, const UINT8 *pixels, int line_size,
static
void
DEF
(
put_no_rnd_pixels_y2
)(
UINT8
*
block
,
const
UINT8
*
pixels
,
int
line_size
,
int
h
)
{
__asm
__volatile
(
"movq "
MANGLE
(
mm_bone
)
", %%mm7
\n\t
"
MOVQ_BONE
(
%%
mm7
)
"xorl %%eax, %%eax
\n\t
"
"movq (%1), %%mm0
\n\t
"
".balign 16
\n\t
"
...
...
@@ -264,7 +264,7 @@ static void DEF(avg_pixels_y2)(UINT8 *block, const UINT8 *pixels, int line_size,
static
void
DEF
(
avg_pixels_xy2
)(
UINT8
*
block
,
const
UINT8
*
pixels
,
int
line_size
,
int
h
)
{
__asm
__volatile
(
"movq "
MANGLE
(
mm_bone
)
", %%mm7
\n\t
"
MOVQ_BONE
(
%%
mm7
)
"xorl %%eax, %%eax
\n\t
"
"movq (%1), %%mm0
\n\t
"
"movq 1(%1), %%mm1
\n\t
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment