Repository navigation
YUV/YCrCb conversions rewritten to wide intrinsics - #13649
Merged
Merged
Conversation
Member
You can add these perf tests (disabled by default). |
Contributor
Author
|
@alalek I will make a separate PR containing all my custom perf tests (but it needs some time to rewrite them in OpenCV's style) |
This was referenced Jan 21, 2019
Merged
SavyaSanchi-Sharma
pushed a commit
to SavyaSanchi-Sharma/opencv
that referenced
this pull request
Jul 30, 2026
YUV/YCrCb conversions rewritten to wide intrinsics (opencv#13649) * YUV: minors * YUV42x conversions template-merged * more template-merged YUV42x conversions; some NEON code removed * rgb2yuv<float> vectorized * yuv2rgb<float> vectorized * memcpy removed * Yuv2RGB<ushort> vectorized * unused code removed * rgb2yuv<ushort> vectorized * rgb2yuv<uchar> vectorized * v_pack_u used (up to +30% perf) * yuv2rgb<uchar> vectorized * fixed compilation
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.
This pullrequest changes
color_yuv.cpprewritten to wide universal intrinsicsPerformance
Note that although Yxx2RGB was vectorized before, it didn't actually use vectorized code if source color space was YUV. This was because YUV coeffs didn't fit into 16 bits.
Now this problem is solved by altering the biggest coeff and by fixing the result after multiplication.
Baseline AVX2
Baseline AVX512SKX
Baseline SSE2
Baseline SSE4.1
Not covered
Several conversions are not covered by perf tests so their performance was estimated with custom test: random image 511x511, time measured by loop of 20000 identical calls, averaged by 3 runs.Resulting improvement depends mostly on baseline. Number of channels usually changes performance by less than 10%.