dsp: initialize VP8PredChroma8 in VP8DspInit()

the table becomes non-const to allow for platform-specific optimizations

Change-Id: I32d2b51480020dc653ecfafd20b6b0f096af349f
This commit is contained in:
James Zern 2014-11-24 21:03:33 -08:00
parent e0c809ad23
commit e18571393d
2 changed files with 10 additions and 5 deletions

View File

@ -463,10 +463,7 @@ const VP8PredFunc VP8PredLuma16[NUM_B_DC_MODES] = {
DC16NoTop, DC16NoLeft, DC16NoTopLeft DC16NoTop, DC16NoLeft, DC16NoTopLeft
}; };
const VP8PredFunc VP8PredChroma8[NUM_B_DC_MODES] = { VP8PredFunc VP8PredChroma8[NUM_B_DC_MODES];
DC8uv, TM8uv, VE8uv, HE8uv,
DC8uvNoTop, DC8uvNoLeft, DC8uvNoTopLeft
};
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Edge filtering functions // Edge filtering functions
@ -721,6 +718,14 @@ WEBP_TSAN_IGNORE_FUNCTION void VP8DspInit(void) {
VP8PredLuma4[8] = HD4; VP8PredLuma4[8] = HD4;
VP8PredLuma4[9] = HU4; VP8PredLuma4[9] = HU4;
VP8PredChroma8[0] = DC8uv;
VP8PredChroma8[1] = TM8uv;
VP8PredChroma8[2] = VE8uv;
VP8PredChroma8[3] = HE8uv;
VP8PredChroma8[4] = DC8uvNoTop;
VP8PredChroma8[5] = DC8uvNoLeft;
VP8PredChroma8[6] = DC8uvNoTopLeft;
// If defined, use CPUInfo() to overwrite some pointers with faster versions. // If defined, use CPUInfo() to overwrite some pointers with faster versions.
if (VP8GetCPUInfo != NULL) { if (VP8GetCPUInfo != NULL) {
#if defined(WEBP_USE_SSE2) #if defined(WEBP_USE_SSE2)

View File

@ -176,7 +176,7 @@ extern VP8WHT VP8TransformWHT;
// assumed accessible when needed. // assumed accessible when needed.
typedef void (*VP8PredFunc)(uint8_t* dst); typedef void (*VP8PredFunc)(uint8_t* dst);
extern const VP8PredFunc VP8PredLuma16[/* NUM_B_DC_MODES */]; extern const VP8PredFunc VP8PredLuma16[/* NUM_B_DC_MODES */];
extern const VP8PredFunc VP8PredChroma8[/* NUM_B_DC_MODES */]; extern VP8PredFunc VP8PredChroma8[/* NUM_B_DC_MODES */];
extern VP8PredFunc VP8PredLuma4[/* NUM_BMODES */]; extern VP8PredFunc VP8PredLuma4[/* NUM_BMODES */];
// clipping tables (for filtering) // clipping tables (for filtering)