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

SplineResampler - possible further improvements #139

Open
5 of 12 tasks
MineCake147E opened this issue Sep 14, 2021 · 0 comments
Open
5 of 12 tasks

SplineResampler - possible further improvements #139

MineCake147E opened this issue Sep 14, 2021 · 0 comments
Assignees
Labels
Feature: Signal Processing 🎛️ Something related to signal processing Kind: Enhancement 📈 New feature or request Priority: Moderate 🚃 Something that is moderately prioritized Status: Paused ⏸️ Previously been working but paused with some reasons.

Comments

@MineCake147E
Copy link
Owner

MineCake147E commented Sep 14, 2021

Background and motivation

Currently, code size of SplineResampler is skyrocketing while it's not fast enough to handle non-integer-ratio conversion very quickly.

Possible improvements

  • Reorder Catmull-Rom coefficients so that the branch will be out of dot-product loop.
    • Coefficients for CachedDirect
      • Coefficients access order will be like sawtooth wave.
    • Coefficients for CachedWrappedOdd
      • Coefficients access order will be like triangular wave.
    • Coefficients for CachedWrappedEven
      • Coefficients access order will be like triangular wave.
  • Increase the maximum size of coefficient memos for wrapped strategies.
    • CachedDirect can miss the L1 cache if we increase the maximum memo size because of its sawtooth-wave-like access.
  • Use delegate instead of switch statements for all combinations of channels, conversion ratio, and hardware.
    • Unify the parameter signature with newly introducing struct type.
  • Optimization for the conversion ratio 44.1Hz->48kHz.
    • Conversion-ratio-specific optimizations already exist for double-rate and quadruple-rate stereo/monaural conversion.
  • Utilize Expression Tree for non-trivial conversion ratio like 44.1kHz->96kHz. Currently impossible because Expression Tree supports neither ref locals nor pointers.
    • Vectorize using X86 and Arm Hardware Intrinsics if available.
    • Vectorize using System.Numerics.Vectors if no intrinsic available.
    • Unroll dot-product loops.
@MineCake147E MineCake147E added Kind: Enhancement 📈 New feature or request Feature: Signal Processing 🎛️ Something related to signal processing Status: Working ▶️ Work in progress Priority: Moderate 🚃 Something that is moderately prioritized labels Sep 14, 2021
@MineCake147E MineCake147E self-assigned this Sep 14, 2021
@MineCake147E MineCake147E added Status: Paused ⏸️ Previously been working but paused with some reasons. and removed Status: Working ▶️ Work in progress labels Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Signal Processing 🎛️ Something related to signal processing Kind: Enhancement 📈 New feature or request Priority: Moderate 🚃 Something that is moderately prioritized Status: Paused ⏸️ Previously been working but paused with some reasons.
Projects
None yet
Development

No branches or pull requests

1 participant