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

Video encoder frame #905

Merged
merged 22 commits into from
Nov 7, 2023
Merged

Video encoder frame #905

merged 22 commits into from
Nov 7, 2023

Conversation

asahtik
Copy link
Contributor

@asahtik asahtik commented Sep 21, 2023

Added an alternative output for the video encoder node. It uses a new message type EncodedFrame that carries more relevant information than ImgFrame.

Copy link
Collaborator

@themarpe themarpe left a comment

Choose a reason for hiding this comment

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

LGTM

@asahtik asahtik merged commit 15e5fda into develop Nov 7, 2023
24 of 31 checks passed
@asahtik asahtik deleted the video_encoder_frame branch November 7, 2023 15:59
}

void H265Parser::parseNal(buf& bs, uint start, std::vector<SliceType>& out) {
nalUnitType = (bs[start] & 126) >> 1;
Copy link
Collaborator

Choose a reason for hiding this comment

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

boundary check would be nice here.
Copy the code to chatgpt w/ the following prompt:

Sanitize the following code snippet:

"

"

numExtraSliceHeaderBits = readUint(bs, bpos2, bpos2 + 3);
bpos2 += 3;
pos = (uint)(bpos2 / 8) + (bpos2 % 8 > 0);
} else if((0 <= nalUnitType && nalUnitType <= 9) || (16 <= nalUnitType && nalUnitType <= 21)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Getting with GCC 13.1.0:
warning: comparison of unsigned expression in ‘>= 0’ is always true [-Wtype-limits]

frameType = utility::getTypesH265(frame.data, true)[0];
break;
}
switch(frameType) {
Copy link
Contributor

Choose a reason for hiding this comment

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

... and warning: ‘frameType’ may be used uninitialized [-Wmaybe-uninitialized]

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