ref: bf30ae3ad654e3f21d2bdacd76f6bcc5d635e40c
parent: 1d0dedf75921c894895e6674993ba5fd4516b7e2
author: Jingning Han <jingning@google.com>
date: Tue Apr 30 06:36:54 EDT 2019
Fix the use of uninitialized value in qsort Search within the effective transform coefficient window. Change-Id: If432eaab5ffca1cdfe57ee23052bf5dc60a2f893
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -4912,7 +4912,7 @@
coeff[0] = 0;
for (idx = 1; idx < coeff_count; ++idx) coeff[idx] = abs(coeff[idx]);
- qsort(coeff, coeff_count, sizeof(*coeff), qsort_comp);
+ qsort(coeff, coeff_count - 1, sizeof(*coeff), qsort_comp);
// Noise level estimation
median_val = coeff[coeff_count / 2];