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
38445d58
Commit
38445d58
authored
Sep 03, 2016
by
Burt P
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
af_hdcd: hdcd_analyze_gen() using int instead of float
Signed-off-by:
Burt P
<
pburt0@gmail.com
>
parent
eb008658
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
af_hdcd.c
libavfilter/af_hdcd.c
+4
-5
No files found.
libavfilter/af_hdcd.c
View file @
38445d58
...
@@ -1318,11 +1318,10 @@ static void hdcd_analyze_prepare(hdcd_state *state, int32_t *samples, int count,
...
@@ -1318,11 +1318,10 @@ static void hdcd_analyze_prepare(hdcd_state *state, int32_t *samples, int count,
/** encode a value in the given sample by adjusting the amplitude */
/** encode a value in the given sample by adjusting the amplitude */
static
int32_t
hdcd_analyze_gen
(
int32_t
sample
,
unsigned
int
v
,
unsigned
int
maxv
)
static
int32_t
hdcd_analyze_gen
(
int32_t
sample
,
unsigned
int
v
,
unsigned
int
maxv
)
{
{
float
sflt
=
sample
,
vv
=
v
;
static
const
int
r
=
18
,
m
=
1024
;
vv
/=
maxv
;
int64_t
s64
=
sample
;
if
(
vv
>
1
.
0
)
vv
=
1
.
0
;
v
=
m
+
(
v
*
r
*
m
/
maxv
);
sflt
*=
1
.
0
+
(
vv
*
18
);
return
(
int32_t
)(
s64
*
v
/
m
);
return
(
int32_t
)
sflt
;
}
}
/** behaves like hdcd_envelope(), but encodes processing information in
/** behaves like hdcd_envelope(), but encodes processing information in
...
...
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