Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
f3bbe4bb
Commit
f3bbe4bb
authored
Dec 28, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcm/Volume: remove optimized i386 assembly
This code is unable to dither. Until we implement that, let's remove the code for now. i386 isn't relevant anymore anyway.
parent
2a3a18a2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
50 deletions
+0
-50
Volume.cxx
src/pcm/Volume.cxx
+0
-50
No files found.
src/pcm/Volume.cxx
View file @
f3bbe4bb
...
...
@@ -42,56 +42,6 @@ pcm_volume_sample(typename Traits::value_type _sample,
return
PcmClamp
<
F
,
Traits
>
(
sample
);
}
#ifdef __i386__
/**
* Optimized volume function for i386. Use the EDX:EAX 2*32 bit
* multiplication result instead of emulating 64 bit multiplication.
*/
static
inline
int32_t
pcm_volume_sample_24
(
int32_t
sample
,
int32_t
volume
,
gcc_unused
int32_t
dither
)
{
int32_t
result
;
asm
(
/* edx:eax = sample * volume */
"imul %2
\n
"
/* "add %3, %1\n" dithering disabled for now, because we
have no overflow check - is dithering really important
here? */
/* eax = edx:eax / PCM_VOLUME_1 */
"sal $22, %%edx
\n
"
"shr $10, %1
\n
"
"or %%edx, %1
\n
"
:
"=a"
(
result
)
:
"0"
(
sample
),
"r"
(
volume
)
/* , "r"(dither) */
:
"edx"
);
return
result
;
}
template
<>
inline
int32_t
pcm_volume_sample
<
SampleFormat
::
S24_P32
,
SampleTraits
<
SampleFormat
::
S24_P32
>>
(
int32_t
sample
,
int
volume
)
{
return
pcm_volume_sample_24
(
sample
,
volume
,
pcm_volume_dither
());
}
template
<>
inline
int32_t
pcm_volume_sample
<
SampleFormat
::
S32
,
SampleTraits
<
SampleFormat
::
S32
>>
(
int32_t
sample
,
int
volume
)
{
return
pcm_volume_sample_24
(
sample
,
volume
,
pcm_volume_dither
());
}
#endif
template
<
SampleFormat
F
,
class
Traits
=
SampleTraits
<
F
>>
static
void
pcm_volume_change
(
typename
Traits
::
pointer_type
dest
,
...
...
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