Refactor reset_skip_context() to support 2x2 txfm block

Refactor to remove the assumption that transform block operates in
the unit of 4x4. This generalizes the codec to support 2x2 transform
block later.

Change-Id: If1448a915f5765d409394c914af68f44b0749bc2
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index 2f3e846..312d71c 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -846,10 +846,10 @@
   for (i = 0; i < MAX_MB_PLANE; i++) {
     struct macroblockd_plane *const pd = &xd->plane[i];
     const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
-    memset(pd->above_context, 0,
-           sizeof(ENTROPY_CONTEXT) * num_4x4_blocks_wide_lookup[plane_bsize]);
-    memset(pd->left_context, 0,
-           sizeof(ENTROPY_CONTEXT) * num_4x4_blocks_high_lookup[plane_bsize]);
+    const int txs_wide = block_size_wide[plane_bsize] >> tx_size_wide_log2[0];
+    const int txs_high = block_size_high[plane_bsize] >> tx_size_high_log2[0];
+    memset(pd->above_context, 0, sizeof(ENTROPY_CONTEXT) * txs_wide);
+    memset(pd->left_context, 0, sizeof(ENTROPY_CONTEXT) * txs_high);
   }
 }