shithub: libvpx

Download patch

ref: 0670c7ad8f3e788e90816f07f8f68bbbffdea3f6
parent: 4161a55f7fba3d157226cff119fcbe401159fba1
parent: 3e2c6e2a63092630656c21ab9727454300bb6cef
author: Jingning Han <[email protected]>
date: Wed Mar 20 17:31:21 EDT 2019

Merge "Properly reset memory in hbd setting"

--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -4746,13 +4746,16 @@
 
 #if CONFIG_VP9_HIGHBITDEPTH
   xd->cur_buf = cpi->Source;
-  if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH)
+  if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
     zero_pred = CONVERT_TO_BYTEPTR(zero_pred16);
-  else
+    memset(zero_pred16, 0, sizeof(*zero_pred16) * coeff_count);
+  } else {
     zero_pred = zero_pred8;
-#endif
-
+    memset(zero_pred8, 0, sizeof(*zero_pred8) * coeff_count);
+  }
+#else
   memset(zero_pred, 0, sizeof(*zero_pred) * coeff_count);
+#endif
 
   cpi->norm_wiener_variance = 0;