mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
WebPPicture: clarify the ownership of user-owned data.
It's explicitly safe (and recommended!) to plug external data into the pic->y/u/v/argb fields. They are guaranteed to be preserved by the encoding process if no conversion is needed. Change-Id: I325ca41a6a834f7f028431c605dddef67e9542cc
This commit is contained in:
parent
cccf5e337a
commit
2e7bed7925
@ -292,6 +292,11 @@ typedef enum WebPEncodingError {
|
|||||||
#define WEBP_MAX_DIMENSION 16383
|
#define WEBP_MAX_DIMENSION 16383
|
||||||
|
|
||||||
// Main exchange structure (input samples, output bytes, statistics)
|
// Main exchange structure (input samples, output bytes, statistics)
|
||||||
|
//
|
||||||
|
// Once WebPPictureInit() has been called, it's ok to make all the INPUT fields
|
||||||
|
// (use_argb, y/u/v, argb, ...) point to user-owned data, even if
|
||||||
|
// WebPPictureAlloc() has been called. Depending on the value use_argb,
|
||||||
|
// it's guaranteed that either *argb or *y/*u/*v content will be kept untouched.
|
||||||
struct WebPPicture {
|
struct WebPPicture {
|
||||||
// INPUT
|
// INPUT
|
||||||
//////////////
|
//////////////
|
||||||
|
Loading…
Reference in New Issue
Block a user