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
adf73738
Commit
adf73738
authored
Dec 13, 2020
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename option used for tests: --detect-speed-hint => --test-speed
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
6a386317
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
7 deletions
+6
-7
TODO
src/TODO
+0
-1
audiowmark.cc
src/audiowmark.cc
+2
-2
ber-test.sh
src/ber-test.sh
+1
-1
wmcommon.cc
src/wmcommon.cc
+1
-1
wmcommon.hh
src/wmcommon.hh
+1
-1
wmspeed.cc
src/wmspeed.cc
+1
-1
No files found.
src/TODO
View file @
adf73738
speed detection:
- maybe truncate cleanup
- remove pad start scaling
- test code
- document in README
...
...
src/audiowmark.cc
View file @
adf73738
...
...
@@ -592,9 +592,9 @@ parse_get_options (ArgParser& ap)
{
Params
::
detect_speed
=
true
;
}
if
(
ap
.
parse_opt
(
"--
detect-speed-hint
"
,
f
))
if
(
ap
.
parse_opt
(
"--
test-speed
"
,
f
))
{
Params
::
detect_speed_hint
=
f
;
Params
::
test_speed
=
f
;
}
}
...
...
src/ber-test.sh
View file @
adf73738
...
...
@@ -79,7 +79,7 @@ do
sox
-D
-V1
${
AWM_FILE
}
.wav
${
AWM_FILE
}
.speed.wav speed
$SPEED
mv
${
AWM_FILE
}
.speed.wav
${
AWM_FILE
}
.wav
TEST_SPEED_ARGS
=
"--detect-speed --
detect-speed-hint
$SPEED
"
TEST_SPEED_ARGS
=
"--detect-speed --
test-speed
$SPEED
"
else
TEST_SPEED_ARGS
=
""
fi
...
...
src/wmcommon.cc
View file @
adf73738
...
...
@@ -26,7 +26,7 @@ bool Params::mix = true;
bool
Params
::
hard
=
false
;
// hard decode bits? (soft decoding is better)
bool
Params
::
snr
=
false
;
// compute/show snr while adding watermark
bool
Params
::
detect_speed
=
false
;
double
Params
::
detect_speed_hint
=
-
1
;
double
Params
::
test_speed
=
-
1
;
int
Params
::
have_key
=
0
;
size_t
Params
::
payload_size
=
128
;
bool
Params
::
payload_short
=
false
;
...
...
src/wmcommon.hh
View file @
adf73738
...
...
@@ -46,7 +46,7 @@ public:
static
int
have_key
;
static
bool
detect_speed
;
static
double
detect_speed_hint
;
// for debugging --detect-speed
static
double
test_speed
;
// for debugging --detect-speed
static
size_t
payload_size
;
// number of payload bits for the watermark
static
bool
payload_short
;
...
...
src/wmspeed.cc
View file @
adf73738
...
...
@@ -356,7 +356,7 @@ speed_scan (ThreadPool& thread_pool, double clip_location, const WavData& in_dat
scan_params
.
seconds
,
best_speed
,
best_quality
,
100
*
fabs
(
best_speed
-
Params
::
detect_speed_hint
)
/
Params
::
detect_speed_hint
,
100
*
fabs
(
best_speed
-
Params
::
test_speed
)
/
Params
::
test_speed
,
t1
-
t0
,
t2
-
t1
);
}
return
best_speed
;
...
...
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