diff options
author | Paul Wilkins <paulwilkins@google.com> | 2013-03-28 19:46:35 +0000 |
---|---|---|
committer | Paul Wilkins <paulwilkins@google.com> | 2013-04-04 10:19:16 +0100 |
commit | 9b9136f8a2bbb619b01cde9eb253c564d8f5372b (patch) | |
tree | 0eb16ab645cf783453d1b4ca0a090ea938b7c42f /vp9 | |
parent | 74e8bd11c287ac3c0d10dc832de8c2da38dbb7a9 (diff) | |
download | libvpx-9b9136f8a2bbb619b01cde9eb253c564d8f5372b.tar libvpx-9b9136f8a2bbb619b01cde9eb253c564d8f5372b.tar.gz libvpx-9b9136f8a2bbb619b01cde9eb253c564d8f5372b.tar.bz2 libvpx-9b9136f8a2bbb619b01cde9eb253c564d8f5372b.zip |
Fixed incorrect use of compute_qdelta()
This function expects real Q values as inputs
not index values.
The use-age her impacts the Q chosen for force key
frames. Though this is a bug fix I have not yet verified
whether following the bug fix the q multiplier value used is
correct.
Change-Id: I49f6da894d90baeb1e86c820c335f02dc80d3b66
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/encoder/vp9_onyx_if.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c index f74273086..5574605df 100644 --- a/vp9/encoder/vp9_onyx_if.c +++ b/vp9/encoder/vp9_onyx_if.c @@ -2735,8 +2735,13 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi, // the maximum key frame interval. Here force the Q to a range // based on the ambient Q to reduce the risk of popping if (cpi->this_key_frame_forced) { - const int qindex = cpi->last_boosted_qindex; - const int delta_qindex = compute_qdelta(cpi, qindex, qindex * 0.75); + int delta_qindex; + int qindex = cpi->last_boosted_qindex; + double last_boosted_q = vp9_convert_qindex_to_q(qindex); + + delta_qindex = compute_qdelta(cpi, last_boosted_q, + (last_boosted_q * 0.75)); + cpi->active_best_quality = MAX(qindex + delta_qindex, cpi->best_quality); } |