a number of fixes to entropy stats collection

1. block types
There are only three types of blocks for 8x8 transformed MBs, i.e. Y
block with DC does not exist for 8x8 transformed MBs as all MB using
8x8 transform have 2nd order haar transform. This commit introduced
a new macro BLOCK_TYPES_8X8 to reflect such fact.

2. context counters
This commit also fixed the mixed of context_counters between 4x4 and
8x8 transformed MBs. The mixed use of the counters leads me to think
the existing the context probabilities were not properly generated
from 8x8 transformed MBs.

3. redundant collecting in recoding
The commit also corrected the code that accumulates entropy stats by
making sure stats only collected for final packing, not during the
recode loop

Change-Id: I029f09f8f60bd0c3240cc392ff5c6d05435e322c
This commit is contained in:
Yaowu Xu
2012-05-02 13:53:15 -07:00
parent 813c6c3925
commit 54cf1d9ad3
13 changed files with 85 additions and 322 deletions

View File

@@ -823,7 +823,7 @@ static void read_coef_probs3(VP8D_COMP *pbi)
if(pbi->common.txfm_mode == ALLOW_8X8)
{
for (i = 0; i < BLOCK_TYPES; i++)
for (i = 0; i < BLOCK_TYPES_8X8; i++)
for (l = 0; l < ENTROPY_NODES; l++)
{
if(vp8_read(bc, grpupd))
@@ -889,7 +889,7 @@ static void read_coef_probs2(VP8D_COMP *pbi)
{
if(vp8_read(bc, grpupd))
{
for (i = 0; i < BLOCK_TYPES; i++)
for (i = 0; i < BLOCK_TYPES_8X8; i++)
for (j = !i; j < COEF_BANDS; j++)
for (k = 0; k < PREV_COEF_CONTEXTS; k++)
{
@@ -961,7 +961,7 @@ static void read_coef_probs(VP8D_COMP *pbi)
if(pbi->common.txfm_mode == ALLOW_8X8 && vp8_read_bit(bc))
{
// read coef probability tree
for (i = 0; i < BLOCK_TYPES; i++)
for (i = 0; i < BLOCK_TYPES_8X8; i++)
#if CONFIG_NEWUPDATE
for (j = !i; j < COEF_BANDS; j++)
#else