-
Notifications
You must be signed in to change notification settings - Fork 1
Add Discord patches #1
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
Conversation
- libva 1.10 has no support for AV1. - Some h265 fields are missing in libva 1.10, plus there's no VAAPI H.265 encoder in cros-codecs yet anyways. - This project actually uses minigbm, and we don't use it, so we can just disable it. - c2-wrapper is only useful for Android
Related to chromeos/cros-libva#31
TODO: implement it on the V4L2 encoder
Frame skipping may be useful for real-time, and bit stuffing messes with rate control.
Currently, only handle those for the h264 encoder
This way we can avoid extra complications with using the constructor with VideoFrame and use plain VAAPI surfaces borrowed as input.
Pushing new SPS/PPS on P-frames might confuse some decoders.
Our main use-case is importing dmabufs into surfaces for encoding.
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.
Some of this is a bit deep in the weeds for me to do a good job of review without reading up a bit more on va-api and h264, but the parts I follow look reasonable to me
self.resolution().height, | ||
// TODO: Should we add USAGE_HINT_ENCODER support? | ||
Some(UsageHint::USAGE_HINT_DECODER), | ||
Some(UsageHint::USAGE_HINT_ENCODER), |
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.
I guess this is fine for us since we're only using this for encoding, but looks like this code is used for both encode and decode generally. Seems like it would be better to pass in a parameter for this
H.265 encoder in cros-codecs yet anyways.
just disable it.
Bump cros-libva to 0.0.13
Add FrameMetadata::force_idr
Use Arc<Display>: related to Allow Display to be used by multiple threads chromeos/cros-libva#31
Add RateControl::VariableBitrate and implement it for VAAPI encoder
vaapi: allow frame skip and disable bit stuffing
vaapi: add rc_buffer_size and max_frame_size to Tunings
vaapi: add new_native_vaapi constructor to H264 encoder
encoder: downgrade log from info to debug
encoder: do not push new SPS/PPS when applying tunings
video_frame: use HINT_ENCODER when importing dmabuf into vaapi
vaapi: add quality tuning and use in h.264 encoder
vaapi: add packed slice header for h.264 encoder