Fix av1_get_txb_entropy_context check condition
Return 0 when eob is 0. It is possible that when eob is 0, the
fed in quantization matrix is uninitialized in the rate distortion
optimization process.
Change-Id: I2dcf558203bf60ba7332c6bf585a978f7c7309b5
diff --git a/av1/encoder/encodetxb.c b/av1/encoder/encodetxb.c
index 21c4cd6..1300578 100644
--- a/av1/encoder/encodetxb.c
+++ b/av1/encoder/encodetxb.c
@@ -1599,6 +1599,8 @@
const int16_t *scan = scan_order->scan;
int cul_level = 0;
int c;
+
+ if (eob == 0) return 0;
for (c = 0; c < eob; ++c) {
cul_level += abs(qcoeff[scan[c]]);
}