From 1f4b8642e8d7fc75c2f32c9fdc6996bbf27bce19 Mon Sep 17 00:00:00 2001 From: Pascal Massimino Date: Tue, 23 Dec 2014 16:04:14 +0100 Subject: [PATCH] move VP8EncDspARGBInit() call closer to where it's needed Change-Id: I0d5121b456918f0ee6646903a8d71d4384deafe3 --- src/enc/picture.c | 1 - src/enc/picture_csp.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/enc/picture.c b/src/enc/picture.c index e1e72c74..26679a72 100644 --- a/src/enc/picture.c +++ b/src/enc/picture.c @@ -39,7 +39,6 @@ int WebPPictureInitInternal(WebPPicture* picture, int version) { memset(picture, 0, sizeof(*picture)); picture->writer = DummyWriter; WebPEncodingSetError(picture, VP8_ENC_OK); - VP8EncDspARGBInit(); } return 1; } diff --git a/src/enc/picture_csp.c b/src/enc/picture_csp.c index 5a1f8de8..4524953c 100644 --- a/src/enc/picture_csp.c +++ b/src/enc/picture_csp.c @@ -1060,6 +1060,8 @@ static int Import(WebPPicture* const picture, } if (!WebPPictureAlloc(picture)) return 0; + VP8EncDspARGBInit(); + assert(step >= (import_alpha ? 4 : 3)); if (import_alpha) { for (y = 0; y < height; ++y) {