Repository navigation
If component id's are R, G, B in ASCII the color space should be RGB - #1732
Merged
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1732 +/- ##
==========================================
- Coverage 84.47% 84.46% -0.02%
==========================================
Files 836 836
Lines 36735 36737 +2
Branches 4305 4306 +1
==========================================
- Hits 31031 31029 -2
- Misses 4873 4876 +3
- Partials 831 832 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
4 tasks done
Member
|
TIL! I did not know about this feature at all! |
| } | ||
|
|
||
| // If the component Id's are R, G, B in ASCII the colorspace is RGB and not YCbCr. | ||
| if (components[0].Id == 82 && components[1].Id == 71 && components[2].Id == 66) |
Member
There was a problem hiding this comment.
If you switch the order of these checks I believe we avoid the bounds checks for 2 out of 3 of them.
JimBobSquarePants
approved these changes
Aug 13, 2021
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.
Prerequisites
Description
I have noticed that the colorspace is determined wrongly for some jpeg. For example:

is decoded as:

When the frame component Id's are RGB in ASCII, the color space should be RGB not YCbCr.