change the threshold of DC check for encode breakout
authorYaowu Xu <yaowu@google.com>
Thu, 20 Jan 2011 00:21:01 +0000 (16:21 -0800)
committerYaowu Xu <yaowu@google.com>
Fri, 28 Jan 2011 17:43:23 +0000 (09:43 -0800)
commit8f279596cbb7a6a3016fdc00624bc33ba36641bf
treef812172649751199f2c6796c01ab3a5047b04f55
parent82266a1ac971c2f7b0984e717cb9353309a8ed7c
change the threshold of DC check for encode breakout

Previously, the DC check is to make sure there is no code-able
DC shift for quantizer Q0, which has been verified rather
conservative. This commit changes the criteria to have two
components, DC and AC, to address the conservativeness. First,
it checks if all AC energy is enough to contribute a single
non-zero quantized AC coefficient. Second, for DC, the decision
to skip further considers two possible scenarios: 1. There is
no code-able 2nd order DC coefficient at all; 2 The residue is
relatively flat, but the uniform DC change is very small, i.e.
less than 1/2 gray level per pixel.

Comparing to previous criteria, the new criteria is about 10%
to 15% faster in encoding time with a very small quality loss.
(threshold ~1000 and quality range 33db-45db)

It should be noted that this commit enables "automatic" static
threshold for encodebreakout if a non-zero small value is passed
in to encoder.

Change-Id: I0f77719a1ac2c2dfddbd950d84920df374515ce3
vp8/encoder/rdopt.c