Enhanced hdc#245
Open
awesie wants to merge 4 commits into
Open
Conversation
Align the core and enhanced streams based on the PDU sequence number. But, seq is limited to 6 bits so we need to manually adjust by 64 for some reason.
SBR needs to be fixed when it switches from mono to stereo, etc. Easiest solution is to completely reset it, but this could be improved.
Defaults to core-only. Use --enhanced to decode enhanced stream. This is not for public consumption, only to ease testing.
argilo
reviewed
Sep 5, 2020
| { | ||
| input_pdu_push(st->input, st->buffer + offset, cnt, prog, hdr.stream_id); | ||
| input_pdu_push(st->input, st->buffer + offset, cnt, prog, hdr.stream_id, seq); | ||
| seq = (seq + 1) & 0x3f; |
Collaborator
There was a problem hiding this comment.
The sequence number also needs to be incremented in the case where the CRC is invalid. This line won't be reached due to the continue on line 523.
Contributor
Author
There was a problem hiding this comment.
Fair point. Looking over this code, I feel like there are similar problems with st->pdu_idx[prog][hdr.stream_id] as well, so some refactoring might be warranted.
Collaborator
There was a problem hiding this comment.
Yes, you're right. We should reset st->pdu_idx[prog][hdr.stream_id] back to zero in the j == 0 && hdr.pfirst case, regardless of whether the CRC is valid.
This was referenced May 5, 2024
Closed
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.
Do not merge.
This is a first draft of the enhanced stream support for AM. I would like more test data but I neither have a way to record AM nor am I in the right country currently.
My testing so far has been the AM sample that was provided a while ago. The converted form that works with nrsc5 can be found here: https://gofile.io/d/lQuUUN.
For testing, there is a CLI switch (--enhanced) that controls whether the core stream will be decoded (default) or core+enhanced. This would go away before this pull request is accepted.