move VP8EncDspARGBInit() call closer to where it's needed

Change-Id: I0d5121b456918f0ee6646903a8d71d4384deafe3
This commit is contained in:
Pascal Massimino 2014-12-23 16:04:14 +01:00
parent 7ce8788b06
commit 1f4b8642e8
2 changed files with 2 additions and 1 deletions

View File

@ -39,7 +39,6 @@ int WebPPictureInitInternal(WebPPicture* picture, int version) {
memset(picture, 0, sizeof(*picture)); memset(picture, 0, sizeof(*picture));
picture->writer = DummyWriter; picture->writer = DummyWriter;
WebPEncodingSetError(picture, VP8_ENC_OK); WebPEncodingSetError(picture, VP8_ENC_OK);
VP8EncDspARGBInit();
} }
return 1; return 1;
} }

View File

@ -1060,6 +1060,8 @@ static int Import(WebPPicture* const picture,
} }
if (!WebPPictureAlloc(picture)) return 0; if (!WebPPictureAlloc(picture)) return 0;
VP8EncDspARGBInit();
assert(step >= (import_alpha ? 4 : 3)); assert(step >= (import_alpha ? 4 : 3));
if (import_alpha) { if (import_alpha) {
for (y = 0; y < height; ++y) { for (y = 0; y < height; ++y) {