]> granicus.if.org Git - libvpx/commitdiff
Add pointer conversion for HBD buffers
authorYaowu Xu <yaowu@google.com>
Mon, 1 Aug 2016 22:56:43 +0000 (15:56 -0700)
committerYaowu Xu <yaowu@google.com>
Mon, 1 Aug 2016 22:56:43 +0000 (15:56 -0700)
This fixes a crash in HBD build.

Change-Id: I7f688f50227323e69bba65df0d56f4360f01771b

vp9/encoder/vp9_firstpass.c

index 081ac4e8f7b889c3be210cd7059a34327199a515..0f05c95bb4d0378675fd7a97569ad9d2335f64e6 100644 (file)
@@ -668,11 +668,11 @@ static int fp_highbd_estimate_point_noise(uint8_t *src_ptr, const int stride) {
     // Update the source value with the new filtered value
     dn_val =  (sum_val + (sum_weight >> 1)) / sum_weight;
   else
-    dn_val = *src_ptr;
+    dn_val = *CONVERT_TO_SHORTPTR(src_ptr);
 
   // return the noise energy as the square of the difference between the
   // denoised and raw value.
-  dn_diff = (int)*src_ptr - (int)dn_val;
+  dn_diff = (int)(*CONVERT_TO_SHORTPTR(src_ptr)) - (int)dn_val;
   return dn_diff * dn_diff;
 }
 #endif