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
6b0b0259
Commit
6b0b0259
authored
Feb 11, 2019
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added command line option which allows to disable sync for tests.
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
f2177feb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
audiowmark.cc
src/audiowmark.cc
+17
-0
No files found.
src/audiowmark.cc
View file @
6b0b0259
...
...
@@ -49,6 +49,7 @@ namespace Params
static
int
mark_sample_rate
=
44100
;
// watermark generation and detection sample rate
static
int
test_cut
=
0
;
// for sync test
static
bool
test_no_sync
=
false
;
// disable sync
}
void
...
...
@@ -187,6 +188,10 @@ parse_options (int *argc_p,
{
Params
::
test_cut
=
atoi
(
opt_arg
);
}
else
if
(
check_arg
(
argc
,
argv
,
&
i
,
"--test-no-sync"
))
{
Params
::
test_no_sync
=
true
;
}
}
/* resort argc/argv */
...
...
@@ -1011,6 +1016,18 @@ public:
vector
<
Score
>
result_scores
;
vector
<
Score
>
sync_scores
;
if
(
Params
::
test_no_sync
)
{
const
size_t
expect0
=
Params
::
frames_pad_start
*
Params
::
frame_size
;
const
size_t
expect_step
=
(
mark_sync_frame_count
()
+
mark_data_frame_count
())
*
Params
::
frame_size
;
const
size_t
expect_end
=
frame_count
(
wav_data
)
*
Params
::
frame_size
;
int
ab
=
0
;
for
(
size_t
expect_index
=
expect0
;
expect_index
+
expect_step
<
expect_end
;
expect_index
+=
expect_step
)
result_scores
.
push_back
(
Score
{
expect_index
,
1.0
,
(
ab
++
&
1
)
?
ConvBlockType
::
b
:
ConvBlockType
::
a
});
return
result_scores
;
}
init_up_down
(
wav_data
);
vector
<
float
>
fft_db
;
...
...
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