diff --git a/src/dec/dsp.c b/src/dec/dsp.c index a64a9be7..2737cb47 100644 --- a/src/dec/dsp.c +++ b/src/dec/dsp.c @@ -468,16 +468,16 @@ static void DC8uvNoTopLeft(uint8_t *dst) { // DC with nothing //----------------------------------------------------------------------------- // default C implementations -VP8PredFunc VP8PredLuma4[11] = { +VP8PredFunc VP8PredLuma4[NUM_BMODES] = { DC4, TM4, VE4, HE4, RD4, VR4, LD4, VL4, HD4, HU4 }; -VP8PredFunc VP8PredLuma16[7] = { +VP8PredFunc VP8PredLuma16[NUM_B_DC_MODES] = { DC16, TM16, VE16, HE16, DC16NoTop, DC16NoLeft, DC16NoTopLeft }; -VP8PredFunc VP8PredChroma8[7] = { +VP8PredFunc VP8PredChroma8[NUM_B_DC_MODES] = { DC8uv, TM8uv, VE8uv, HE8uv, DC8uvNoTop, DC8uvNoLeft, DC8uvNoTopLeft }; diff --git a/src/dec/vp8i.h b/src/dec/vp8i.h index 9d774a61..9cfee043 100644 --- a/src/dec/vp8i.h +++ b/src/dec/vp8i.h @@ -45,7 +45,8 @@ enum { B_DC_PRED = 0, // 4x4 modes // special modes B_DC_PRED_NOTOP = 4, B_DC_PRED_NOLEFT = 5, - B_DC_PRED_NOTOPLEFT = 6 }; + B_DC_PRED_NOTOPLEFT = 6, + NUM_B_DC_MODES = 7 }; enum { MB_FEATURE_TREE_PROBS = 3, NUM_MB_SEGMENTS = 4, @@ -279,9 +280,9 @@ extern void (*VP8TransformWHT)(const int16_t* in, int16_t* out); // *dst is the destination block, with stride BPS. Boundary samples are // assumed accessible when needed. typedef void (*VP8PredFunc)(uint8_t *dst); -extern VP8PredFunc VP8PredLuma16[7]; -extern VP8PredFunc VP8PredChroma8[7]; -extern VP8PredFunc VP8PredLuma4[11]; +extern VP8PredFunc VP8PredLuma16[NUM_B_DC_MODES]; +extern VP8PredFunc VP8PredChroma8[NUM_B_DC_MODES]; +extern VP8PredFunc VP8PredLuma4[NUM_BMODES]; void VP8DspInit(); // must be called before anything using the above void VP8DspInitTables(); // needs to be called no matter what.