Commit 2ee81fec authored by Jingning Han's avatar Jingning Han

Fix num_4x4_blk scale in var-tx and cb4x4 mode

This resolves an out-of-boundary memory access issue in the encoding

Change-Id: I9363f5a5a012880289e3370f66507126c609a41f
parent 6ae7564b
......@@ -30,7 +30,12 @@ static void alloc_mode_context(AV1_COMMON *cm, int num_4x4_blk,
const int num_blk = (num_4x4_blk < 4 ? 4 : num_4x4_blk);
const int num_pix = num_blk * tx_size_2d[0];
int i;
ctx->num_4x4_blk = num_blk / 4;
ctx->num_4x4_blk = num_blk;
ctx->partition = partition;
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