-
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
Enable MJPEG #4622
Enable MJPEG #4622
Conversation
get data size api added to Py, C# and Java wrappers
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.
Minor amendments + verify metadata extraction with kernels 4.4 and 4.18 ( with and w/o metadata node)
return; | ||
} | ||
|
||
if(_profile.format != 1296715847 && // allow JPEG frames size to be smaller than the uncompressed frame |
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.
Please create a classifier enum for formats with variable bitrates (jpeg/compressed depth) for maintainability. Use hex values in comparisons.
timestamp = monotonic_to_realtime(timestamp); | ||
|
||
// read metadata from the frame appendix | ||
acquire_metadata(buf_mgr,fds); |
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.
The metadata extraction should probably be adjusted as previously the pointer was preset to the max frame size
@@ -42,7 +42,7 @@ namespace librealsense | |||
byte* planes[1]; | |||
planes[0] = (byte*)ret.get_data(); | |||
|
|||
unpack_yuy2_rgb8(planes, (const byte*)f.get_data(), vf.get_width(), vf.get_height()); | |||
unpack_yuy2_rgb8(planes, (const byte*)f.get_data(), vf.get_width(), vf.get_height(), vf.get_height() * vf.get_width() * _traget_bpp); |
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.
typo _traget_bpp
void unpack_mjpeg(byte * const dest[], const byte * source, int width, int height, int actual_size) | ||
{ | ||
//STBIDEF stbi_uc *stbi_load_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp) | ||
int w, h, bpp; |
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.
Add {} init
The unresolved task will be handled in a separate PR |
No description provided.