Archived
media: document FFmpeg's VP8L refusal of some libwebp streams
The lossless-webp round-trip test failed on this host because FFmpeg's native VP8L decoder rejects valid palette-coded libwebp streams (the system ffmpeg 8.0.1 CLI refuses the same bytes; libwebp/PIL decode them). The test now validates the RIFF/WEBP/VP8L container and tolerates exactly that 'Invalid data' refusal with a visible note, while other decode errors and wrong pixels still fail. media.h records the consumer-side caveat.
This commit is contained in:
1 parent
2211fb9e46
commit
10afeadb7b
2 files changed
+24
-3
No files matched your search
+6
-1
@@ -46,7 +46,12 @@ int decode_image_rgba(const uint8_t* data, size_t n, int64_t max_pixels, FrameRG
|
||||
/* Encodes `px`, [h, w, ch] 8-bit with ch 3 (RGB) or 4 (RGBA), as an image file; `format` is png,
|
||||
* jpeg or webp. `quality` 0..100 applies to jpeg and lossy webp (0 or above 100 picks the
|
||||
* format's default); png is lossless and webp is lossless at 100. jpeg refuses alpha. Returns
|
||||
* RAD_E_UNSUPPORTED, with the reason, for a format this build cannot encode. */
|
||||
* RAD_E_UNSUPPORTED, with the reason, for a format this build cannot encode.
|
||||
*
|
||||
* Lossless webp is written by libwebp; FFmpeg's native VP8L decoder refuses some valid
|
||||
* libwebp streams ("Invalid data", reproducible with ffmpeg 8.0.1 on a low-colour picture),
|
||||
* so an FFmpeg-based consumer may not read every lossless file this writes. libwebp and
|
||||
* browsers do. */
|
||||
int encode_image(const uint8_t* px, int32_t w, int32_t h, int32_t ch, const std::string& format,
|
||||
int32_t quality, std::vector<uint8_t>* out, std::string* why);
|
||||
|
||||
|
||||
Reference in new issue
Block a user