summaryrefslogtreecommitdiff
path: root/vp8/encoder/rdopt.c
diff options
context:
space:
mode:
authorJohn Koleszar <jkoleszar@google.com>2011-02-01 00:05:09 -0500
committerJohn Koleszar <jkoleszar@google.com>2011-02-01 00:05:10 -0500
commit76878a0354d9520d6029dc62384f0fe55b8cedc6 (patch)
tree3410f139e3a974aa69bff363934ff1fd279de8d1 /vp8/encoder/rdopt.c
parent933dfe0a94d41b7119c247506f9deeab7899da67 (diff)
parent60fde4d3425141443cd769674c2eca63d68dac32 (diff)
downloadlibvpx-76878a0354d9520d6029dc62384f0fe55b8cedc6.tar
libvpx-76878a0354d9520d6029dc62384f0fe55b8cedc6.tar.gz
libvpx-76878a0354d9520d6029dc62384f0fe55b8cedc6.tar.bz2
libvpx-76878a0354d9520d6029dc62384f0fe55b8cedc6.zip
Merge remote branch 'origin/master' into experimental
Change-Id: Id1d4bbe257cd126bb5f44347b896ddb659724f0b
Diffstat (limited to 'vp8/encoder/rdopt.c')
-rw-r--r--vp8/encoder/rdopt.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/vp8/encoder/rdopt.c b/vp8/encoder/rdopt.c
index 4a655b3c4..bfa068276 100644
--- a/vp8/encoder/rdopt.c
+++ b/vp8/encoder/rdopt.c
@@ -2294,22 +2294,28 @@ int vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int
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;
@@ -2455,6 +2461,7 @@ int vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int
if (x->skip)
break;
+
}
// Reduce the activation RD thresholds for the best choice mode