-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Conversation
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.
src/proc/yuy2rgb.cpp
Outdated
{ | ||
yuy2rgb::yuy2rgb() | ||
{ | ||
|
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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) {} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
src/proc/yuy2rgb.cpp
Outdated
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why RS2_STREAM_DEPTH?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
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.