Commit 339cf93b authored by Jingning Han's avatar Jingning Han
Browse files

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
parent 83c27ecd
......@@ -1599,6 +1599,8 @@ int av1_get_txb_entropy_context(const tran_low_t *qcoeff,
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]]);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment