ref: 6d19d4071876031f9d9f06055c0ad1c899ebecc5
parent: f6214d1db8fd61139ad9ab3a64c2544679a8e262
parent: 8f279596cbb7a6a3016fdc00624bc33ba36641bf
author: Yaowu Xu <yaowu@google.com>
date: Mon Jan 31 06:00:46 EST 2011
Merge "change the threshold of DC check for encode breakout"
--- a/vp8/encoder/rdopt.c
+++ b/vp8/encoder/rdopt.c
@@ -2229,22 +2229,28 @@
else if (x->encode_breakout)
{
int sum, sse;
+ int threshold = (xd->block[0].dequant[1]
+ * xd->block[0].dequant[1] >>4);
+ if(threshold < x->encode_breakout)
+ threshold = x->encode_breakout;
+
VARIANCE_INVOKE(&cpi->rtcd.variance, get16x16var)
(x->src.y_buffer, x->src.y_stride,
x->e_mbd.predictor, 16, (unsigned int *)(&sse), &sum);
- if (sse < x->encode_breakout)
+ if (sse < threshold)
{
// Check u and v to make sure skip is ok
int sse2 = 0;
-
- // add dc check
- if (abs(sum) < (cpi->common.Y2dequant[0][0] << 2))
+ /* If theres is no codeable 2nd order dc
+ or a very small uniform pixel change change */
+ if (abs(sum) < (xd->block[24].dequant[0]<<2)||
+ ((sum * sum>>8) > sse && abs(sum) <128))
{
sse2 = VP8_UVSSE(x, IF_RTCD(&cpi->rtcd.variance));
- if (sse2 * 2 < x->encode_breakout)
+ if (sse2 * 2 < threshold)
{
x->skip = 1;
distortion2 = sse + sse2;
@@ -2390,6 +2396,7 @@
if (x->skip)
break;
+
}
// Reduce the activation RD thresholds for the best choice mode
--
⑨