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
4f12a497
Commit
4f12a497
authored
May 20, 2002
by
Fabrice Bellard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed unused code
Originally committed as revision 543 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
fb4a4a56
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
233 deletions
+18
-233
dsputil_mmx.c
libavcodec/i386/dsputil_mmx.c
+18
-172
dsputil_mmx_avg.h
libavcodec/i386/dsputil_mmx_avg.h
+0
-61
No files found.
libavcodec/i386/dsputil_mmx.c
View file @
4f12a497
...
...
@@ -907,162 +907,6 @@ static void avg_no_rnd_pixels_xy2_mmx( UINT8 *block, const UINT8 *pixels, int
}
while
(
--
h
);
}
static
void
sub_pixels_mmx
(
DCTELEM
*
block
,
const
UINT8
*
pixels
,
int
line_size
,
int
h
)
{
DCTELEM
*
p
;
const
UINT8
*
pix
;
p
=
block
;
pix
=
pixels
;
MOVQ_ZERO
(
mm7
);
do
{
__asm
__volatile
(
"movq %0, %%mm0
\n\t
"
"movq %1, %%mm2
\n\t
"
"movq 8%0, %%mm1
\n\t
"
"movq %%mm2, %%mm3
\n\t
"
"punpcklbw %%mm7, %%mm2
\n\t
"
"punpckhbw %%mm7, %%mm3
\n\t
"
"psubsw %%mm2, %%mm0
\n\t
"
"psubsw %%mm3, %%mm1
\n\t
"
"movq %%mm0, %0
\n\t
"
"movq %%mm1, 8%0
\n\t
"
:
"+m"
(
*
p
)
:
"m"
(
*
pix
)
:
"memory"
);
pix
+=
line_size
;
p
+=
8
;
}
while
(
--
h
);
}
static
void
sub_pixels_x2_mmx
(
DCTELEM
*
block
,
const
UINT8
*
pixels
,
int
line_size
,
int
h
)
{
DCTELEM
*
p
;
const
UINT8
*
pix
;
p
=
block
;
pix
=
pixels
;
MOVQ_ZERO
(
mm7
);
MOVQ_WONE
(
mm6
);
JUMPALIGN
();
do
{
__asm
__volatile
(
"movq %0, %%mm0
\n\t
"
"movq %1, %%mm2
\n\t
"
"movq 8%0, %%mm1
\n\t
"
"movq 1%1, %%mm4
\n\t
"
"movq %%mm2, %%mm3
\n\t
"
"movq %%mm4, %%mm5
\n\t
"
"punpcklbw %%mm7, %%mm2
\n\t
"
"punpckhbw %%mm7, %%mm3
\n\t
"
"punpcklbw %%mm7, %%mm4
\n\t
"
"punpckhbw %%mm7, %%mm5
\n\t
"
"paddusw %%mm4, %%mm2
\n\t
"
"paddusw %%mm5, %%mm3
\n\t
"
"paddusw %%mm6, %%mm2
\n\t
"
"paddusw %%mm6, %%mm3
\n\t
"
"psrlw $1, %%mm2
\n\t
"
"psrlw $1, %%mm3
\n\t
"
"psubsw %%mm2, %%mm0
\n\t
"
"psubsw %%mm3, %%mm1
\n\t
"
"movq %%mm0, %0
\n\t
"
"movq %%mm1, 8%0
\n\t
"
:
"+m"
(
*
p
)
:
"m"
(
*
pix
)
:
"memory"
);
pix
+=
line_size
;
p
+=
8
;
}
while
(
--
h
);
}
static
void
sub_pixels_y2_mmx
(
DCTELEM
*
block
,
const
UINT8
*
pixels
,
int
line_size
,
int
h
)
{
DCTELEM
*
p
;
const
UINT8
*
pix
;
p
=
block
;
pix
=
pixels
;
MOVQ_ZERO
(
mm7
);
MOVQ_WONE
(
mm6
);
do
{
__asm
__volatile
(
"movq %0, %%mm0
\n\t
"
"movq %1, %%mm2
\n\t
"
"movq 8%0, %%mm1
\n\t
"
"movq %2, %%mm4
\n\t
"
"movq %%mm2, %%mm3
\n\t
"
"movq %%mm4, %%mm5
\n\t
"
"punpcklbw %%mm7, %%mm2
\n\t
"
"punpckhbw %%mm7, %%mm3
\n\t
"
"punpcklbw %%mm7, %%mm4
\n\t
"
"punpckhbw %%mm7, %%mm5
\n\t
"
"paddusw %%mm4, %%mm2
\n\t
"
"paddusw %%mm5, %%mm3
\n\t
"
"paddusw %%mm6, %%mm2
\n\t
"
"paddusw %%mm6, %%mm3
\n\t
"
"psrlw $1, %%mm2
\n\t
"
"psrlw $1, %%mm3
\n\t
"
"psubsw %%mm2, %%mm0
\n\t
"
"psubsw %%mm3, %%mm1
\n\t
"
"movq %%mm0, %0
\n\t
"
"movq %%mm1, 8%0
\n\t
"
:
"+m"
(
*
p
)
:
"m"
(
*
pix
),
"m"
(
*
(
pix
+
line_size
))
:
"memory"
);
pix
+=
line_size
;
p
+=
8
;
}
while
(
--
h
);
}
static
void
sub_pixels_xy2_mmx
(
DCTELEM
*
block
,
const
UINT8
*
pixels
,
int
line_size
,
int
h
)
{
DCTELEM
*
p
;
const
UINT8
*
pix
;
p
=
block
;
pix
=
pixels
;
MOVQ_ZERO
(
mm7
);
MOVQ_WTWO
(
mm6
);
JUMPALIGN
();
do
{
__asm
__volatile
(
"movq %1, %%mm0
\n\t
"
"movq %2, %%mm1
\n\t
"
"movq 1%1, %%mm4
\n\t
"
"movq 1%2, %%mm5
\n\t
"
"movq %%mm0, %%mm2
\n\t
"
"movq %%mm1, %%mm3
\n\t
"
"punpcklbw %%mm7, %%mm0
\n\t
"
"punpcklbw %%mm7, %%mm1
\n\t
"
"punpckhbw %%mm7, %%mm2
\n\t
"
"punpckhbw %%mm7, %%mm3
\n\t
"
"paddusw %%mm1, %%mm0
\n\t
"
"paddusw %%mm3, %%mm2
\n\t
"
"movq %%mm4, %%mm1
\n\t
"
"movq %%mm5, %%mm3
\n\t
"
"punpcklbw %%mm7, %%mm4
\n\t
"
"punpcklbw %%mm7, %%mm5
\n\t
"
"punpckhbw %%mm7, %%mm1
\n\t
"
"punpckhbw %%mm7, %%mm3
\n\t
"
"paddusw %%mm5, %%mm4
\n\t
"
"paddusw %%mm3, %%mm1
\n\t
"
"paddusw %%mm6, %%mm4
\n\t
"
"paddusw %%mm6, %%mm1
\n\t
"
"paddusw %%mm4, %%mm0
\n\t
"
"paddusw %%mm1, %%mm2
\n\t
"
"movq %0, %%mm1
\n\t
"
"movq 8%0, %%mm3
\n\t
"
"psrlw $2, %%mm0
\n\t
"
"psrlw $2, %%mm2
\n\t
"
"psubsw %%mm0, %%mm1
\n\t
"
"psubsw %%mm2, %%mm3
\n\t
"
"movq %%mm1, %0
\n\t
"
"movq %%mm3, 8%0
\n\t
"
:
"+m"
(
*
p
)
:
"m"
(
*
pix
),
"m"
(
*
(
pix
+
line_size
))
:
"memory"
);
pix
+=
line_size
;
p
+=
8
;
}
while
(
--
h
);
}
static
void
clear_blocks_mmx
(
DCTELEM
*
blocks
)
{
asm
volatile
(
...
...
@@ -1139,11 +983,6 @@ void dsputil_init_mmx(void)
avg_no_rnd_pixels_tab
[
2
]
=
avg_no_rnd_pixels_y2_mmx
;
avg_no_rnd_pixels_tab
[
3
]
=
avg_no_rnd_pixels_xy2_mmx
;
sub_pixels_tab
[
0
]
=
sub_pixels_mmx
;
sub_pixels_tab
[
1
]
=
sub_pixels_x2_mmx
;
sub_pixels_tab
[
2
]
=
sub_pixels_y2_mmx
;
sub_pixels_tab
[
3
]
=
sub_pixels_xy2_mmx
;
if
(
mm_flags
&
MM_MMXEXT
)
{
pix_abs16x16
=
pix_abs16x16_mmx2
;
pix_abs16x16_x2
=
pix_abs16x16_x2_mmx2
;
...
...
@@ -1164,9 +1003,6 @@ void dsputil_init_mmx(void)
avg_pixels_tab
[
1
]
=
avg_pixels_x2_mmx2
;
avg_pixels_tab
[
2
]
=
avg_pixels_y2_mmx2
;
avg_pixels_tab
[
3
]
=
avg_pixels_xy2_mmx2
;
sub_pixels_tab
[
1
]
=
sub_pixels_x2_mmx2
;
sub_pixels_tab
[
2
]
=
sub_pixels_y2_mmx2
;
}
else
if
(
mm_flags
&
MM_3DNOW
)
{
put_pixels_tab
[
1
]
=
put_pixels_x2_3dnow
;
put_pixels_tab
[
2
]
=
put_pixels_y2_3dnow
;
...
...
@@ -1177,9 +1013,6 @@ void dsputil_init_mmx(void)
avg_pixels_tab
[
1
]
=
avg_pixels_x2_3dnow
;
avg_pixels_tab
[
2
]
=
avg_pixels_y2_3dnow
;
avg_pixels_tab
[
3
]
=
avg_pixels_xy2_3dnow
;
sub_pixels_tab
[
1
]
=
sub_pixels_x2_3dnow
;
sub_pixels_tab
[
2
]
=
sub_pixels_y2_3dnow
;
}
/* idct */
...
...
@@ -1225,12 +1058,25 @@ void dsputil_init_mmx(void)
avg_no_rnd_pixels_tab[2] = just_return;
avg_no_rnd_pixels_tab[3] = just_return;
sub_pixels_tab[0] = just_return;
sub_pixels_tab[1] = just_return;
sub_pixels_tab[2] = just_return;
sub_pixels_tab[3] = just_return;
//av_fdct = just_return;
//ff_idct = just_return;
#endif
}
/* remove any non bit exact operation (testing purpose). NOTE that
this function should be kept as small as possible because it is
always difficult to test automatically non bit exact cases. */
void
dsputil_set_bit_exact_mmx
(
void
)
{
if
(
mm_flags
&
MM_MMX
)
{
if
(
mm_flags
&
MM_MMXEXT
)
{
put_no_rnd_pixels_tab
[
1
]
=
put_no_rnd_pixels_x2_mmx
;
put_no_rnd_pixels_tab
[
2
]
=
put_no_rnd_pixels_y2_mmx
;
avg_pixels_tab
[
3
]
=
avg_pixels_xy2_mmx
;
}
else
if
(
mm_flags
&
MM_3DNOW
)
{
put_no_rnd_pixels_tab
[
1
]
=
put_no_rnd_pixels_x2_mmx
;
put_no_rnd_pixels_tab
[
2
]
=
put_no_rnd_pixels_y2_mmx
;
avg_pixels_tab
[
3
]
=
avg_pixels_xy2_mmx
;
}
}
}
libavcodec/i386/dsputil_mmx_avg.h
View file @
4f12a497
...
...
@@ -313,64 +313,3 @@ static void DEF(avg_pixels_xy2)(UINT8 *block, const UINT8 *pixels, int line_size
"D"
(
block
+
line_size
),
"g"
(
line_size
<<
1
)
:
"%eax"
,
"memory"
);
}
//Note: the sub* functions are no used
static
void
DEF
(
sub_pixels_x2
)(
DCTELEM
*
block
,
const
UINT8
*
pixels
,
int
line_size
,
int
h
)
{
DCTELEM
*
p
;
const
UINT8
*
pix
;
p
=
block
;
pix
=
pixels
;
__asm
__volatile
(
"pxor %%mm7, %%mm7"
:
);
do
{
__asm
__volatile
(
"movq 1%1, %%mm2
\n\t
"
"movq %0, %%mm0
\n\t
"
PAVGB
" %1, %%mm2
\n\t
"
"movq 8%0, %%mm1
\n\t
"
"movq %%mm2, %%mm3
\n\t
"
"punpcklbw %%mm7, %%mm2
\n\t
"
"punpckhbw %%mm7, %%mm3
\n\t
"
"psubsw %%mm2, %%mm0
\n\t
"
"psubsw %%mm3, %%mm1
\n\t
"
"movq %%mm0, %0
\n\t
"
"movq %%mm1, 8%0
\n\t
"
:
"+m"
(
*
p
)
:
"m"
(
*
pix
)
:
"memory"
);
pix
+=
line_size
;
p
+=
8
;
}
while
(
--
h
);
}
static
void
DEF
(
sub_pixels_y2
)(
DCTELEM
*
block
,
const
UINT8
*
pixels
,
int
line_size
,
int
h
)
{
DCTELEM
*
p
;
const
UINT8
*
pix
;
p
=
block
;
pix
=
pixels
;
__asm
__volatile
(
"pxor %%mm7, %%mm7"
:
);
do
{
__asm
__volatile
(
"movq %2, %%mm2
\n\t
"
"movq %0, %%mm0
\n\t
"
PAVGB
" %1, %%mm2
\n\t
"
"movq 8%0, %%mm1
\n\t
"
"movq %%mm2, %%mm3
\n\t
"
"punpcklbw %%mm7, %%mm2
\n\t
"
"punpckhbw %%mm7, %%mm3
\n\t
"
"psubsw %%mm2, %%mm0
\n\t
"
"psubsw %%mm3, %%mm1
\n\t
"
"movq %%mm0, %0
\n\t
"
"movq %%mm1, 8%0
\n\t
"
:
"+m"
(
*
p
)
:
"m"
(
*
pix
),
"m"
(
*
(
pix
+
line_size
))
:
"memory"
);
pix
+=
line_size
;
p
+=
8
;
}
while
(
--
h
);
}
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