[metabug] Add Flexible Encoding Infrastructure (FEI) Support
Submitted by Sreerenj Balachandran
FEI(Flexible Encoding Infrastructure) is an extension to VA API which allows applications to have more control over different phases of encoding and trade off quality for speed with their on IPs.
The main highlight of FEI is the possibility to split the encoding process into two phases, first is ENC and the second is PAK.
ENC is the operation which performs all motion vector calculation and prediction.PAK is doing all transformations and entropy coding.
Without having FEI, the whole ENC+PAK is a black box to middleware, but with FEI user can extract the output of ENC and feed PAK with a custom enhanced motion vectors and macroblock prediction modes.
Patches are already landed in mailing list: https://github.com/01org/libva/pull/83
For now, we only have APIs for AVC encode
Skylake is the only platform which is supporting FEI now.
Patches are on the way.
Integrating the whole FEI to GStreamer is not trivial. FEI is more useful for customers who have their own encoder but want to offload some parts
of encoding to GPU/fixed-function hardware block for better performance.
I believe, it is better to not mess up the existing vaapih264enc which is our primary encoder and should be good enough for normal use cases.
What changes FEI brings into gstreamer-vaapi:
There will be(minimum of) two new GStreamer elements and a bunch of test applications needs to be implemented.
1: vaapih264feienc: (An advanced h264 encoder which can provide low-level per macroblock tuning parameters)
2: vaapih264feipreenc: (A preprocessing element which can extract MVs and statistics before calling encode function)
I will create two separate bugs to track the development of each.