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

用法

来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。

// 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 · 项目 tests/examples/libwebp

构建

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

源文件 (5)

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

生成的文件

  • mcpp_generated/src/webp/config.h

版本

版本平台 镜像sha256
1.5.0 最新 LinuxWindowsmacOS GLOBAL CN 668c9aba4556…