Remove redundant frame copies inside librealsense core - #10573
Conversation
ev-mp
left a comment
There was a problem hiding this comment.
Looks good, it is up to you whether to keep the previos code as a comment
The reason I left it is that we set a This function can be refactored in the future, we didn't want to deal with it currently. |
| //REMOVED! - no need to add 2 copies to a frame | ||
| //byte* pix = (byte*)fo.pixels; | ||
| //std::vector<byte> pixels(pix, pix + fo.frame_size); | ||
| //fr->data = pixels; |
There was a problem hiding this comment.
This is dangerous.
This leaves fr->data (for regular frames) basically uninitialized (empty), right? I.e., as long as it's not used, we're OK. So why not remove it?
I believe a composite frame still uses it... maybe we can move it there?
(not for this PR, but general thought)
There was a problem hiding this comment.
I agree, like we said the generate_frame_from_data() needs to be refactored
Tracked on [LRS-437]