summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco <marpan@google.com>2015-02-13 15:28:49 -0800
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2015-02-13 15:28:49 -0800
commitd4761cff369065f9d85929013873e16f86adbc95 (patch)
tree043a0e6e1ea80294f64931a1c70c7ae4adb7e55f
parent4a03baa2f625fbf74039e1219371f0627a258b36 (diff)
parentb1940bf5fe8a887a006b28d79cf2e1df8f59db1c (diff)
downloadlibvpx-d4761cff369065f9d85929013873e16f86adbc95.tar
libvpx-d4761cff369065f9d85929013873e16f86adbc95.tar.gz
libvpx-d4761cff369065f9d85929013873e16f86adbc95.tar.bz2
libvpx-d4761cff369065f9d85929013873e16f86adbc95.zip
Merge "Replace some operations with shift in encoder_breakout."
-rw-r--r--vp9/encoder/vp9_pickmode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c
index 071747e17..46a354700 100644
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -390,11 +390,11 @@ static void encode_breakout_test(VP9_COMP *cpi, MACROBLOCK *x,
const unsigned int min_thresh =
MIN(((unsigned int)x->encode_breakout << 4), max_thresh);
#if CONFIG_VP9_HIGHBITDEPTH
- const int shift = 2 * xd->bd - 16;
+ const int shift = (xd->bd << 1) - 16;
#endif
// Calculate threshold according to dequant value.
- thresh_ac = (xd->plane[0].dequant[1] * xd->plane[0].dequant[1]) / 9;
+ thresh_ac = (xd->plane[0].dequant[1] * xd->plane[0].dequant[1]) >> 3;
#if CONFIG_VP9_HIGHBITDEPTH
if ((xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) && shift > 0) {
thresh_ac = ROUND_POWER_OF_TWO(thresh_ac, shift);
@@ -436,14 +436,14 @@ static void encode_breakout_test(VP9_COMP *cpi, MACROBLOCK *x,
xd->plane[1].dst.stride, &sse_u);
// U skipping condition checking
- if ((var_u * 4 <= thresh_ac) && (sse_u - var_u <= thresh_dc)) {
+ if (((var_u << 2) <= thresh_ac) && (sse_u - var_u <= thresh_dc)) {
var_v = cpi->fn_ptr[uv_size].vf(x->plane[2].src.buf,
x->plane[2].src.stride,
xd->plane[2].dst.buf,
xd->plane[2].dst.stride, &sse_v);
// V skipping condition checking
- if ((var_v * 4 <= thresh_ac) && (sse_v - var_v <= thresh_dc)) {
+ if (((var_v << 2) <= thresh_ac) && (sse_v - var_v <= thresh_dc)) {
x->skip = 1;
// The cost of skip bit needs to be added.