Audaspace: faster audio resampling #116059

Merged
Aras Pranckevicius merged 2 commits from aras_p/blender:audaspace-resampler-opt into main 2024-01-03 21:23:34 +01:00

Previously in Audaspace there was choice between linear resampler (okay for preview, but not great for final mix), or "extremely high quality preset" for rendering the final mix; with nothing in between. I have just landed "medium" and "low" resampler quality levels in upstream Audaspace (see https://github.com/audaspace/audaspace/pull/18 with details and quality spectograms, also comparison with Audacity resampler).

This PR updates Audaspace to latest upstream, and switches to use the newly added "medium" quality resampler. There's no audible difference (nor visible one in spectrograms), as far as I can tell.

Timings, rendering out frames 1000-3000 of Sprite Fright Edit blender studio data set:

  • Windows (Ryzen 5950X, VS2022): 92 -> 73 sec
  • Mac (M1 Max, clang 15): 70 -> 62 sec

i.e. using a faster audio resampler makes the whole render process be 10-20% faster (however, this from VSE where it combines already pre-rendered image strips).

Previously in Audaspace there was choice between linear resampler (okay for preview, but not great for final mix), or "extremely high quality preset" for rendering the final mix; with nothing in between. I have just landed "medium" and "low" resampler quality levels in upstream Audaspace (see https://github.com/audaspace/audaspace/pull/18 with details and quality spectograms, also comparison with Audacity resampler). This PR updates Audaspace to latest upstream, and switches to use the newly added "medium" quality resampler. There's no audible difference (nor visible one in spectrograms), as far as I can tell. Timings, rendering out frames 1000-3000 of Sprite Fright Edit blender studio data set: - Windows (Ryzen 5950X, VS2022): 92 -> 73 sec - Mac (M1 Max, clang 15): 70 -> 62 sec i.e. using a faster audio resampler makes the _whole render process_ be 10-20% faster (however, this from VSE where it combines already pre-rendered image strips).
Aras Pranckevicius added this to the Video Sequencer project 2023-12-12 06:00:19 +01:00
Aras Pranckevicius force-pushed audaspace-resampler-opt from 4dbd9e776d to 50e04fe387 2024-01-02 20:27:58 +01:00 Compare
Aras Pranckevicius changed title from WIP: Audaspace: faster audio resampling to Audaspace: faster audio resampling 2024-01-02 20:57:28 +01:00
Author
Member

@blender-bot build

@blender-bot build
Aras Pranckevicius requested review from Sergey Sharybin 2024-01-02 21:30:29 +01:00

Nice work!

Is it possible to set resampler quality to medium via some API instead of modifying the bundled sources? That'd make it easier to update the Audaspace in the future, and will make the update process more robust (so that we wouldn't loose the speedup by accident).

Nice work! Is it possible to set resampler quality to medium via some API instead of modifying the bundled sources? That'd make it easier to update the Audaspace in the future, and will make the update process more robust (so that we wouldn't loose the speedup by accident).
Author
Member

Is it possible to set resampler quality to medium via some API instead of modifying the bundled sources? That'd make it easier to update the Audaspace in the future, and will make the update process more robust

I'd need to add said API to Audaspace upstream first, for that to happen. Should I try doing that?

> Is it possible to set resampler quality to medium via some API instead of modifying the bundled sources? That'd make it easier to update the Audaspace in the future, and will make the update process more robust I'd need to add said API to Audaspace upstream first, for that to happen. Should I try doing that?
Sergey Sharybin approved these changes 2024-01-03 17:27:47 +01:00
Sergey Sharybin left a comment
Owner

Ideally yes, that'd be very lovely. Will also make it so people who use stand-alone library (it seems it is packaged for Arch, i.e.) can benefit from the performance without re-compiling library.

That being said, I don't really mind if we commit the current patch as-is, as there is nothing better we can do with the current state of Audaspace API.

Not sure what level of review you expect btw. I can't test it beyond of how you've tested it, and the code has been reviewed by the Jeorg already in the Audaspace repository. So I'd trust your testing :)

Ideally yes, that'd be very lovely. Will also make it so people who use stand-alone library (it seems it is packaged for Arch, i.e.) can benefit from the performance without re-compiling library. That being said, I don't really mind if we commit the current patch as-is, as there is nothing better we can do with the current state of Audaspace API. Not sure what level of review you expect btw. I can't test it beyond of how you've tested it, and the code has been reviewed by the Jeorg already in the Audaspace repository. So I'd trust your testing :)
Aras Pranckevicius merged commit 986f493812 into main 2024-01-03 21:23:34 +01:00
Aras Pranckevicius deleted branch audaspace-resampler-opt 2024-01-03 21:23:37 +01:00
Author
Member

Alright, I've submitted PR to add API to upstream Audaspace https://github.com/audaspace/audaspace/pull/19 and once/if that is accepted then will apply to Blender codebase as well.

Alright, I've submitted PR to add API to upstream Audaspace https://github.com/audaspace/audaspace/pull/19 and once/if that is accepted then will apply to Blender codebase as well.
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#116059
No description provided.