Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
audiowmark
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
audiowmark
Commits
cfd11a44
Commit
cfd11a44
authored
Nov 27, 2018
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use log() for decoding for better robustness.
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
daf2d5ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
audiowmark.cc
src/audiowmark.cc
+4
-4
No files found.
src/audiowmark.cc
View file @
cfd11a44
...
...
@@ -14,11 +14,11 @@ using std::min;
namespace
Params
{
static
constexpr
int
frame_size
=
1024
;
static
constexpr
int
frames_per_bit
=
1
;
static
constexpr
int
frames_per_bit
=
4
;
static
constexpr
int
bands_per_frame
=
30
;
static
constexpr
int
max_band
=
100
;
static
constexpr
int
min_band
=
20
;
static
constexpr
double
water_gain
=
0.
25
;
// relative amplitude of the watermark
static
constexpr
double
water_gain
=
0.
1
;
// relative amplitude of the watermark
}
inline
double
...
...
@@ -374,7 +374,7 @@ get_watermark (const string& origfile, const string& infile, const string& orig_
const
double
im
=
fft_out
[
u
*
2
+
1
];
const
double
mag
=
sqrt
(
re
*
re
+
im
*
im
);
umag
+=
mag
;
umag
+=
log
(
mag
)
;
}
for
(
auto
d
:
down
)
{
...
...
@@ -382,7 +382,7 @@ get_watermark (const string& origfile, const string& infile, const string& orig_
const
double
im
=
fft_out
[
d
*
2
+
1
];
const
double
mag
=
sqrt
(
re
*
re
+
im
*
im
);
dmag
+=
mag
;
dmag
+=
log
(
mag
)
;
}
free_array_float
(
fft_out
);
...
...
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