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
e6a20d46
Commit
e6a20d46
authored
Mar 16, 2020
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move sync normalization helper to SyncFinder class.
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
7ccce3a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
wmget.cc
src/wmget.cc
+14
-13
No files found.
src/wmget.cc
View file @
e6a20d46
...
...
@@ -182,19 +182,6 @@ linear_decode (vector<vector<complex<float>>>& fft_out, int n_channels)
return
raw_bit_vec
;
}
static
double
normalize_sync_quality
(
double
raw_quality
)
{
/* the quality for a good sync block depends on watermark strength
*
* this is just an approximation, but it should be good enough to be able to
* use one single threshold on the normalized value check if we have a sync
* block or not - typical output is 1.0 or more for sync blocks and close
* to 0.0 for non-sync blocks
*/
return
raw_quality
/
min
(
Params
::
water_delta
,
0.080
)
/
2.9
;
}
class
SyncFinder
{
public
:
...
...
@@ -264,6 +251,20 @@ private:
sync_bits
.
push_back
(
frame_bits
);
}
}
double
normalize_sync_quality
(
double
raw_quality
)
{
/* the quality for a good sync block depends on watermark strength
*
* this is just an approximation, but it should be good enough to be able to
* use one single threshold on the normalized value check if we have a sync
* block or not - typical output is 1.0 or more for sync blocks and close
* to 0.0 for non-sync blocks
*/
return
raw_quality
/
min
(
Params
::
water_delta
,
0.080
)
/
2.9
;
}
double
sync_decode
(
const
WavData
&
wav_data
,
const
size_t
start_frame
,
const
vector
<
float
>&
fft_out_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