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
2d16b838
Commit
2d16b838
authored
Apr 24, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_surround: check for invalid magnitude and phase difference
parent
e1e0f94d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
af_surround.c
libavfilter/af_surround.c
+3
-0
No files found.
libavfilter/af_surround.c
View file @
2d16b838
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
*/
#include "libavutil/avassert.h"
#include "libavutil/audio_fifo.h"
#include "libavutil/audio_fifo.h"
#include "libavutil/channel_layout.h"
#include "libavutil/channel_layout.h"
#include "libavutil/opt.h"
#include "libavutil/opt.h"
...
@@ -335,6 +336,8 @@ static void stereo_transform(float *x, float *y, float angle)
...
@@ -335,6 +336,8 @@ static void stereo_transform(float *x, float *y, float angle)
static
void
stereo_position
(
float
a
,
float
p
,
float
*
x
,
float
*
y
)
static
void
stereo_position
(
float
a
,
float
p
,
float
*
x
,
float
*
y
)
{
{
av_assert2
(
a
>=
-
1
.
f
&&
a
<=
1
.
f
);
av_assert2
(
p
>=
0
.
f
&&
p
<=
M_PI
);
*
x
=
av_clipf
(
a
+
FFMAX
(
0
,
sinf
(
p
-
M_PI_2
))
*
FFDIFFSIGN
(
a
,
0
),
-
1
,
1
);
*
x
=
av_clipf
(
a
+
FFMAX
(
0
,
sinf
(
p
-
M_PI_2
))
*
FFDIFFSIGN
(
a
,
0
),
-
1
,
1
);
*
y
=
av_clipf
(
cosf
(
a
*
M_PI_2
+
M_PI
)
*
cosf
(
M_PI_2
-
p
/
M_PI
)
*
M_LN10
+
1
,
-
1
,
1
);
*
y
=
av_clipf
(
cosf
(
a
*
M_PI_2
+
M_PI
)
*
cosf
(
M_PI_2
-
p
/
M_PI
)
*
M_LN10
+
1
,
-
1
,
1
);
}
}
...
...
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