Skip to content

Conversation

sgvandijk
Copy link
Contributor

This adds the YUY2/YUYV version of the YUV 4:2:2 image encoding, as discussed in #76 .

I chose the name YUV422_YUY2, to use the most popular fourcc code YUY2 and try to be consistent with the existing YUV422 encoding.

Signed-off-by: Sander G. van Dijk <[email protected]>
clalancette
clalancette previously approved these changes Nov 19, 2019
Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

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

Looks good to me! I'm going to run CI on it, compiling/testing sensor_msgs, rviz, and cv_bridge (the latter two are users of this include file).

@clalancette clalancette dismissed their stale review November 19, 2019 14:28

Sorry, realize this needs tests.

}

if (encoding == YUV422) {
if (encoding == YUV422 ||
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please add tests to https://github.com/ros2/common_interfaces/blob/81663c07b93889c3d0afda9b99cd5f1c7c98c1f2/sensor_msgs/test/test_image_encodings.cpp for numChannels and bitDepth? It looks like this was missed when the YUV422 one was added as well, so we may as well add tests for both that one and the new one. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure thing, done!

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks! I'll run CI on this now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great thanks! I guess the failures are not related to this?

Copy link
Contributor

Choose a reason for hiding this comment

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

The Linux failures were an infrastructure issue; the job got automatically restarted, but it doesn't propagate that back to the issue, so I just manually updated it. It looks good now.

The Windows failure was because of a typo in how I launched it. I've now fixed that typo and its running again.

@clalancette
Copy link
Contributor

clalancette commented Nov 22, 2019

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@clalancette
Copy link
Contributor

All right, looking good. Thanks for the patch, merging.

@clalancette clalancette merged commit d4505b5 into ros2:master Nov 25, 2019
@sgvandijk sgvandijk deleted the yuv422-yuy2 branch November 25, 2019 14:02
esteve pushed a commit to esteve/common_interfaces that referenced this pull request Dec 14, 2019
* Add the YUY2 image encoding

Signed-off-by: Sander G. van Dijk <[email protected]>

* Add number of channels and bit depth tests for YUV422 encodings

Signed-off-by: Sander G. van Dijk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants