Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve waveform rendering performance #7366

Merged
merged 87 commits into from
Feb 9, 2025
Merged
Changes from 1 commit
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
5ad7845
Experimental sample thumbnail
khoidauminh Apr 23, 2024
795ad7f
Rename some classes and type aliases. Make some type declarations exp…
khoidauminh Apr 25, 2024
140006b
Use a combination of audioFile name and shared_ptrs to track samples;…
khoidauminh Apr 25, 2024
14d1e91
That weird line at the end of the sample is now gone
khoidauminh Apr 25, 2024
71284b0
Small changes to the code; Add comments
khoidauminh Apr 26, 2024
4553283
Add missing word to comment; Fix typo
khoidauminh Apr 26, 2024
7a6e2aa
Track `SharedSampleThumbnailList`s instead
khoidauminh May 2, 2024
f281961
Major refactor; implement thumbnailing for SlicerT, AFP and Automatio…
khoidauminh Jul 3, 2024
e03dacd
Code clean up, renames and documenting
khoidauminh Jul 3, 2024
4a1689e
Merge branch 'LMMS:master' into sample-thumbnail
khoidauminh Jul 4, 2024
82c51e0
Add the namespace lmms comments
khoidauminh Jul 4, 2024
35589f9
More code updates and documentation
khoidauminh Jul 4, 2024
92b9c15
Fix error in comment
khoidauminh Jul 4, 2024
fa24cfe
Comment out `qDebug`s
khoidauminh Jul 5, 2024
101199e
Fix formatting
khoidauminh Jul 5, 2024
b903d9f
Use alternative initialization of `SampleThumbnailVisualizeParameters`
khoidauminh Jul 5, 2024
7a393ef
Remove commented code
khoidauminh Jul 12, 2024
4e39c16
Fix style and simplify code
sakertooth Sep 10, 2024
9880d83
Use auto
sakertooth Sep 10, 2024
69cc6ba
Draw lines using floating point
sakertooth Sep 10, 2024
d7f89ac
Merge the classes into one nested class
sakertooth Sep 10, 2024
9605dec
Fix comparison of different signedness
sakertooth Sep 10, 2024
7f3d43f
Include memory header
sakertooth Sep 10, 2024
3c41384
Fix a logic error when selecting samples; Rename a const
khoidauminh Sep 10, 2024
5f70d59
Fix more issues with signedness
sakertooth Sep 10, 2024
4f9f353
Fix sample drawing error in `visualizeOriginal`
khoidauminh Sep 11, 2024
12bc9cc
Only render regions in view of the sample
khoidauminh Sep 11, 2024
0a210ee
Allow partial repaints of sample clips
khoidauminh Sep 11, 2024
d6a3638
Remove unused variable
khoidauminh Sep 11, 2024
305baee
Limit most of the painting to the visible region
khoidauminh Sep 11, 2024
9392493
Revert back to using rect() in some places
khoidauminh Sep 11, 2024
4bc9dae
Partial rendering for AutomationEditor
khoidauminh Sep 11, 2024
5cd947b
Don't redraw painted regions; allowHighResolution; remove `visualizeO…
khoidauminh Sep 12, 2024
daf45cc
Add s_sampleThumbnailCacheMap back for testing convenience
khoidauminh Sep 12, 2024
2c2202f
Minor change to the way `thumbnailSizeDivisor` is calculated
khoidauminh Sep 12, 2024
0317e80
Extend update region by an amount
khoidauminh Sep 12, 2024
bfb5367
forgot about this
khoidauminh Sep 12, 2024
547e513
Merge branch 'LMMS:master' into sample-thumbnail
khoidauminh Sep 12, 2024
834e861
Adapt to master; Redesign VisualizeParameters; Don't rely entirely on…
khoidauminh Sep 13, 2024
cfa35e6
Merge branch 'master' into sample-thumbnail
khoidauminh Sep 18, 2024
0b8315c
Merge branch 'LMMS:master' into sample-thumbnail
khoidauminh Sep 25, 2024
240696d
Don't try to preserve painted regions
khoidauminh Sep 25, 2024
b6cf4e3
Allow for a bit more thumbnails; Fix incorrect rendering when vertica…
khoidauminh Sep 26, 2024
ab3f0d1
Merge branch 'master' into sample-thumbnail
khoidauminh Oct 3, 2024
58a98a4
Fix missing include statement
khoidauminh Oct 3, 2024
b9bd512
Merge branch 'master' into sample-thumbnail
khoidauminh Nov 11, 2024
38cd04d
Remove the unused variable
khoidauminh Nov 11, 2024
5414e34
Merge branch 'LMMS:master' into sample-thumbnail
khoidauminh Nov 22, 2024
75ba820
Merge branch 'master' into sample-thumbnail
khoidauminh Dec 26, 2024
186ca61
Code optimization; Remove RMS member from Bit; Rename viewRect to dra…
khoidauminh Dec 28, 2024
309bc36
Merge branch 'master' into sample-thumbnail
khoidauminh Dec 28, 2024
7a53536
More code optimizations
khoidauminh Dec 28, 2024
5df559a
Fix formatting
sakertooth Dec 28, 2024
26545b0
Use begin instead of cbegin
sakertooth Dec 28, 2024
f522e1a
Improve generation of thumbnails
sakertooth Jan 1, 2025
55c55c8
Improve expressiveness of the draw code
sakertooth Jan 1, 2025
2476ce1
Add support for reversing
sakertooth Jan 1, 2025
3bc7f3b
Fix drawing code
sakertooth Jan 2, 2025
2a81387
Fix draw code (part 2)
sakertooth Jan 3, 2025
70a01b8
Apply more fixes and simplifications
sakertooth Jan 3, 2025
fea47be
Undo some out of scope changes
sakertooth Jan 3, 2025
ffe4915
Remove SampleWaveform
sakertooth Jan 3, 2025
a9f9194
Improve documentation
sakertooth Jan 3, 2025
6f1becb
Use size_t for some counters
sakertooth Jan 3, 2025
b6eeccb
Change width parameter to be size_t
sakertooth Jan 3, 2025
5a0ad5e
Remove temporary aggregated peak variable
sakertooth Jan 3, 2025
3dd6217
Bump up AggregationPerZoomStep to 10
sakertooth Jan 3, 2025
ae44632
Zoom out only requested range of thumbnail instead of clipping it sep…
sakertooth Jan 3, 2025
dd5dac1
Rename targetSampleWidth to targetThumbnailWidth
sakertooth Jan 3, 2025
3579edb
Handle reversing for AFP; Iterate in reverse instead of reversing the…
khoidauminh Jan 4, 2025
5c9039d
Change names to be more accurate
sakertooth Jan 4, 2025
7d5ba17
Improve implementation of sample thumbnail cache map
sakertooth Jan 4, 2025
5378902
Move AggregationPerZoomStep back down to 2, do not cap smallest thumb…
sakertooth Jan 4, 2025
5952123
Simplify sample thumbnail cache handling in constructor
sakertooth Jan 5, 2025
313af1e
Call drawLines instead of drawLine in a loop
sakertooth Jan 5, 2025
141a20d
Bump up AggregationPerZoomStep to 10 again
sakertooth Jan 5, 2025
f07897c
Fix off-by-one error when constructing Thumbnail from buffer
sakertooth Jan 6, 2025
60400f1
Fix crash when viewport is not in bounds
sakertooth Jan 7, 2025
57d17b6
Apply performance improvements
sakertooth Jan 7, 2025
c8cb378
Apply minor changes
sakertooth Jan 7, 2025
745013d
Use C++20's designated initializers
sakertooth Jan 8, 2025
874cbdd
Create param right before visualizing
sakertooth Jan 8, 2025
f8022b9
Fix regressions with reversing
sakertooth Jan 9, 2025
2984f82
Fix incorrect rendering in AFP and SlicerT
khoidauminh Feb 1, 2025
3c2a744
Move MaxSampleThumbnailCacheSize and AggregationPerZoomStep into impl…
sakertooth Feb 8, 2025
67ccaf9
Remove static keyword
sakertooth Feb 8, 2025
d186e45
Remove getter and setter for peak data
sakertooth Feb 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Bump up AggregationPerZoomStep to 10 again
Thought using 2 would help performance (when rendering). Maybe it does, but it's still quite slow when rendering a bunch of thumbnails at once.
  • Loading branch information
sakertooth committed Jan 5, 2025
commit 141a20d21d46a9bb727dd9b36527de3630720a77
2 changes: 1 addition & 1 deletion include/SampleThumbnail.h
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ class LMMS_EXPORT SampleThumbnail
class Thumbnail
{
public:
static constexpr auto AggregationPerZoomStep = 2;
static constexpr auto AggregationPerZoomStep = 10;

struct Peak
{
Loading