-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize ToI420 conversion by using sync.Pool #473
Conversation
Hi @neversi, would you mind providing some benchmark results for this for previous/now? I'm also curious if there's room to expand this to other frame decoders? |
Hi @edaniels, yes of course, I will provide as soon as possible! |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #473 +/- ##
==========================================
+ Coverage 58.08% 58.45% +0.37%
==========================================
Files 62 62
Lines 3691 3724 +33
==========================================
+ Hits 2144 2177 +33
Misses 1420 1420
Partials 127 127
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@edaniels
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! If you want to commit the benchmarks in as well, that would be cool but up to you.
What do you mean by "commit the benchmarks in"? In description of PR? |
Co-authored-by: Eric Daniels <eric@erdaniels.com>
Oh never mind hah. I thought you added new benchmarks. I see you resued. |
@edaniels, regarding to expanding pool to other frame decoders, I think it is possible, I will research it on weekends. |
Sounds great! Thank you for the contribution |
Description
Added sync.Pool to the i420 conversion to minimize overhead of creating new byte slices
Reference issue
Workaround for #424
i444ToI420(img image.YCbCr, dst []uint8)
,i422ToI420(img image.YCbCr, dst []uint8)
respectivelyTODO