godot/thirdparty/libwebp/src/enc/picture_enc.c

// Copyright 2011 Google Inc. All Rights Reserved.
//
// Use of this source code is governed by a BSD-style license
// that can be found in the COPYING file in the root of the source
// tree. An additional intellectual property rights grant can be found
// in the file PATENTS. All contributing project authors may
// be found in the AUTHORS file in the root of the source tree.
// -----------------------------------------------------------------------------
//
// WebPPicture class basis
//
// Author: Skal ([email protected])

#include <assert.h>
#include <limits.h>
#include <stdlib.h>

#include "src/enc/vp8i_enc.h"
#include "src/utils/utils.h"

//------------------------------------------------------------------------------
// WebPPicture
//------------------------------------------------------------------------------

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) {}

//------------------------------------------------------------------------------
// WebPMemoryWriter: Write-to-memory

void WebPMemoryWriterInit(WebPMemoryWriter* writer) {}

int WebPMemoryWrite(const uint8_t* data, size_t data_size,
                    const WebPPicture* picture) {}

void WebPMemoryWriterClear(WebPMemoryWriter* writer) {}

//------------------------------------------------------------------------------
// Simplest high-level calls:

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  // WEBP_REDUCE_CSP

#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  // WEBP_REDUCE_CSP

#undef LOSSLESS_ENCODE_FUNC

//------------------------------------------------------------------------------