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

// Copyright 2014 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 tools: alpha handling, etc.
//
// Author: Skal ([email protected])

#include <assert.h>

#include "src/enc/vp8i_enc.h"
#include "src/dsp/yuv.h"

//------------------------------------------------------------------------------
// Helper: clean up fully transparent area to help compressibility.

#define SIZE
#define SIZE2
static int IsTransparentARGBArea(const uint32_t* ptr, int stride, int size) {}

static void Flatten(uint8_t* ptr, int v, int stride, int size) {}

static void FlattenARGB(uint32_t* ptr, uint32_t v, int stride, int size) {}

// Smoothen the luma components of transparent pixels. Return true if the whole
// block is transparent.
static int SmoothenBlock(const uint8_t* a_ptr, int a_stride, uint8_t* y_ptr,
                         int y_stride, int width, int height) {}

void WebPReplaceTransparentPixels(WebPPicture* const pic, uint32_t color) {}

void WebPCleanupTransparentArea(WebPPicture* pic) {}

#undef SIZE
#undef SIZE2

//------------------------------------------------------------------------------
// Blend color and remove transparency info

#define BLEND
#define BLEND_10BIT

static WEBP_INLINE uint32_t MakeARGB32(int r, int g, int b) {}

void WebPBlendAlpha(WebPPicture* picture, uint32_t background_rgb) {}

#undef BLEND
#undef BLEND_10BIT

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