Skip allocations when reusing VP9 packets#364
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #364 +/- ##
==========================================
+ Coverage 82.64% 82.68% +0.04%
==========================================
Files 28 28
Lines 3440 3448 +8
==========================================
+ Hits 2843 2851 +8
Misses 427 427
Partials 170 170
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
51264ee to
9c9dfe1
Compare
JoTurk
reviewed
Jul 2, 2026
JoTurk
left a comment
Member
There was a problem hiding this comment.
Change looks good, thank you.
just two nits.
If a caller reuses `codecs.VP9Packet` (after resetting the state appropriately), then reuse already allocated slices if they are of sufficient length instead of unconditionally allocating. Add tests to verify that reuse is safe and is zero allocations.
Contributor
Author
|
Thanks for the review @JoTurk. Any chance you can create a new release with this? I saw the workflow for releasing but I don't have access to run it. |
Member
|
@kcaffrey you do have access. Just tag v1.10.3 off main and push it and it will create the release :) |
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.
If a caller reuses
codecs.VP9Packet(after resetting the state appropriately), then reuse already allocated slices if they are of sufficient length instead of unconditionally allocating. Add tests to verify that reuse is safe and is zero allocations.