mcpp index

compat.libwebp

#include

WebP image codec: encode + decode + sharpyuv, built from upstream sources

#include <webp/decode.h>
mcpp add compat.libwebp@1.5.0

Usage

From this repository's own test project — built and run by CI, not written for the website.

// Behavioral test: encode a synthetic image and decode it back.
//
// Linking is not the interesting question for this package — the source list is
// five directory globs including every SIMD variant, and a variant that failed
// to self-gate would still LINK while producing wrong pixels. So the assertions
// are on the pixels: lossless must round-trip exactly, lossy must stay close,
// and the encoder must actually respond to its quality knob.
#include <webp/decode.h>
#include <webp/encode.h>

#include <cassert>
#include <cstdint>
#include <cstdlib>
#include <vector>

namespace {

constexpr int kW = 64;
constexpr int kH = 48;

// A gradient with a hard edge: smooth enough for the lossy path to do well,
// structured enough that a broken transform shows up as a large delta.
// …

tests/examples/libwebp/tests/roundtrip.cpp · project tests/examples/libwebp

Build

targets
webp (lib)
language
c++23
C standard
c11
import std
no
include dirs
*, */src, mcpp_generated

Sources (5)

  • */src/dec/*.c
  • */src/enc/*.c
  • */src/dsp/*.c
  • */src/utils/*.c
  • */sharpyuv/*.c

Generated files

  • mcpp_generated/src/webp/config.h

Versions

VersionPlatforms Mirrorssha256
1.5.0 latest LinuxWindowsmacOS GLOBAL CN 668c9aba4556…