shithub: libvpx

Download patch

ref: f091752a9c71cf029247b9805fc3ad6a76b453af
parent: bf6fcebfedb6315cfbcea7891bbe3e3b6b9ffb22
parent: 4e1ba35458bf933113aa1ec74ca306c1fd47e9af
author: Marco Paniconi <marpan@google.com>
date: Tue Feb 21 00:37:22 EST 2017

Merge "vp9: Fix for non-rd pickmode for high-bitdepth build."

--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -636,17 +636,19 @@
 #if CONFIG_VP9_HIGHBITDEPTH
   // TODO(jingning): Implement the high bit-depth Hadamard transforms and
   // remove this check condition.
-  // TODO(marpan): Disable this for 8 bit once optimizations for the functions
-  // below are merged in.
-  // if (xd->bd != 8) {
-  unsigned int var_y, sse_y;
-  (void)tx_size;
-  model_rd_for_sb_y(cpi, bsize, x, xd, &this_rdc->rate, &this_rdc->dist, &var_y,
-                    &sse_y);
-  *sse = INT_MAX;
-  *skippable = 0;
-  return;
-// }
+  // TODO(marpan): Use this path (model_rd) for 8bit under certain conditions
+  // for now, as the vp9_quantize_fp below for highbitdepth build is slow.
+  if (xd->bd != 8 ||
+      (cpi->oxcf.speed > 5 && cpi->common.frame_type != KEY_FRAME &&
+       bsize < BLOCK_32X32)) {
+    unsigned int var_y, sse_y;
+    (void)tx_size;
+    model_rd_for_sb_y(cpi, bsize, x, xd, &this_rdc->rate, &this_rdc->dist,
+                      &var_y, &sse_y);
+    *sse = INT_MAX;
+    *skippable = 0;
+    return;
+  }
 #endif
 
   (void)cpi;