Skip to content
Snippets Groups Projects
Commit 0d9e3812 authored by Linfeng Zhang's avatar Linfeng Zhang
Browse files

Update table av1_nz_map_ctx_offset[]

When CONFIG_TX64X64 is ON, bwl could be 5 when real width is 64.
Read width from tx_size_wide[] instead from 1 << bwl.

Change-Id: If0a97a73f1dc90c3e9425ba20f7609f93eb705b9
parent 4a0463d5
No related branches found
No related tags found
2 merge requests!6Rav1e 11 yushin 1,!3Rav1e 10 yushin
......@@ -125,8 +125,8 @@ const int8_t av1_nz_map_ctx_offset[TX_SIZES_ALL][5][5] = {
{ 21, 21, 21, 21, 21 } },
#if CONFIG_TX64X64
// TX_64X64
{ { 0, 11, 11, 11, 11 },
{ 11, 11, 11, 11, 11 },
{ { 0, 1, 6, 6, 21 },
{ 1, 6, 6, 21, 21 },
{ 6, 6, 21, 21, 21 },
{ 6, 21, 21, 21, 21 },
{ 21, 21, 21, 21, 21 } },
......@@ -175,11 +175,11 @@ const int8_t av1_nz_map_ctx_offset[TX_SIZES_ALL][5][5] = {
{ 6, 21, 21, 21, 21 },
{ 21, 21, 21, 21, 21 } },
// TX_64X32
{ { 0, 1, 6, 6, 21 },
{ 1, 6, 6, 21, 21 },
{ 6, 6, 21, 21, 21 },
{ 6, 21, 21, 21, 21 },
{ 21, 21, 21, 21, 21 } },
{ { 0, 16, 6, 6, 21 },
{ 16, 16, 6, 21, 21 },
{ 16, 16, 21, 21, 21 },
{ 16, 16, 21, 21, 21 },
{ 16, 16, 21, 21, 21 } },
#endif // CONFIG_TX64X64
// TX_4X16
{ { 0, 11, 11, 11, 0 },
......
......@@ -498,7 +498,7 @@ static INLINE int get_nz_map_ctx_from_stats(
#if 0
// This is the algorithm to generate table av1_nz_map_ctx_offset[].
const int width = 1 << bwl;
const int width = tx_size_wide[tx_size];
const int height = tx_size_high[tx_size];
if (width < height) {
if (row < 2) return 11 + ctx;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment