Fix vp9_compute_qdelta_by_rate loop behavior
authorAdrian Grange <agrange@google.com>
Tue, 10 Mar 2015 16:14:54 +0000 (09:14 -0700)
committerAdrian Grange <agrange@google.com>
Tue, 10 Mar 2015 16:14:54 +0000 (09:14 -0700)
commit78df71221656b0a0d37bff6c16efd743347fa30d
tree00ad5623da6543f5869881f37501ae9dc78eb09c
parent6eaca27df21d2bd8da1c063c484b5f5c28621d3a
Fix vp9_compute_qdelta_by_rate loop behavior

The return value from vp9_compute_qdelta_by_rate, which is
a delta value for the quantizer, could never be 0 if
(qindex == rc->worst_quality).

This occurs because target_index was setup unconditionally
in the loop and yet the loop counter stopped at
(rc->worst_quality - 1).

Change-Id: I6b59cd9b5811ff33357e71cd7d814c5e53d291f2
vp9/encoder/vp9_ratectrl.c