summaryrefslogtreecommitdiffstats
path: root/src/lib/bs_encode/encode_ut.cpp
diff options
context:
space:
mode:
authorDaniil Cherednik <[email protected]>2026-04-06 23:10:51 +0200
committerDaniil Cherednik <[email protected]>2026-04-06 23:14:19 +0200
commit10c82ccfa7b802eba5d1366069bc796f5b48d76b (patch)
tree9df76a648fa0d8cb08871b5fa6663c0ddd6e94ce /src/lib/bs_encode/encode_ut.cpp
parentea4d33b38ed0c8fc9ebf10011e6e8e394e5dafbf (diff)
atrac3: add boundary transient thresholding to prune low-value gain transitionsnew_psy_cont
Problem Gain curve generation emitted many +/-1 level transitions that do not correspond to strong local transients. These points consume gain-info bits and can create low-level modulation artifacts without improving transient handling. Solution Introduce explicit transient evidence gating at transition boundaries in CalcCurve(), and wire it to the existing dynamic min-score path. What changed - Added BoundaryTransientScore(env, loc, win): - computes local ratio around each subframe boundary - R = max(max_right/max_left, max_left/max_right) - short symmetric window (win=3 subframes) - Re-enabled minScore usage in CalcCurve() (previously ignored). - For each level transition candidate at loc=sf+1: - keep unconditionally if loc==targetSf (tail neutral anchor) - keep unconditionally if |deltaLevel| >= 2 (strong step) - otherwise keep only if BoundaryTransientScore(loc) >= minScore - Added YAML telemetry: - transient_min_score - transient_window - transition_pruned {loc, delta, score} Why this is safe - Strong transitions are preserved. - Rightmost transition is preserved to keep proper return-to-neutral anchoring. - Only low-confidence small toggles are removed. Measured impact (current branch comparison) Baseline: ea4d33b38 (before this change) Tracks: show_me_your_spine.wav, 13.wav Gain-info bits / points: - spine: 191,697 -> 150,297 bits (delta -41,400; -21.6%) 15,593 -> 10,993 points (delta -4,600) - 13.wav: 1,299,035 -> 979,931 bits (delta -319,104; -24.6%) 97,035 -> 61,579 points (delta -35,456) Subjective note User listening reports improved sound and fixes for some low-level artifacts.
Diffstat (limited to 'src/lib/bs_encode/encode_ut.cpp')
0 files changed, 0 insertions, 0 deletions