#include <assert.h>
#include <limits.h>
#include <stdlib.h>
#include "src/enc/vp8i_enc.h"
#include "src/utils/utils.h"
static int DummyWriter(const uint8_t* data, size_t data_size,
const WebPPicture* const picture) { … }
int WebPPictureInitInternal(WebPPicture* picture, int version) { … }
int WebPValidatePicture(const WebPPicture* const picture) { … }
static void WebPPictureResetBufferARGB(WebPPicture* const picture) { … }
static void WebPPictureResetBufferYUVA(WebPPicture* const picture) { … }
void WebPPictureResetBuffers(WebPPicture* const picture) { … }
int WebPPictureAllocARGB(WebPPicture* const picture) { … }
int WebPPictureAllocYUVA(WebPPicture* const picture) { … }
int WebPPictureAlloc(WebPPicture* picture) { … }
void WebPPictureFree(WebPPicture* picture) { … }
void WebPMemoryWriterInit(WebPMemoryWriter* writer) { … }
int WebPMemoryWrite(const uint8_t* data, size_t data_size,
const WebPPicture* picture) { … }
void WebPMemoryWriterClear(WebPMemoryWriter* writer) { … }
Importer;
static size_t Encode(const uint8_t* rgba, int width, int height, int stride,
Importer import, float quality_factor, int lossless,
uint8_t** output) { … }
#define ENCODE_FUNC …
ENCODE_FUNC(WebPEncodeRGB, WebPPictureImportRGB)
ENCODE_FUNC(WebPEncodeRGBA, WebPPictureImportRGBA)
#if !defined(WEBP_REDUCE_CSP)
ENCODE_FUNC(WebPEncodeBGR, WebPPictureImportBGR)
ENCODE_FUNC(WebPEncodeBGRA, WebPPictureImportBGRA)
#endif
#undef ENCODE_FUNC
#define LOSSLESS_DEFAULT_QUALITY …
#define LOSSLESS_ENCODE_FUNC …
LOSSLESS_ENCODE_FUNC(WebPEncodeLosslessRGB, WebPPictureImportRGB)
LOSSLESS_ENCODE_FUNC(WebPEncodeLosslessRGBA, WebPPictureImportRGBA)
#if !defined(WEBP_REDUCE_CSP)
LOSSLESS_ENCODE_FUNC(WebPEncodeLosslessBGR, WebPPictureImportBGR)
LOSSLESS_ENCODE_FUNC(WebPEncodeLosslessBGRA, WebPPictureImportBGRA)
#endif
#undef LOSSLESS_ENCODE_FUNC