After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 778733 - encoders: support more quality levels for AVC/HEVC/VP8/VP9
encoders: support more quality levels for AVC/HEVC/VP8/VP9
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
unspecified
Other other
: Normal enhancement
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-02-16 02:34 UTC by Pengfei
Modified: 2017-05-12 09:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add Encoding Quality tuning [hackish]: (8.65 KB, patch)
2017-04-20 00:44 UTC, sreerenj
none Details | Review
encoders: add quality level tuning (13.13 KB, patch)
2017-05-10 11:47 UTC, Víctor Manuel Jáquez Leal
none Details | Review
encoders: add quality level tuning (13.19 KB, patch)
2017-05-11 09:51 UTC, Víctor Manuel Jáquez Leal
none Details | Review
encoders: add quality level tuning (13.19 KB, patch)
2017-05-11 09:52 UTC, Víctor Manuel Jáquez Leal
committed Details | Review

Description Pengfei 2017-02-16 02:34:44 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.
Comment 1 sreerenj 2017-04-20 00:44:50 UTC
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
Comment 2 Víctor Manuel Jáquez Leal 2017-05-10 11:47:40 UTC
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>
Comment 3 Víctor Manuel Jáquez Leal 2017-05-11 09:51:41 UTC
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>
Comment 4 Víctor Manuel Jáquez Leal 2017-05-11 09:52:21 UTC
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>
Comment 5 Víctor Manuel Jáquez Leal 2017-05-11 09:55:00 UTC
Attachment 351612 [details] pushed as 4f343f8 - encoders: add quality level tuning