Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding YUY to RGB capabilities to public API as a processing block. #3056

Merged
merged 6 commits into from
Jan 16, 2019

Conversation

dorodnic
Copy link
Contributor

This should simplify using the camera in less demanding YUY mode,
and only converting to RGB what is actually needed.
Another important usage of this is recording YUY to ROS-bag for later
offline conversion. This can save 33%-50% in file size.

TODO: Allow format customization in constructor or via option.

This should simplify using the camera in less demanding YUY mode,
and only converting to RGB what is actually needed.
Another important usage of this is recording YUY to ROS-bag for later
offline conversion. This can save 33%-50% in file size.
{
yuy2rgb::yuy2rgb()
{

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see where you initialize _stream_filter

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

yuy_decoder() : filter(init(), 1) { }

protected:
yuy_decoder(std::shared_ptr<rs2_processing_block> block) : filter(block, 1) {}
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure what is the purpose of this ctor, is it to enable to user to move other processing block?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I implement derived yuy2rgb, the new yuy_decoder wrapper in hpp will need to derive from yuy_decoder. This means it will need to initialize base (yuy_decoder) but pass its own processing block into filter.

if (f.get_profile().get() != _source_stream_profile.get())
{
_source_stream_profile = f.get_profile();
_target_stream_profile = f.get_profile().clone(RS2_STREAM_DEPTH, 0, RS2_FORMAT_RGB8);
Copy link
Contributor

Choose a reason for hiding this comment

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

why RS2_STREAM_DEPTH?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@ev-mp ev-mp merged commit f74881b into IntelRealSense:development Jan 16, 2019
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