Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

asmorkalov
Copy link
Contributor

Resolves #21035

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@asmorkalov
Copy link
Contributor Author

@mshabunin Could you take a look on the PR?

@asmorkalov asmorkalov requested a review from mshabunin May 23, 2023 06:22
Copy link
Contributor

@mshabunin mshabunin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@asmorkalov asmorkalov force-pushed the as/uyvy_cvtColor_size_check branch from 89a4e59 to 98d678c Compare May 23, 2023 11:19
@asmorkalov asmorkalov removed the request for review from opencv-alalek May 23, 2023 11:43
@asmorkalov asmorkalov merged commit e096846 into opencv:3.4 May 23, 2023
This was referenced May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants