Skip to content

Enable MJPEG - #4622

Merged
ev-mp merged 1 commit into
realsenseai:developmentfrom
matkatz:enable-mjpeg
Aug 20, 2019
Merged

Enable MJPEG#4622
ev-mp merged 1 commit into
realsenseai:developmentfrom
matkatz:enable-mjpeg

Conversation

@matkatz

@matkatz matkatz commented Aug 12, 2019

Copy link
Copy Markdown
Contributor

No description provided.

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

@ev-mp ev-mp left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

Comment thread src/proc/yuy2rgb.cpp
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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

typo _traget_bpp

Comment thread src/image.cpp
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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Add {} init

@ev-mp

ev-mp commented Aug 20, 2019

Copy link
Copy Markdown
Contributor

The unresolved task will be handled in a separate PR

@ev-mp
ev-mp merged commit 07bc6d9 into realsenseai: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