Skip to content

Conversation

dnachbaur
Copy link
Contributor

  • directly compress them in the call thread
  • keep JPEG out buffer allocated to save one memory allocation

@dnachbaur dnachbaur requested a review from rdumusc July 3, 2017 12:14
Copy link

@rdumusc rdumusc left a comment

Choose a reason for hiding this comment

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

Good, a few minor details!


private:
tjhandle _tjHandle;
std::vector<unsigned char> tjJpegBuf;
Copy link

Choose a reason for hiding this comment

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

_tjJpegBuf

return promise.get_future();
}

if (image.width <= 64 && image.height <= 64 &&
Copy link

Choose a reason for hiding this comment

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

#define 64 at the top

[this, segment] { return _sendSegment(segment); }};
if (finish)
tasks.emplace_back([this] { return _sendFinish(); });
return _enqueueRequest(std::move(tasks));
Copy link

Choose a reason for hiding this comment

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

these last 3 lines are the same as the normal case below, reuse them with an if/else for setting tasks?

- directly compress them in the call thread
- keep JPEG out buffer allocated to save one memory allocation
@dnachbaur
Copy link
Contributor Author

updated

@dnachbaur dnachbaur merged commit 5ff0f8e into BlueBrain:master Jul 3, 2017
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