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
71b4c60d
Commit
71b4c60d
authored
Mar 10, 2020
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused variable len from sync finder score.
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
785411b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
wmget.cc
src/wmget.cc
+4
-8
No files found.
src/wmget.cc
View file @
71b4c60d
...
@@ -259,7 +259,7 @@ private:
...
@@ -259,7 +259,7 @@ private:
}
}
}
}
double
double
sync_decode
(
const
WavData
&
wav_data
,
const
size_t
start_frame
,
const
vector
<
float
>&
fft_out_db
,
ConvBlockType
*
block_type
,
int
*
len
)
sync_decode
(
const
WavData
&
wav_data
,
const
size_t
start_frame
,
const
vector
<
float
>&
fft_out_db
,
ConvBlockType
*
block_type
)
{
{
double
sync_quality
=
0
;
double
sync_quality
=
0
;
...
@@ -308,7 +308,6 @@ private:
...
@@ -308,7 +308,6 @@ private:
sync_quality
/=
bit_count
;
sync_quality
/=
bit_count
;
sync_quality
=
normalize_sync_quality
(
sync_quality
);
sync_quality
=
normalize_sync_quality
(
sync_quality
);
*
len
=
bit_count
;
if
(
sync_quality
<
0
)
if
(
sync_quality
<
0
)
{
{
*
block_type
=
ConvBlockType
::
b
;
*
block_type
=
ConvBlockType
::
b
;
...
@@ -325,7 +324,6 @@ public:
...
@@ -325,7 +324,6 @@ public:
size_t
index
;
size_t
index
;
double
quality
;
double
quality
;
ConvBlockType
block_type
;
ConvBlockType
block_type
;
int
len
=
0
;
};
};
vector
<
Score
>
vector
<
Score
>
search
(
const
WavData
&
wav_data
,
BlockLength
block_length
)
search
(
const
WavData
&
wav_data
,
BlockLength
block_length
)
...
@@ -364,10 +362,9 @@ public:
...
@@ -364,10 +362,9 @@ public:
if
((
start_frame
+
total_frame_count
)
*
wav_data
.
n_channels
()
*
n_bands
<
fft_db
.
size
())
if
((
start_frame
+
total_frame_count
)
*
wav_data
.
n_channels
()
*
n_bands
<
fft_db
.
size
())
{
{
ConvBlockType
block_type
;
ConvBlockType
block_type
;
int
len
;
double
quality
=
sync_decode
(
wav_data
,
start_frame
,
fft_db
,
&
block_type
);
double
quality
=
sync_decode
(
wav_data
,
start_frame
,
fft_db
,
&
block_type
,
&
len
);
// printf ("%zd %f\n", sync_index, quality);
// printf ("%zd %f\n", sync_index, quality);
sync_scores
.
emplace_back
(
Score
{
sync_index
,
quality
,
block_type
,
len
});
sync_scores
.
emplace_back
(
Score
{
sync_index
,
quality
,
block_type
});
}
}
}
}
}
}
...
@@ -452,8 +449,7 @@ public:
...
@@ -452,8 +449,7 @@ public:
if
(
fft_db
.
size
())
if
(
fft_db
.
size
())
{
{
ConvBlockType
block_type
;
ConvBlockType
block_type
;
int
len
;
double
q
=
sync_decode
(
wav_data
,
0
,
fft_db
,
&
block_type
);
double
q
=
sync_decode
(
wav_data
,
0
,
fft_db
,
&
block_type
,
&
len
);
if
(
q
>
best_quality
)
if
(
q
>
best_quality
)
{
{
...
...
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