minor fix to eob check for setting CONTEXT

Previously, the "!=" check is logically incorrect when eob is at 0 and
effective coefficient starting position is 1. This commit should have
no effect on bitstream.

Change-Id: I6ce3a847c7e72bfbe4f7c74f88e3310c6b9b6d30
This commit is contained in:
Yaowu Xu
2012-11-28 17:34:02 -08:00
parent b2f27d909a
commit 7ab1d3e49f
4 changed files with 12 additions and 14 deletions

View File

@@ -539,8 +539,8 @@ static int cost_coeffs_2x2(MACROBLOCK *mb,
if (c < 4)
cost += mb->token_costs[TX_8X8][type][vp9_coef_bands[c]]
[pt] [DCT_EOB_TOKEN];
pt = (c != !type); // is eob first coefficient;
// is eob first coefficient;
pt = (c > !type);
*a = *l = pt;
return cost;
}
@@ -640,7 +640,8 @@ static int cost_coeffs(MACROBLOCK *mb, BLOCKD *b, PLANE_TYPE type,
[pt][DCT_EOB_TOKEN];
}
pt = (c != !type); // is eob first coefficient;
// is eob first coefficient;
pt = (c > !type);
*a = *l = pt;
return cost;
}