Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
8400d104
Commit
8400d104
authored
Jul 19, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed undenormalise for 64 bits.
parent
4b00ff6e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
9 deletions
+14
-9
modules/audio_filter/spatializer/allpass.hpp
modules/audio_filter/spatializer/allpass.hpp
+1
-2
modules/audio_filter/spatializer/comb.hpp
modules/audio_filter/spatializer/comb.hpp
+3
-5
modules/audio_filter/spatializer/denormals.h
modules/audio_filter/spatializer/denormals.h
+10
-2
No files found.
modules/audio_filter/spatializer/allpass.hpp
View file @
8400d104
...
@@ -32,8 +32,7 @@ inline float allpass::process(float input)
...
@@ -32,8 +32,7 @@ inline float allpass::process(float input)
float
output
;
float
output
;
float
bufout
;
float
bufout
;
bufout
=
buffer
[
bufidx
];
bufout
=
undenormalise
(
buffer
[
bufidx
]
);
undenormalise
(
bufout
);
output
=
-
input
+
bufout
;
output
=
-
input
+
bufout
;
buffer
[
bufidx
]
=
input
+
(
bufout
*
feedback
);
buffer
[
bufidx
]
=
input
+
(
bufout
*
feedback
);
...
...
modules/audio_filter/spatializer/comb.hpp
View file @
8400d104
...
@@ -37,13 +37,11 @@ inline float comb::process(float input)
...
@@ -37,13 +37,11 @@ inline float comb::process(float input)
{
{
float
output
;
float
output
;
output
=
buffer
[
bufidx
];
output
=
undenormalise
(
buffer
[
bufidx
]
);
undenormalise
(
output
);
filterstore
=
(
output
*
damp2
)
+
(
filterstore
*
damp1
);
filterstore
=
undenormalise
(
output
*
damp2
+
filterstore
*
damp1
);
undenormalise
(
filterstore
);
buffer
[
bufidx
]
=
input
+
(
filterstore
*
feedback
)
;
buffer
[
bufidx
]
=
input
+
filterstore
*
feedback
;
if
(
++
bufidx
>=
bufsize
)
bufidx
=
0
;
if
(
++
bufidx
>=
bufsize
)
bufidx
=
0
;
...
...
modules/audio_filter/spatializer/denormals.h
View file @
8400d104
...
@@ -8,8 +8,16 @@
...
@@ -8,8 +8,16 @@
#ifndef _denormals_
#ifndef _denormals_
#define _denormals_
#define _denormals_
#define undenormalise(sample) if(((*(unsigned int*)&sample)&0x7f800000)==0) sample=0.0f
#include <stdint.h>
static
inline
float
undenormalise
(
float
f
)
{
union
{
float
f
;
uint32_t
u
;
}
data
;
data
.
f
=
f
;
if
(
(
data
.
u
&
0x7f800000
)
==
0
)
return
0
.
0
;
return
f
;
}
#endif//_denormals_
#endif//_denormals_
//ends
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