Skip to content

perf(processor): reduce la2aHighCrestMaxDeficit from 8.0 to 6.0 dB#57

Merged
flexiondotorg merged 3 commits intomainfrom
max-deficit
Mar 15, 2026
Merged

perf(processor): reduce la2aHighCrestMaxDeficit from 8.0 to 6.0 dB#57
flexiondotorg merged 3 commits intomainfrom
max-deficit

Conversation

@flexiondotorg
Copy link
Contributor

Increase severity scaling for moderate deficits to ensure they receive more aggressive parameter overrides. Adjusts high-crest override strategy to better handle cases like 2.6 dB deficit, where the original 8.0 factor was overly lenient. Updates all test assertions to reflect new severity values.

Checklist

  • I have performed a self-review of my code
  • I have tested my changes and confirmed there are no regressions

Steepen severity scaling for moderate deficits so they receive more
aggressive parameter overrides. Adjusts high-crest override strategy to
better handle cases like 2.6 dB deficit where original 8.0 factor was
overly lenient. Updates all test assertions to reflect new severity
values.

Signed-off-by: Martin Wimpress <code@wimpress.io>
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 3 files

Confidence score: 5/5

  • This PR looks low risk to merge because both findings are low-severity documentation mismatches (2/10) with high confidence, and neither indicates functional or behavioral regressions.
  • In internal/processor/adaptive.go, the LA2AHighCrestSeverity comment still says deficit / 8.0 even though logic now uses 4 dB scaling, which could mislead future maintenance if left unchanged.
  • In internal/processor/adaptive_test.go, the floor comment still describes the old 8 dB scale while assertions enforce 4 dB-scale floors, creating explanation drift but not a runtime bug.
  • Pay close attention to internal/processor/adaptive.go, internal/processor/adaptive_test.go - align stale comments with the updated 4 dB scaling behavior.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="internal/processor/adaptive.go">

<violation number="1" location="internal/processor/adaptive.go:273">
P3: Update the `LA2AHighCrestSeverity` diagnostic comment to match the new 4 dB scaling; it still documents `deficit / 8.0`.</violation>
</file>

<file name="internal/processor/adaptive_test.go">

<violation number="1" location="internal/processor/adaptive_test.go:2457">
P3: The nearby floor comment still documents the old 8 dB scale, but these updated assertions now enforce the stronger 4 dB-scale floors. Update the comment so the test's explanation matches what it actually verifies.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

- Raises severity clamp threshold to reduce artefacts in moderate
  deficits
- Balances effectiveness for high-crest cases (e.g. Anna, severity 0.43)
  with artefact risk across 3–5 dB range
- Updates test assertions and LA-2A documentation to reflect new
  threshold

This tuning refinement targets the middle ground where high-crest
detection activates but artefacts remain inaudible for typical
compression ratios.

Signed-off-by: Martin Wimpress <code@wimpress.io>
@flexiondotorg flexiondotorg changed the title perf(processor): reduce la2aHighCrestMaxDeficit from 8.0 to 4.0 dB perf(processor): reduce la2aHighCrestMaxDeficit from 8.0 to 6.0 dB Mar 15, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 3 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="internal/processor/adaptive.go">

<violation number="1" location="internal/processor/adaptive.go:273">
P1: This change makes moderate high-crest deficits less aggressive, opposite to the intended severity increase.</violation>
</file>

<file name="docs/FilterCompressor-Teletronix LA-2A.md">

<violation number="1" location="docs/FilterCompressor-Teletronix LA-2A.md:62">
P1: This sets the high-crest severity ramp to 6 dB, but the PR’s stated change is 8 dB → 4 dB. Moderate deficits like 2.6 dB will still be under-scaled.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

The LA2AHighCrestSeverity field comment in filters.go still referenced
the old 8.0 dB divisor. Updated to 6.0 to match the current
la2aHighCrestMaxDeficit constant.

Signed-off-by: Martin Wimpress <code@wimpress.io>
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 1 file (changes from recent commits).

Requires human review: Auto-approval blocked by 2 unresolved issues from previous reviews.

@flexiondotorg flexiondotorg merged commit 4cf4f26 into main Mar 15, 2026
7 checks passed
@flexiondotorg flexiondotorg deleted the max-deficit branch March 15, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant