Improve YUV to RGB Performance III#78
Conversation
|
Thanks for the follow up! I'd generally be open to adding
|
Ok, I defaulted to I like the idea with |
|
First impl for Some thoughts:
|
|
Hey, so sorry, I somehow missed your latest update!
Personally, I don't mind this being a const parameter, but I'd assume some folks would like this to be configurable (e.g., detect numcpus). For now const is fine though.
Yes, I think each one being
You mean where Let me know if there's anything I can help with. |
|
I am using |
|
The tests are failing because I removed some asserts, which are only valid for YUV422. I would remove the asserts/tests. What do you think? |
I'm a bit confused, OpenH264 is only YUV420; so in other words, our own YUV conversion should only ever consider YUV420, or am I missing something? The 3 tests that are failing ( If so, isn't that what the test is asserting (thus it's checking for 420, and not for 422)? |
These should be fixed on the latest master. If you could rebase clippy should pass. If not (or in any case) we probably want to upgrade MSRV slowly anyways as more items become |
2f031b5 to
63ab5b3
Compare
I merged instead with an embarrassing amount of push --force. Lmk if you want rebase instead
Ah, sorry, my bad. I messed the dimensions in split() |
|
I am wondering how to continue here. We can introduce a trait (eg. IntoRGB8) that can make the conversion available and we impl it for DecodedYUV and YUVSlices. For YUVSlices this would be a bit awkward, because we need to offset the target reference outside of the function. openh264/src/formats/rgb.rs already contains some RGBSlices. Conversion between YUV/RGBSlice would be independent from other parts of the frame and can be parallelized in any flavor. We would then have to join the slices somehow. Seems to me that YUV/RGBSlices are not used in this repo, but are part of the public API. |
|
Hey, apologies again for dropping the ball here for so long. I just tried updating your branch to merge this but got permission errors. I now just pulled in all your changes and pushed manually. I'm aware this isn't done yet, but I think adding Closing this PR now since it got 'merged', but we can continue further design discussion here, or in a new PR. |
This extends the effort from the previous two PRs.
Two methods have been added, which implement a parallel approach to
write_rgb8_scalarandwrite_rgb8_f32x8, without rayon ;)f32x8
scalar
Please inspect