Skip to content

Conversation

@anishmgoyal
Copy link
Collaborator

Also, create format definitions for YUV images.

@anishmgoyal anishmgoyal force-pushed the addYUVPlanarCalculations branch 2 times, most recently from 8e74f39 to 4bce41e Compare June 6, 2024 20:56
@anishmgoyal anishmgoyal force-pushed the addYUVPlanarCalculations branch from 4bce41e to c9ed717 Compare June 7, 2024 19:09
@anishmgoyal anishmgoyal force-pushed the addYUVPlanarCalculations branch from 2aa3d29 to 71f2228 Compare June 7, 2024 19:45
@anishmgoyal anishmgoyal force-pushed the addYUVPlanarCalculations branch from e14a6a3 to e588acf Compare June 10, 2024 18:29
Also, create format definitions for YUV images.
Put self-header at the top, and C++ std headers after, before project-
wide headers.
@anishmgoyal anishmgoyal force-pushed the addYUVPlanarCalculations branch from 279d8a5 to 9f6e6a6 Compare June 10, 2024 18:33
Add a quick explanation of what chroma subsampling is / how it affects
how pixels are stored.
// Splits the frames from a raw video, based on the format of the frames,
// and metadata such as height and width. This assumes raw video, with no
// metadata in the file itself, and no audio tracks (such as a camera
// feed). Returns if the operation succeeded.
Copy link
Collaborator

Choose a reason for hiding this comment

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

"Returns if the operation succeeded"? Did you mean to say "Returns X", cause couldn't it return error code as well?

std::vector<char> buffer(frameSize);
size_t totalRead = 0;
while (totalRead < fileSize) {
const size_t bytesRead = file.Read(buffer.data(), frameSize);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this safe to do after a std::move operation? Would buffer have frameSize capacity?

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.

4 participants