From 9a3823612abb8e6fa28508d270bfad64fbfa29a9 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Wed, 2 Nov 2022 05:04:28 +0300
Subject: [PATCH] IMG_webp: just manually inline WebPDemuxInternal(),
.. like we've already been doing with WebPGetFeaturesInternal().
---
IMG_webp.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/IMG_webp.c b/IMG_webp.c
index 8564e128..52889c29 100644
--- a/IMG_webp.c
+++ b/IMG_webp.c
@@ -47,10 +47,9 @@ static struct {
void *handle_libwebpdemux;
void *handle_libwebp;
VP8StatusCode (*WebPGetFeaturesInternal) (const uint8_t *data, size_t data_size, WebPBitstreamFeatures* features, int decoder_abi_version);
- uint8_t* (*WebPDecodeRGBInto) (const uint8_t* data, size_t data_size, uint8_t* output_buffer, size_t output_buffer_size, int output_stride);
- uint8_t* (*WebPDecodeRGBAInto) (const uint8_t* data, size_t data_size, uint8_t* output_buffer, size_t output_buffer_size, int output_stride);
- /* WebPDemux() is an inline in webp/demux.h calling WebPDemuxInternal(). */
- WebPDemuxer* (*WebPDemuxInternal)(const WebPData*, int, WebPDemuxState*, int);
+ uint8_t* (*WebPDecodeRGBInto) (const uint8_t* data, size_t data_size, uint8_t* output_buffer, size_t output_buffer_size, int output_stride);
+ uint8_t* (*WebPDecodeRGBAInto) (const uint8_t* data, size_t data_size, uint8_t* output_buffer, size_t output_buffer_size, int output_stride);
+ WebPDemuxer* (*WebPDemuxInternal)(const WebPData* data, int allow_partial, WebPDemuxState* state, int version);
int (*WebPDemuxGetFrame)(const WebPDemuxer* dmux, int frame_number, WebPIterator* iter);
uint32_t (*WebPDemuxGetI)(const WebPDemuxer* dmux, WebPFormatFeature feature);
void (*WebPDemuxDelete)(WebPDemuxer* dmux);
@@ -111,10 +110,6 @@ void IMG_QuitWEBP()
--lib.loaded;
}
-static SDL_INLINE WebPDemuxer* SDL_WebPDemux(const WebPData* data) {
- return lib.WebPDemuxInternal(data, 0, NULL, WEBP_DEMUX_ABI_VERSION);
-}
-
static int webp_getinfo (SDL_RWops *src, int *datasize) {
Sint64 start;
int is_WEBP;
@@ -341,7 +336,7 @@ IMG_Animation *IMG_LoadWEBPAnimation_RW(SDL_RWops *src)
wd.size = raw_data_size;
wd.bytes = raw_data;
- dmuxer = SDL_WebPDemux(&wd);
+ dmuxer = lib.WebPDemuxInternal(&wd, 0, NULL, WEBP_DEMUX_ABI_VERSION);
anim = (IMG_Animation *)SDL_malloc(sizeof(IMG_Animation));
anim->w = features.width;
anim->h = features.height;