Added check that YUYV input of cvtColor has even width.#23657
Merged
asmorkalov merged 1 commit intoopencv:3.4from May 23, 2023
Merged
Added check that YUYV input of cvtColor has even width.#23657asmorkalov merged 1 commit intoopencv:3.4from
asmorkalov merged 1 commit intoopencv:3.4from
Conversation
9acf871 to
89a4e59
Compare
Contributor
Author
|
@mshabunin Could you take a look on the PR? |
mshabunin
requested changes
May 23, 2023
Contributor
mshabunin
left a comment
There was a problem hiding this comment.
Either the test should be fixed, because it does not verify the added check, or the code should be expanded to support 1, 2, 4 channels with corresponding check and test.
| dstSz = Size(sz.width, sz.height * 2 / 3); | ||
| break; | ||
| case FROM_UYVY: | ||
| CV_Assert( sz.width % 2 == 0); |
Contributor
There was a problem hiding this comment.
Shouldn't it be (scn * sz.width) % 4 == 0? (currently scn has to be 2 but, as I understand, it can in theory be 1 or 4 too)
89a4e59 to
98d678c
Compare
mshabunin
approved these changes
May 23, 2023
6 tasks
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.
Resolves #21035
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.