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
b313e815
Commit
b313e815
authored
17 years ago
by
Loren Merritt
Browse files
Options
Downloads
Patches
Plain Diff
avg_pixels4_mmx2
Originally committed as revision 11829 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
6c01d006
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavcodec/i386/dsputil_mmx.c
+0
-2
0 additions, 2 deletions
libavcodec/i386/dsputil_mmx.c
libavcodec/i386/dsputil_mmx_avg.h
+25
-0
25 additions, 0 deletions
libavcodec/i386/dsputil_mmx_avg.h
with
25 additions
and
2 deletions
libavcodec/i386/dsputil_mmx.c
+
0
−
2
View file @
b313e815
...
...
@@ -206,13 +206,11 @@ DECLARE_ALIGNED_16(const double, ff_pd_2[2]) = { 2.0, 2.0 };
#define put_pixels16_mmx2 put_pixels16_mmx
#define put_pixels8_mmx2 put_pixels8_mmx
#define put_pixels4_mmx2 put_pixels4_mmx
#define avg_pixels4_mmx2 avg_pixels4_mmx
#define put_no_rnd_pixels16_mmx2 put_no_rnd_pixels16_mmx
#define put_no_rnd_pixels8_mmx2 put_no_rnd_pixels8_mmx
#define put_pixels16_3dnow put_pixels16_mmx
#define put_pixels8_3dnow put_pixels8_mmx
#define put_pixels4_3dnow put_pixels4_mmx
#define avg_pixels4_3dnow avg_pixels4_mmx
#define put_no_rnd_pixels16_3dnow put_no_rnd_pixels16_mmx
#define put_no_rnd_pixels8_3dnow put_no_rnd_pixels8_mmx
...
...
This diff is collapsed.
Click to expand it.
libavcodec/i386/dsputil_mmx_avg.h
+
25
−
0
View file @
b313e815
...
...
@@ -795,6 +795,31 @@ static void DEF(avg_pixels8_xy2)(uint8_t *block, const uint8_t *pixels, int line
:
"%"
REG_a
,
"memory"
);
}
static
void
DEF
(
avg_pixels4
)(
uint8_t
*
block
,
const
uint8_t
*
pixels
,
int
line_size
,
int
h
)
{
do
{
asm
volatile
(
"movd (%1), %%mm0
\n\t
"
"movd (%1, %2), %%mm1
\n\t
"
"movd (%1, %2, 2), %%mm2
\n\t
"
"movd (%1, %3), %%mm3
\n\t
"
PAVGB
" (%0), %%mm0
\n\t
"
PAVGB
" (%0, %2), %%mm1
\n\t
"
PAVGB
" (%0, %2, 2), %%mm2
\n\t
"
PAVGB
" (%0, %3), %%mm3
\n\t
"
"movd %%mm0, (%1)
\n\t
"
"movd %%mm1, (%1, %2)
\n\t
"
"movd %%mm2, (%1, %2, 2)
\n\t
"
"movd %%mm3, (%1, %3)
\n\t
"
::
"S"
(
pixels
),
"D"
(
block
),
"r"
((
long
)
line_size
),
"r"
(
3L
*
line_size
)
:
"memory"
);
block
+=
4
*
line_size
;
pixels
+=
4
*
line_size
;
h
-=
4
;
}
while
(
h
>
0
);
}
//FIXME the following could be optimized too ...
static
void
DEF
(
put_no_rnd_pixels16_x2
)(
uint8_t
*
block
,
const
uint8_t
*
pixels
,
int
line_size
,
int
h
){
DEF
(
put_no_rnd_pixels8_x2
)(
block
,
pixels
,
line_size
,
h
);
...
...
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