ref: 545c4d75d84e7e805a2e0acc5061be14468649a8
parent: 8743cdd4462fc9fef67acd9a75570b3146af8b80
parent: bf30ae3ad654e3f21d2bdacd76f6bcc5d635e40c
author: Angie Chiang <angiebird@google.com>
date: Thu May 2 14:44:13 EDT 2019
Merge "Fix the use of uninitialized value in qsort"
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -4920,7 +4920,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];