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…