Commit 4c6d4369 authored by Urvang Joshi's avatar Urvang Joshi

Handle tx64x64 correctly in get_entropy_contexts.

This unhandled case was causing an assertion failure.

BUG=aomedia:532

Change-Id: I46665c380ad171e2b9ddf4d41b6e9fff838f8b3e
parent a9bd85f7
......@@ -316,6 +316,14 @@ static INLINE int get_entropy_context(TX_SIZE tx_size, const ENTROPY_CONTEXT *a,
above_ec = !!(*(const uint64_t *)a | *(const uint64_t *)(a + 8));
left_ec = !!(*(const uint64_t *)l | *(const uint64_t *)(l + 8));
break;
#if CONFIG_TX64X64
case TX_64X64:
above_ec = !!(*(const uint64_t *)a | *(const uint64_t *)(a + 8) |
*(const uint64_t *)(a + 16) | *(const uint64_t *)(a + 24));
left_ec = !!(*(const uint64_t *)l | *(const uint64_t *)(l + 8) |
*(const uint64_t *)(l + 16) | *(const uint64_t *)(l + 24));
break;
#endif // CONFIG_TX64X64
default: assert(0 && "Invalid transform size."); break;
}
return combine_entropy_contexts(above_ec, left_ec);
......
......@@ -593,6 +593,20 @@ static void get_entropy_contexts_plane(
t_left[i] =
!!(*(const uint64_t *)&left[i] | *(const uint64_t *)&left[i + 8]);
break;
#if CONFIG_TX64X64
case TX_64X64:
for (i = 0; i < num_4x4_w; i += 32)
t_above[i] =
!!(*(const uint64_t *)&above[i] | *(const uint64_t *)&above[i + 8] |
*(const uint64_t *)&above[i + 16] |
*(const uint64_t *)&above[i + 24]);
for (i = 0; i < num_4x4_h; i += 32)
t_left[i] =
!!(*(const uint64_t *)&left[i] | *(const uint64_t *)&left[i + 8] |
*(const uint64_t *)&left[i + 16] |
*(const uint64_t *)&left[i + 24]);
break;
#endif // CONFIG_TX64X64
case TX_4X8:
for (i = 0; i < num_4x4_w; i += 2)
t_above[i] = !!*(const uint16_t *)&above[i];
......
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