Repository navigation
Fix h2m LFE remap for ambisonics to Sound System H (#48) - #49
Open
jingbo-marquis wants to merge 2 commits into
Open
jingbo-marquis wants to merge 2 commits into
jingbo-marquis wants to merge 2 commits into
Conversation
Signed-off-by: Jingbo Hou <jingbo.hou@samsung.com>
jingbo-marquis
requested review from
trevorknight,
trsonic,
yeroro and
yilun-zhangs
September 30, 2026 08:06
yeroro
requested changes
Oct 1, 2026
yeroro
left a comment
Contributor
There was a problem hiding this comment.
Good catch! Is it possible to add a test that would have caught this?
- Add test_hoa_sound_system_h.c: renders one-hot HOA signals (1OA/3OA) to Sound System H and asserts non-LFE output slots are non-silent and pairwise distinct, catching remap misassignment (duplicate/silent slots) - Add TEST_ASSERTF macro to the test framework for printf-style failure messages (reports the exact slot indices on failure) - Register test_hoa_sound_system_h in both CMake and Bazel builds Signed-off-by: Jingbo Hou <jingbo.hou@samsung.com>
Contributor
Author
added a test that covers this case: test_hoa_sound_system_h.c |
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.
The remap compared LFE slot indices (lfe1/lfe2) against the matrix column index i instead of the output slot n being assigned. For Sound System H (lfe1 = 3, lfe2 = 9, 22 columns) the second LFE skip came one column late (map[8] = 9 instead of 10): column 8 was moved into the LFE2 slot and overwritten by LFE generation, and slot 10 kept a duplicate of column 10. Other layouts are unaffected because their indices never drift apart before the last skip. Skip LFE slots by the output slot being assigned:
while (n == lfe1 || n == lfe2) n++;
Only map[8] for Sound System H changes. Companion: AOMediaCodec/roar#1.