### Skip optimizing larger coefficients in trellis quant module

```This achieves a few percent speed increase without hurting
compression performance.

Change-Id: I040e9bb69274f7de843bdd15926a5c924b30a731```
parent 02b8212b
 ... ... @@ -205,22 +205,27 @@ int vp10_optimize_b(MACROBLOCK *mb, int plane, int block, rate0 = tokens[next].rate; rate1 = tokens[next].rate; // The threshold of 3 is empirically obtained. if (abs(x) > 3) { shortcut = 0; } else { #if CONFIG_NEW_QUANT shortcut = ( (dequant_abscoeff_nuq( abs(x), dequant_ptr[rc != 0], dequant_val[band_translate[i]]) > (abs(coeff[rc]) << shift)) && (dequant_abscoeff_nuq( abs(x) - 1, dequant_ptr[rc != 0], dequant_val[band_translate[i]]) < (abs(coeff[rc]) << shift))); shortcut = ( (dequant_abscoeff_nuq( abs(x), dequant_ptr[rc != 0], dequant_val[band_translate[i]]) > (abs(coeff[rc]) << shift)) && (dequant_abscoeff_nuq( abs(x) - 1, dequant_ptr[rc != 0], dequant_val[band_translate[i]]) < (abs(coeff[rc]) << shift))); #else // CONFIG_NEW_QUANT if ((abs(x) * dequant_ptr[rc != 0] > (abs(coeff[rc]) << shift)) && (abs(x) * dequant_ptr[rc != 0] < (abs(coeff[rc]) << shift) + dequant_ptr[rc != 0])) shortcut = 1; else shortcut = 0; if ((abs(x) * dequant_ptr[rc != 0] > (abs(coeff[rc]) << shift)) && (abs(x) * dequant_ptr[rc != 0] < (abs(coeff[rc]) << shift) + dequant_ptr[rc != 0])) shortcut = 1; else shortcut = 0; #endif // CONFIG_NEW_QUANT } if (shortcut) { sz = -(x < 0); ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!