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
e5a9efef
Commit
e5a9efef
authored
May 27, 2022
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid lrint() in speed detection (rounding doesn't improve results).
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
d42a8b0b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
TODO
src/TODO
+0
-1
wmspeed.cc
src/wmspeed.cc
+3
-5
No files found.
src/TODO
View file @
e5a9efef
speed detection possible improvements:
- refine with 128 sync step instead of 256?
- grid size adjustment
- remove lrint?
- detect silence instead of total volume?
- split big region into two smaller ones?
- connected search on even smaller regions?
...
...
src/wmspeed.cc
View file @
e5a9efef
...
...
@@ -302,14 +302,12 @@ SpeedSync::compare_bits (BitValue *bit_values, double relative_speed, int *start
for
(
auto
si
=
sync_bits
.
begin
()
+
mi
;
si
!=
sync_bits
.
end
();
si
++
)
{
int
index
=
offset
+
si
->
frame
*
steps_per_frame
;
const
int
index1
=
lrint
(
index
*
relative_speed_inv
);
if
(
index1
>=
sync_matrix
.
rows
())
int
index
=
(
offset
+
si
->
frame
*
steps_per_frame
)
*
relative_speed_inv
;
if
(
index
>=
sync_matrix
.
rows
())
return
;
auto
&
bv
=
bit_values
[
si
->
bit
];
auto
mags
=
sync_matrix
(
index
1
,
mi
);
auto
mags
=
sync_matrix
(
index
,
mi
);
if
(
B2
)
{
bv
.
umag
+=
mags
.
dmag
;
...
...
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