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

Enable MJPEG #4622

Merged
merged 1 commit into from
Aug 20, 2019
Merged

Enable MJPEG #4622

merged 1 commit into from
Aug 20, 2019

Conversation

matkatz
Copy link
Contributor

@matkatz matkatz commented Aug 12, 2019

No description provided.

get data size api added to Py, C# and Java wrappers
Copy link
Collaborator

@ev-mp ev-mp left a 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
Copy link
Collaborator

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

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

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;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add {} init

@ev-mp
Copy link
Collaborator

ev-mp commented Aug 20, 2019

The unresolved task will be handled in a separate PR

@ev-mp ev-mp merged commit 07bc6d9 into IntelRealSense:development Aug 20, 2019
@sam598 sam598 mentioned this pull request Aug 26, 2019
@matkatz matkatz deleted the enable-mjpeg branch November 5, 2019 08:09
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