shithub: libvpx

Download patch

ref: 515fed8f387a0332d39de2f7fcbd4eefc1150b0d
parent: 0bb31a46a4f3a490a4cb483fe4db79d7bb20a0d3
parent: 9e1d2de67c1e74334cb452523343faee2ef15341
author: James Zern <jzern@google.com>
date: Tue Jun 27 19:30:16 EDT 2017

Merge "highbd_quantize_fp_32x32: normalize abs_qcoeff type"

--- a/vp9/encoder/vp9_quantize.c
+++ b/vp9/encoder/vp9_quantize.c
@@ -138,7 +138,7 @@
 
   if (!skip_block) {
     for (i = 0; i < n_coeffs; i++) {
-      uint32_t abs_qcoeff = 0;
+      int abs_qcoeff = 0;
       const int rc = scan[i];
       const int coeff = coeff_ptr[rc];
       const int coeff_sign = (coeff >> 31);
@@ -147,7 +147,7 @@
       if (abs_coeff >= (dequant_ptr[rc != 0] >> 2)) {
         const int64_t tmp =
             abs_coeff + ROUND_POWER_OF_TWO(round_ptr[rc != 0], 1);
-        abs_qcoeff = (uint32_t)((tmp * quant_ptr[rc != 0]) >> 15);
+        abs_qcoeff = (int)((tmp * quant_ptr[rc != 0]) >> 15);
         qcoeff_ptr[rc] = (tran_low_t)((abs_qcoeff ^ coeff_sign) - coeff_sign);
         dqcoeff_ptr[rc] = qcoeff_ptr[rc] * dequant_ptr[rc != 0] / 2;
       }