fix CheckMode() signature

should have been 'const VP8Decoder* const dec', but actually
we just need to pass mb_x_ and mb_y_

Change-Id: I21ca0d67ab33302d6eaa45698d53ed6c2de76981
This commit is contained in:
skal 2013-04-24 14:33:44 +02:00
parent 0ece07dcb1
commit 5da165cfad

View File

@ -534,12 +534,12 @@ static const int kScan[16] = {
0 + 12 * BPS, 4 + 12 * BPS, 8 + 12 * BPS, 12 + 12 * BPS 0 + 12 * BPS, 4 + 12 * BPS, 8 + 12 * BPS, 12 + 12 * BPS
}; };
static WEBP_INLINE int CheckMode(VP8Decoder* const dec, int mode) { static WEBP_INLINE int CheckMode(int mb_x, int mb_y, int mode) {
if (mode == B_DC_PRED) { if (mode == B_DC_PRED) {
if (dec->mb_x_ == 0) { if (mb_x == 0) {
return (dec->mb_y_ == 0) ? B_DC_PRED_NOTOPLEFT : B_DC_PRED_NOLEFT; return (mb_y == 0) ? B_DC_PRED_NOTOPLEFT : B_DC_PRED_NOLEFT;
} else { } else {
return (dec->mb_y_ == 0) ? B_DC_PRED_NOTOP : B_DC_PRED; return (mb_y == 0) ? B_DC_PRED_NOTOP : B_DC_PRED;
} }
} }
return mode; return mode;
@ -624,7 +624,7 @@ void VP8ReconstructBlock(VP8Decoder* const dec) {
} }
} }
} else { // 16x16 } else { // 16x16
const int pred_func = CheckMode(dec, dec->imodes_[0]); const int pred_func = CheckMode(dec->mb_x_, dec->mb_y_, dec->imodes_[0]);
VP8PredLuma16[pred_func](y_dst); VP8PredLuma16[pred_func](y_dst);
if (dec->non_zero_) { if (dec->non_zero_) {
for (n = 0; n < 16; n++) { for (n = 0; n < 16; n++) {
@ -639,7 +639,7 @@ void VP8ReconstructBlock(VP8Decoder* const dec) {
} }
{ {
// Chroma // Chroma
const int pred_func = CheckMode(dec, dec->uvmode_); const int pred_func = CheckMode(dec->mb_x_, dec->mb_y_, dec->uvmode_);
VP8PredChroma8[pred_func](u_dst); VP8PredChroma8[pred_func](u_dst);
VP8PredChroma8[pred_func](v_dst); VP8PredChroma8[pred_func](v_dst);