stereo: dynamic IS crossover and MS restriction at low bitrates - #182
Merged
Conversation
Pass the core bandwidth parameter to AACstereo() to adaptively scale intensity stereo and restrict Mid/Side stereo decision boundaries. Changes: - Disable short-window M/S stereo when bandwidth <= 16 kHz in JOINT_MIXED mode to eliminate pre-echo and quantization noise. - Dynamically scale the intensity stereo (IS) crossover frequency with configured core bandwidth (3.5 kHz - 7.0 kHz). - Precalculate IS band target offsets outside the CPE processing loop to avoid redundant per-element divisions. - Optimize apply_mute() and apply_ms() with memset for float arrays. - Update libfaac/frame.c call site to pass config.bandWidth.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a quality improvement.
Passes core bandwidth into
AACstereo()to improve low-bitrate encoding quality. Dynamically scales Intensity Stereo (IS) crossover and disables short-window Mid/Side (M/S) stereo under constrained bandwidths to eliminate pre-echo artifacts and save bit allocation for low-frequency phase detail.Benchmark Data & MOS Results
Key MOS Highlights
Technical Changes
bandWidth <= 16000Hz inJOINT_MIXEDmode by falling back toJOINT_IS.IS_START_FREQ_MIN) and 7.0 kHz (IS_START_FREQ_MAX) based onbandWidth * 0.35(capped at 0.35 * Fs).target_offset_long/target_offset_short) outside per-element loops and replaces element-wise clearing loops withmemset()inapply_ms()andapply_mute().AACstereo()signature inlibfaac/stereo.h/libfaac/stereo.cto takeunsigned int bandWidthand updates the call site inlibfaac/frame.c.