Simplifying arithmetic by using multiply+shift

ntt_short1:
         MEDIUM (%) HIGH (%)
    PSNR -0.002561  0.044074
 PSNRHVS  0.021798  0.082885
    SSIM  0.005793  0.082526
FASTSSIM -0.054113 -0.130136

Change-Id: Icbc38383d27acb4abd3aa30c11d7fb4e51c8ce4c
diff --git a/vp10/common/dering.c b/vp10/common/dering.c
index 2d5f1a7..b7c9844 100644
--- a/vp10/common/dering.c
+++ b/vp10/common/dering.c
@@ -20,10 +20,10 @@
 
 
 int compute_level_from_index(int global_level, int gi) {
-  static const double dering_gains[4] = {0, .7, 1, 1.4};
+  static const int dering_gains[4] = {0, 11, 16, 22};
   int level;
   if (global_level == 0) return 0;
-  level = (int)floor(.5 + global_level*dering_gains[gi]);
+  level = (global_level*dering_gains[gi] + 8) >> 4;
   return clamp(level, gi, MAX_DERING_LEVEL-1);
 }
 
@@ -112,7 +112,7 @@
 #endif
         /* FIXME: This is a temporary hack that uses more conservative
            deringing for chroma. */
-        if (pli) level = level*2/3;
+        if (pli) level = (level*5 + 4) >> 3;
         if (sb_all_skip(cm, sbr*MI_BLOCK_SIZE, sbc*MI_BLOCK_SIZE)) level = 0;
         threshold = level << coeff_shift;
         od_dering(