-
Notifications
You must be signed in to change notification settings - Fork 131
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
Video encoder frame #905
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
} | ||
|
||
void H265Parser::parseNal(buf& bs, uint start, std::vector<SliceType>& out) { | ||
nalUnitType = (bs[start] & 126) >> 1; |
There was a problem hiding this comment.
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)) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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]
Added an alternative output for the video encoder node. It uses a new message type EncodedFrame that carries more relevant information than ImgFrame.