Commit b8decb03 authored by Jingning Han's avatar Jingning Han
Browse files

Fix bugs in sb8x8 experiment/context prob update

Fix bugs occur in contextual partition probability update, when
sb8x8 is enabled.

Change-Id: I19e2cec8a54c2dafd2be2803bbfde7337a2ae45f
parent 9b94f647
...@@ -453,7 +453,7 @@ typedef struct macroblockd { ...@@ -453,7 +453,7 @@ typedef struct macroblockd {
static INLINE void update_partition_context(MACROBLOCKD *xd, static INLINE void update_partition_context(MACROBLOCKD *xd,
BLOCK_SIZE_TYPE sb_type, BLOCK_SIZE_TYPE sb_type,
BLOCK_SIZE_TYPE sb_size) { BLOCK_SIZE_TYPE sb_size) {
int bsl = mi_width_log2(sb_size), bs = 1 << bsl; int bsl = mi_width_log2(sb_size), bs;
int bwl = mi_width_log2(sb_type); int bwl = mi_width_log2(sb_type);
int bhl = mi_height_log2(sb_type); int bhl = mi_height_log2(sb_type);
int boffset = mi_width_log2(BLOCK_SIZE_SB64X64) - bsl; int boffset = mi_width_log2(BLOCK_SIZE_SB64X64) - bsl;
...@@ -462,6 +462,12 @@ static INLINE void update_partition_context(MACROBLOCKD *xd, ...@@ -462,6 +462,12 @@ static INLINE void update_partition_context(MACROBLOCKD *xd,
if (bsl == 0) if (bsl == 0)
return; return;
#if CONFIG_SB8X8
bs = 1 << (bsl - 1);
#else
bs = 1 << bsl;
#endif
// update the partition context at the end notes. set partition bits // update the partition context at the end notes. set partition bits
// of block sizes larger than the current one to be one, and partition // of block sizes larger than the current one to be one, and partition
// bits of smaller block sizes to be zero. // bits of smaller block sizes to be zero.
......
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