Small improvements an fixes on stb_vorbis#1889
Open
lassade wants to merge 1 commit into
Open
Conversation
lassade
force-pushed
the
stb_vorbis_minor_fixes_and_improvments
branch
from
February 14, 2026 14:55
9178356 to
37d8171
Compare
RobLoach
reviewed
Mar 1, 2026
Comment on lines
+724
to
+726
| uint16 Xlist[65]; // varies | ||
| uint8 sorted_order[65]; | ||
| uint8 neighbors[65][2]; |
Contributor
There was a problem hiding this comment.
Opportunity to document why this is 65, or use something like VIF_POSIT+2?
Author
There was a problem hiding this comment.
I don't know why but it is in the spec in at the last paragraph it says "Vector [floor1_x_list] is limited to a maximum length of 65 elements;"
AliceLR
reviewed
Jun 3, 2026
Comment on lines
-4164
to
+4166
| unsigned int actual_size = f->blocksize_1 / 2; | ||
| unsigned int actual_size = f->blocksize_1; |
Author
There was a problem hiding this comment.
this loop looks for the maximum ammount of memory needed, in my test data I don't have a single vorbis file that doesn't have a residue type 2 so using blocksize_1 is good enough
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.
-Werroron line 1404, the statementf->stream_start + loc < f->stream_startis always falsemax_part_readwhen computing how much temporary memory is needed, it's a non issue becauseimdct_memis always bigger thanclassify_memby a lot I don't see a cenario when it doesn't. the fix is pretty easy: the maxactual_sizeisf->blocksize_1and notf->blocksize_1/2this happens on residue type 2 shown atdecode_residueline 2111