diff options
author | Jim Bankoski <jimbankoski@google.com> | 2012-08-20 12:58:31 -0700 |
---|---|---|
committer | Jim Bankoski <jimbankoski@google.com> | 2012-08-20 12:58:31 -0700 |
commit | 985f09fdca14c74fbd6c6dcffe260bf3132c4b7e (patch) | |
tree | aec1ea12191e2b34cf0b36b6cb1afb7e9fa1091c | |
parent | 2b59e14a0023be9d084349d58ee156a49cc674bb (diff) | |
download | libvpx-985f09fdca14c74fbd6c6dcffe260bf3132c4b7e.tar libvpx-985f09fdca14c74fbd6c6dcffe260bf3132c4b7e.tar.gz libvpx-985f09fdca14c74fbd6c6dcffe260bf3132c4b7e.tar.bz2 libvpx-985f09fdca14c74fbd6c6dcffe260bf3132c4b7e.zip |
static threshold fix for realtime
This code allows us to skip encoding if the sse
is less than the error we could possibly encode.
Change-Id: Iefb590dc0ee30b660495218398c7969f7d5fd19f
-rw-r--r-- | vp8/encoder/pickinter.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/vp8/encoder/pickinter.c b/vp8/encoder/pickinter.c index c9d63c64e..b67f04b85 100644 --- a/vp8/encoder/pickinter.c +++ b/vp8/encoder/pickinter.c @@ -458,7 +458,15 @@ void get_lower_res_motion_info(VP8_COMP *cpi, MACROBLOCKD *xd, int *dissim, static void check_for_encode_breakout(unsigned int sse, MACROBLOCK* x) { - if (sse < x->encode_breakout) + MACROBLOCKD *xd = &x->e_mbd; + + unsigned int threshold = (xd->block[0].dequant[1] + * xd->block[0].dequant[1] >>4); + + if(threshold < x->encode_breakout) + threshold = x->encode_breakout; + + if (sse < threshold ) { /* Check u and v to make sure skip is ok */ unsigned int sse2 = 0; |