[Bug 783567] Encode: Fix the hardcoded range of quality level

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Jun 9 21:40:19 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=783567

sreerenj <bsreerenj at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #353425|0                           |1
        is obsolete|                            |

--- Comment #3 from sreerenj <bsreerenj at gmail.com> ---
Created attachment 353494
  --> https://bugzilla.gnome.org/attachment.cgi?id=353494&action=edit
libs: encoder: Fix the quality level clamping

Change the hard-coded range of quality-level from {1-8} to {1-7},
since it is the range Intel Open source driver supports.
Also perform the range clamping only if the user provided
quality-level is greater than the max-range suppored by the driver,
because there could be non-intel drivers giving lower value than
he hard-coded max value 7.

Anyway user won't be able to request for a value more than 7 since we set the
property range to a hard-coded magic number 7.

eg: let's say driver query returns 2 as max range and user requested for a
quality level 3.
The previous code(with out patch) will set the quality as ceil (3 * 2/8) = 1
which is wrong.

I think we just need to set the quality-level to max-range returned by
driver(if user requested quality-level is greater than driver-max-range).

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list