GNOME Bugzilla – Bug 778733
encoders: support more quality levels for AVC/HEVC/VP8/VP9
Last modified: 2017-05-12 09:23:27 UTC
The request is about to encoder quality level.As the encoder in VAAPI driver is improved and more encoder quality level is added for AVC/VP8/HEVC. Now upstreaming is on-going. here VP9 is ready in driver. The middleware should support this. Legacy Encoder at most support two quality level. And new encoder support level at most 1-7.
Created attachment 350097 [details] [review] Add Encoding Quality tuning [hackish]: This is a patch to test the encoder quality/speed tuning. It includes few hacks which we need to remove before pushing. I am adding the patch here for testing purpose which is basically implemented for a customer to test the new driver capabilities. sample pipeline: ... ! vaapih264enc quality-level=7 ! fpsdisplaysink sync=false video-sink=fakesink textoveralay=false AVC encoder seems to have progressive quality/speed difference for each quality level value, but HEVC encoder behaving indifferently :) Note: Don't push the patch as it is
Created attachment 351536 [details] [review] encoders: add quality level tuning This patch adds the handling of VAEncMiscParameterTypeQualityLevel, in gstreamer-vaapi encoders: The encoding quality could be set through this structure, if the implementation supports multiple quality levels. The quality level set through this structure is persistent over the entire coded sequence, or until a new structure is being sent. The quality level range can be queried through the VAConfigAttribEncQualityRange attribute. A lower value means higher quality, and a value of 1 represents the highest quality. The quality level setting is used as a trade-off between quality and speed/power consumption, with higher quality corresponds to lower speed and higher power consumption. The quality level is set by the element's parameter "quality-level" with a hard-coded range of 1 to 8. Later, when the encoder is configured in run time, just before start processing, the quality level is clamped to the codec range. If VAConfigAttribEncQualityRange is not available in the used VA backend, then the quality level is set to zero, which means "disabled". All the available codecs now process this parameter if it is available. https://bugzilla.gnome.org/show_bug.cgi?id=778733 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Created attachment 351611 [details] [review] encoders: add quality level tuning This patch adds the handling of VAEncMiscParameterTypeQualityLevel, in gstreamer-vaapi encoders: The encoding quality could be set through this structure, if the implementation supports multiple quality levels. The quality level set through this structure is persistent over the entire coded sequence, or until a new structure is being sent. The quality level range can be queried through the VAConfigAttribEncQualityRange attribute. A lower value means higher quality, and a value of 1 represents the highest quality. The quality level setting is used as a trade-off between quality and speed/power consumption, with higher quality corresponds to lower speed and higher power consumption. The quality level is set by the element's parameter "quality-level" with a hard-coded range of 1 to 8. Later, when the encoder is configured in run time, just before start processing, the quality level is clamped to the codec range. If VAConfigAttribEncQualityRange is not available in the used VA backend, then the quality level is set to zero, which means "disabled". All the available codecs now process this parameter if it is available. https://bugzilla.gnome.org/show_bug.cgi?id=778733 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Created attachment 351612 [details] [review] encoders: add quality level tuning This patch adds the handling of VAEncMiscParameterTypeQualityLevel, in gstreamer-vaapi encoders: The encoding quality could be set through this structure, if the implementation supports multiple quality levels. The quality level set through this structure is persistent over the entire coded sequence, or until a new structure is being sent. The quality level range can be queried through the VAConfigAttribEncQualityRange attribute. A lower value means higher quality, and a value of 1 represents the highest quality. The quality level setting is used as a trade-off between quality and speed/power consumption, with higher quality corresponds to lower speed and higher power consumption. The quality level is set by the element's parameter "quality-level" with a hard-coded range of 1 to 8. Later, when the encoder is configured in run time, just before start processing, the quality level is scaled to the codec range. If VAConfigAttribEncQualityRange is not available in the used VA backend, then the quality level is set to zero, which means "disabled". All the available codecs now process this parameter if it is available. https://bugzilla.gnome.org/show_bug.cgi?id=778733 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Attachment 351612 [details] pushed as 4f343f8 - encoders: add quality level tuning