-
-
Notifications
You must be signed in to change notification settings - Fork 509
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
Filter NALs globally #1403
Filter NALs globally #1403
Conversation
90d26c6
to
c8fa538
Compare
c8fa538
to
38eae73
Compare
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.
filter_NAL needs to stay because radeon vaapi includes AUD and x264 includes SEI.
But it may be possible to just use offset into the encoded buffer instead of doing a copy?
Since ClientConnection already implements header NALs extraction, maybe filtering part could be moved there so it's consistent across all implementations. |
f46e71e
to
be37d3a
Compare
Only after I've reworked filtering code I've realized why it actually doesn't work properly with AUD. AUD is the first NAL that we may encounter. This results in configuration headers never sent because they're not detected, and that's why stream may not work properly when it's present. Ideally, this should be resolved by global configuration headers as it's done in #1385. For now, just skipping AUD, if it's the first header, is enough. SEI NALs will work as is. |
be37d3a
to
0d32357
Compare
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.
Overall good to me, but I would personally remove the temporary b
and l
variables in processH264Nals
and processH265Nals
.
I think this was only tested with AMD VA-API. If someone could test AMF and NVEnc with recent changes and confirm it works properly, that would be great. |
Works fine with AMF. |
74d659a
to
eeb8e6a
Compare
eeb8e6a
to
03b1e28
Compare
Ready to merge. |
Handle NAL filtering globally and remove video buffer copy caused by it from Linux code.