OLD | NEW |
1 // Copyright 2011 Google Inc. All Rights Reserved. | 1 // Copyright 2011 Google Inc. All Rights Reserved. |
2 // | 2 // |
3 // Use of this source code is governed by a BSD-style license | 3 // Use of this source code is governed by a BSD-style license |
4 // that can be found in the COPYING file in the root of the source | 4 // that can be found in the COPYING file in the root of the source |
5 // tree. An additional intellectual property rights grant can be found | 5 // tree. An additional intellectual property rights grant can be found |
6 // in the file PATENTS. All contributing project authors may | 6 // in the file PATENTS. All contributing project authors may |
7 // be found in the AUTHORS file in the root of the source tree. | 7 // be found in the AUTHORS file in the root of the source tree. |
8 // ----------------------------------------------------------------------------- | 8 // ----------------------------------------------------------------------------- |
9 // | 9 // |
10 // WebP encoder: main interface | 10 // WebP encoder: main interface |
11 // | 11 // |
12 // Author: Skal (pascal.massimino@gmail.com) | 12 // Author: Skal (pascal.massimino@gmail.com) |
13 | 13 |
14 #ifndef WEBP_WEBP_ENCODE_H_ | 14 #ifndef WEBP_WEBP_ENCODE_H_ |
15 #define WEBP_WEBP_ENCODE_H_ | 15 #define WEBP_WEBP_ENCODE_H_ |
16 | 16 |
17 #include "./types.h" | 17 #include "./types.h" |
18 | 18 |
19 #ifdef __cplusplus | 19 #ifdef __cplusplus |
20 extern "C" { | 20 extern "C" { |
21 #endif | 21 #endif |
22 | 22 |
23 #define WEBP_ENCODER_ABI_VERSION 0x0202 // MAJOR(8b) + MINOR(8b) | 23 #define WEBP_ENCODER_ABI_VERSION 0x0209 // MAJOR(8b) + MINOR(8b) |
24 | 24 |
25 // Note: forward declaring enumerations is not allowed in (strict) C and C++, | 25 // Note: forward declaring enumerations is not allowed in (strict) C and C++, |
26 // the types are left here for reference. | 26 // the types are left here for reference. |
27 // typedef enum WebPImageHint WebPImageHint; | 27 // typedef enum WebPImageHint WebPImageHint; |
28 // typedef enum WebPEncCSP WebPEncCSP; | 28 // typedef enum WebPEncCSP WebPEncCSP; |
29 // typedef enum WebPPreset WebPPreset; | 29 // typedef enum WebPPreset WebPPreset; |
30 // typedef enum WebPEncodingError WebPEncodingError; | 30 // typedef enum WebPEncodingError WebPEncodingError; |
31 typedef struct WebPConfig WebPConfig; | 31 typedef struct WebPConfig WebPConfig; |
32 typedef struct WebPPicture WebPPicture; // main structure for I/O | 32 typedef struct WebPPicture WebPPicture; // main structure for I/O |
33 typedef struct WebPAuxStats WebPAuxStats; | 33 typedef struct WebPAuxStats WebPAuxStats; |
34 typedef struct WebPMemoryWriter WebPMemoryWriter; | 34 typedef struct WebPMemoryWriter WebPMemoryWriter; |
35 | 35 |
36 // Return the encoder's version number, packed in hexadecimal using 8bits for | 36 // Return the encoder's version number, packed in hexadecimal using 8bits for |
37 // each of major/minor/revision. E.g: v2.5.7 is 0x020507. | 37 // each of major/minor/revision. E.g: v2.5.7 is 0x020507. |
38 WEBP_EXTERN(int) WebPGetEncoderVersion(void); | 38 WEBP_EXTERN(int) WebPGetEncoderVersion(void); |
39 | 39 |
40 //------------------------------------------------------------------------------ | 40 //------------------------------------------------------------------------------ |
41 // One-stop-shop call! No questions asked: | 41 // One-stop-shop call! No questions asked: |
42 | 42 |
43 // Returns the size of the compressed data (pointed to by *output), or 0 if | 43 // Returns the size of the compressed data (pointed to by *output), or 0 if |
44 // an error occurred. The compressed data must be released by the caller | 44 // an error occurred. The compressed data must be released by the caller |
45 // using the call 'free(*output)'. | 45 // using the call 'WebPFree(*output)'. |
46 // These functions compress using the lossy format, and the quality_factor | 46 // These functions compress using the lossy format, and the quality_factor |
47 // can go from 0 (smaller output, lower quality) to 100 (best quality, | 47 // can go from 0 (smaller output, lower quality) to 100 (best quality, |
48 // larger output). | 48 // larger output). |
49 WEBP_EXTERN(size_t) WebPEncodeRGB(const uint8_t* rgb, | 49 WEBP_EXTERN(size_t) WebPEncodeRGB(const uint8_t* rgb, |
50 int width, int height, int stride, | 50 int width, int height, int stride, |
51 float quality_factor, uint8_t** output); | 51 float quality_factor, uint8_t** output); |
52 WEBP_EXTERN(size_t) WebPEncodeBGR(const uint8_t* bgr, | 52 WEBP_EXTERN(size_t) WebPEncodeBGR(const uint8_t* bgr, |
53 int width, int height, int stride, | 53 int width, int height, int stride, |
54 float quality_factor, uint8_t** output); | 54 float quality_factor, uint8_t** output); |
55 WEBP_EXTERN(size_t) WebPEncodeRGBA(const uint8_t* rgba, | 55 WEBP_EXTERN(size_t) WebPEncodeRGBA(const uint8_t* rgba, |
(...skipping 12 matching lines...) Expand all Loading... |
68 WEBP_EXTERN(size_t) WebPEncodeLosslessBGR(const uint8_t* bgr, | 68 WEBP_EXTERN(size_t) WebPEncodeLosslessBGR(const uint8_t* bgr, |
69 int width, int height, int stride, | 69 int width, int height, int stride, |
70 uint8_t** output); | 70 uint8_t** output); |
71 WEBP_EXTERN(size_t) WebPEncodeLosslessRGBA(const uint8_t* rgba, | 71 WEBP_EXTERN(size_t) WebPEncodeLosslessRGBA(const uint8_t* rgba, |
72 int width, int height, int stride, | 72 int width, int height, int stride, |
73 uint8_t** output); | 73 uint8_t** output); |
74 WEBP_EXTERN(size_t) WebPEncodeLosslessBGRA(const uint8_t* bgra, | 74 WEBP_EXTERN(size_t) WebPEncodeLosslessBGRA(const uint8_t* bgra, |
75 int width, int height, int stride, | 75 int width, int height, int stride, |
76 uint8_t** output); | 76 uint8_t** output); |
77 | 77 |
| 78 // Releases memory returned by the WebPEncode*() functions above. |
| 79 WEBP_EXTERN(void) WebPFree(void* ptr); |
| 80 |
78 //------------------------------------------------------------------------------ | 81 //------------------------------------------------------------------------------ |
79 // Coding parameters | 82 // Coding parameters |
80 | 83 |
81 // Image characteristics hint for the underlying encoder. | 84 // Image characteristics hint for the underlying encoder. |
82 typedef enum WebPImageHint { | 85 typedef enum WebPImageHint { |
83 WEBP_HINT_DEFAULT = 0, // default preset. | 86 WEBP_HINT_DEFAULT = 0, // default preset. |
84 WEBP_HINT_PICTURE, // digital picture, like portrait, inner shot | 87 WEBP_HINT_PICTURE, // digital picture, like portrait, inner shot |
85 WEBP_HINT_PHOTO, // outdoor photograph, with natural lighting | 88 WEBP_HINT_PHOTO, // outdoor photograph, with natural lighting |
86 WEBP_HINT_GRAPH, // Discrete tone image (graph, map-tile etc). | 89 WEBP_HINT_GRAPH, // Discrete tone image (graph, map-tile etc). |
87 WEBP_HINT_LAST | 90 WEBP_HINT_LAST |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 int partition_limit; // quality degradation allowed to fit the 512k limit | 127 int partition_limit; // quality degradation allowed to fit the 512k limit |
125 // on prediction modes coding (0: no degradation, | 128 // on prediction modes coding (0: no degradation, |
126 // 100: maximum possible degradation). | 129 // 100: maximum possible degradation). |
127 int emulate_jpeg_size; // If true, compression parameters will be remapped | 130 int emulate_jpeg_size; // If true, compression parameters will be remapped |
128 // to better match the expected output size from | 131 // to better match the expected output size from |
129 // JPEG compression. Generally, the output size will | 132 // JPEG compression. Generally, the output size will |
130 // be similar but the degradation will be lower. | 133 // be similar but the degradation will be lower. |
131 int thread_level; // If non-zero, try and use multi-threaded encoding. | 134 int thread_level; // If non-zero, try and use multi-threaded encoding. |
132 int low_memory; // If set, reduce memory usage (but increase CPU use). | 135 int low_memory; // If set, reduce memory usage (but increase CPU use). |
133 | 136 |
134 uint32_t pad[5]; // padding for later use | 137 int near_lossless; // Near lossless encoding [0 = off(default) .. 100]. |
| 138 // This feature is experimental. |
| 139 int exact; // if non-zero, preserve the exact RGB values under |
| 140 // transparent area. Otherwise, discard this invisible |
| 141 // RGB information for better compression. The default |
| 142 // value is 0. |
| 143 |
| 144 #ifdef WEBP_EXPERIMENTAL_FEATURES |
| 145 int delta_palettization; |
| 146 uint32_t pad[2]; // padding for later use |
| 147 #else |
| 148 uint32_t pad[3]; // padding for later use |
| 149 #endif // WEBP_EXPERIMENTAL_FEATURES |
135 }; | 150 }; |
136 | 151 |
137 // Enumerate some predefined settings for WebPConfig, depending on the type | 152 // Enumerate some predefined settings for WebPConfig, depending on the type |
138 // of source picture. These presets are used when calling WebPConfigPreset(). | 153 // of source picture. These presets are used when calling WebPConfigPreset(). |
139 typedef enum WebPPreset { | 154 typedef enum WebPPreset { |
140 WEBP_PRESET_DEFAULT = 0, // default preset. | 155 WEBP_PRESET_DEFAULT = 0, // default preset. |
141 WEBP_PRESET_PICTURE, // digital picture, like portrait, inner shot | 156 WEBP_PRESET_PICTURE, // digital picture, like portrait, inner shot |
142 WEBP_PRESET_PHOTO, // outdoor photograph, with natural lighting | 157 WEBP_PRESET_PHOTO, // outdoor photograph, with natural lighting |
143 WEBP_PRESET_DRAWING, // hand or line drawing, with high-contrast details | 158 WEBP_PRESET_DRAWING, // hand or line drawing, with high-contrast details |
144 WEBP_PRESET_ICON, // small-sized colorful images | 159 WEBP_PRESET_ICON, // small-sized colorful images |
(...skipping 15 matching lines...) Expand all Loading... |
160 // This function will initialize the configuration according to a predefined | 175 // This function will initialize the configuration according to a predefined |
161 // set of parameters (referred to by 'preset') and a given quality factor. | 176 // set of parameters (referred to by 'preset') and a given quality factor. |
162 // This function can be called as a replacement to WebPConfigInit(). Will | 177 // This function can be called as a replacement to WebPConfigInit(). Will |
163 // return false in case of error. | 178 // return false in case of error. |
164 static WEBP_INLINE int WebPConfigPreset(WebPConfig* config, | 179 static WEBP_INLINE int WebPConfigPreset(WebPConfig* config, |
165 WebPPreset preset, float quality) { | 180 WebPPreset preset, float quality) { |
166 return WebPConfigInitInternal(config, preset, quality, | 181 return WebPConfigInitInternal(config, preset, quality, |
167 WEBP_ENCODER_ABI_VERSION); | 182 WEBP_ENCODER_ABI_VERSION); |
168 } | 183 } |
169 | 184 |
170 #if WEBP_ENCODER_ABI_VERSION > 0x0202 | |
171 // Activate the lossless compression mode with the desired efficiency level | 185 // Activate the lossless compression mode with the desired efficiency level |
172 // between 0 (fastest, lowest compression) and 9 (slower, best compression). | 186 // between 0 (fastest, lowest compression) and 9 (slower, best compression). |
173 // A good default level is '6', providing a fair tradeoff between compression | 187 // A good default level is '6', providing a fair tradeoff between compression |
174 // speed and final compressed size. | 188 // speed and final compressed size. |
175 // This function will overwrite several fields from config: 'method', 'quality' | 189 // This function will overwrite several fields from config: 'method', 'quality' |
176 // and 'lossless'. Returns false in case of parameter error. | 190 // and 'lossless'. Returns false in case of parameter error. |
177 WEBP_EXTERN(int) WebPConfigLosslessPreset(WebPConfig* config, int level); | 191 WEBP_EXTERN(int) WebPConfigLosslessPreset(WebPConfig* config, int level); |
178 #endif | |
179 | 192 |
180 // Returns true if 'config' is non-NULL and all configuration parameters are | 193 // Returns true if 'config' is non-NULL and all configuration parameters are |
181 // within their valid ranges. | 194 // within their valid ranges. |
182 WEBP_EXTERN(int) WebPValidateConfig(const WebPConfig* config); | 195 WEBP_EXTERN(int) WebPValidateConfig(const WebPConfig* config); |
183 | 196 |
184 //------------------------------------------------------------------------------ | 197 //------------------------------------------------------------------------------ |
185 // Input / Output | 198 // Input / Output |
186 // Structure for storing auxiliary statistics (mostly for lossy encoding). | 199 // Structure for storing auxiliary statistics (mostly for lossy encoding). |
187 | 200 |
188 struct WebPAuxStats { | 201 struct WebPAuxStats { |
(...skipping 13 matching lines...) Expand all Loading... |
202 int layer_data_size; // size of the enhancement layer data | 215 int layer_data_size; // size of the enhancement layer data |
203 | 216 |
204 // lossless encoder statistics | 217 // lossless encoder statistics |
205 uint32_t lossless_features; // bit0:predictor bit1:cross-color transform | 218 uint32_t lossless_features; // bit0:predictor bit1:cross-color transform |
206 // bit2:subtract-green bit3:color indexing | 219 // bit2:subtract-green bit3:color indexing |
207 int histogram_bits; // number of precision bits of histogram | 220 int histogram_bits; // number of precision bits of histogram |
208 int transform_bits; // precision bits for transform | 221 int transform_bits; // precision bits for transform |
209 int cache_bits; // number of bits for color cache lookup | 222 int cache_bits; // number of bits for color cache lookup |
210 int palette_size; // number of color in palette, if used | 223 int palette_size; // number of color in palette, if used |
211 int lossless_size; // final lossless size | 224 int lossless_size; // final lossless size |
| 225 int lossless_hdr_size; // lossless header (transform, huffman etc) size |
| 226 int lossless_data_size; // lossless image data size |
212 | 227 |
213 uint32_t pad[4]; // padding for later use | 228 uint32_t pad[2]; // padding for later use |
214 }; | 229 }; |
215 | 230 |
216 // Signature for output function. Should return true if writing was successful. | 231 // Signature for output function. Should return true if writing was successful. |
217 // data/data_size is the segment of data to write, and 'picture' is for | 232 // data/data_size is the segment of data to write, and 'picture' is for |
218 // reference (and so one can make use of picture->custom_ptr). | 233 // reference (and so one can make use of picture->custom_ptr). |
219 typedef int (*WebPWriterFunction)(const uint8_t* data, size_t data_size, | 234 typedef int (*WebPWriterFunction)(const uint8_t* data, size_t data_size, |
220 const WebPPicture* picture); | 235 const WebPPicture* picture); |
221 | 236 |
222 // WebPMemoryWrite: a special WebPWriterFunction that writes to memory using | 237 // WebPMemoryWrite: a special WebPWriterFunction that writes to memory using |
223 // the following WebPMemoryWriter object (to be set as a custom_ptr). | 238 // the following WebPMemoryWriter object (to be set as a custom_ptr). |
224 struct WebPMemoryWriter { | 239 struct WebPMemoryWriter { |
225 uint8_t* mem; // final buffer (of size 'max_size', larger than 'size'). | 240 uint8_t* mem; // final buffer (of size 'max_size', larger than 'size'). |
226 size_t size; // final size | 241 size_t size; // final size |
227 size_t max_size; // total capacity | 242 size_t max_size; // total capacity |
228 uint32_t pad[1]; // padding for later use | 243 uint32_t pad[1]; // padding for later use |
229 }; | 244 }; |
230 | 245 |
231 // The following must be called first before any use. | 246 // The following must be called first before any use. |
232 WEBP_EXTERN(void) WebPMemoryWriterInit(WebPMemoryWriter* writer); | 247 WEBP_EXTERN(void) WebPMemoryWriterInit(WebPMemoryWriter* writer); |
233 | 248 |
234 #if WEBP_ENCODER_ABI_VERSION > 0x0203 | |
235 // The following must be called to deallocate writer->mem memory. The 'writer' | 249 // The following must be called to deallocate writer->mem memory. The 'writer' |
236 // object itself is not deallocated. | 250 // object itself is not deallocated. |
237 WEBP_EXTERN(void) WebPMemoryWriterClear(WebPMemoryWriter* writer); | 251 WEBP_EXTERN(void) WebPMemoryWriterClear(WebPMemoryWriter* writer); |
238 #endif | |
239 // The custom writer to be used with WebPMemoryWriter as custom_ptr. Upon | 252 // The custom writer to be used with WebPMemoryWriter as custom_ptr. Upon |
240 // completion, writer.mem and writer.size will hold the coded data. | 253 // completion, writer.mem and writer.size will hold the coded data. |
241 #if WEBP_ENCODER_ABI_VERSION > 0x0203 | |
242 // writer.mem must be freed by calling WebPMemoryWriterClear. | 254 // writer.mem must be freed by calling WebPMemoryWriterClear. |
243 #else | |
244 // writer.mem must be freed by calling 'free(writer.mem)'. | |
245 #endif | |
246 WEBP_EXTERN(int) WebPMemoryWrite(const uint8_t* data, size_t data_size, | 255 WEBP_EXTERN(int) WebPMemoryWrite(const uint8_t* data, size_t data_size, |
247 const WebPPicture* picture); | 256 const WebPPicture* picture); |
248 | 257 |
249 // Progress hook, called from time to time to report progress. It can return | 258 // Progress hook, called from time to time to report progress. It can return |
250 // false to request an abort of the encoding process, or true otherwise if | 259 // false to request an abort of the encoding process, or true otherwise if |
251 // everything is OK. | 260 // everything is OK. |
252 typedef int (*WebPProgressHook)(int percent, const WebPPicture* picture); | 261 typedef int (*WebPProgressHook)(int percent, const WebPPicture* picture); |
253 | 262 |
254 // Color spaces. | 263 // Color spaces. |
255 typedef enum WebPEncCSP { | 264 typedef enum WebPEncCSP { |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 // Besides memory (which is reclaimed) all other fields of 'picture' are | 381 // Besides memory (which is reclaimed) all other fields of 'picture' are |
373 // preserved. | 382 // preserved. |
374 WEBP_EXTERN(void) WebPPictureFree(WebPPicture* picture); | 383 WEBP_EXTERN(void) WebPPictureFree(WebPPicture* picture); |
375 | 384 |
376 // Copy the pixels of *src into *dst, using WebPPictureAlloc. Upon return, *dst | 385 // Copy the pixels of *src into *dst, using WebPPictureAlloc. Upon return, *dst |
377 // will fully own the copied pixels (this is not a view). The 'dst' picture need | 386 // will fully own the copied pixels (this is not a view). The 'dst' picture need |
378 // not be initialized as its content is overwritten. | 387 // not be initialized as its content is overwritten. |
379 // Returns false in case of memory allocation error. | 388 // Returns false in case of memory allocation error. |
380 WEBP_EXTERN(int) WebPPictureCopy(const WebPPicture* src, WebPPicture* dst); | 389 WEBP_EXTERN(int) WebPPictureCopy(const WebPPicture* src, WebPPicture* dst); |
381 | 390 |
382 // Compute PSNR, SSIM or LSIM distortion metric between two pictures. | 391 // Compute PSNR, SSIM or LSIM distortion metric between two pictures. Results |
383 // Result is in dB, stores in result[] in the Y/U/V/Alpha/All order. | 392 // are in dB, stored in result[] in the Y/U/V/Alpha/All or B/G/R/A/All order. |
384 // Returns false in case of error (src and ref don't have same dimension, ...) | 393 // Returns false in case of error (src and ref don't have same dimension, ...) |
385 // Warning: this function is rather CPU-intensive. | 394 // Warning: this function is rather CPU-intensive. |
386 WEBP_EXTERN(int) WebPPictureDistortion( | 395 WEBP_EXTERN(int) WebPPictureDistortion( |
387 const WebPPicture* src, const WebPPicture* ref, | 396 const WebPPicture* src, const WebPPicture* ref, |
388 int metric_type, // 0 = PSNR, 1 = SSIM, 2 = LSIM | 397 int metric_type, // 0 = PSNR, 1 = SSIM, 2 = LSIM |
389 float result[5]); | 398 float result[5]); |
390 | 399 |
391 // self-crops a picture to the rectangle defined by top/left/width/height. | 400 // self-crops a picture to the rectangle defined by top/left/width/height. |
392 // Returns false in case of memory allocation error, or if the rectangle is | 401 // Returns false in case of memory allocation error, or if the rectangle is |
393 // outside of the source picture. | 402 // outside of the source picture. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 WEBP_EXTERN(int) WebPPictureARGBToYUVA(WebPPicture* picture, | 466 WEBP_EXTERN(int) WebPPictureARGBToYUVA(WebPPicture* picture, |
458 WebPEncCSP /*colorspace = WEBP_YUV420*/); | 467 WebPEncCSP /*colorspace = WEBP_YUV420*/); |
459 | 468 |
460 // Same as WebPPictureARGBToYUVA(), but the conversion is done using | 469 // Same as WebPPictureARGBToYUVA(), but the conversion is done using |
461 // pseudo-random dithering with a strength 'dithering' between | 470 // pseudo-random dithering with a strength 'dithering' between |
462 // 0.0 (no dithering) and 1.0 (maximum dithering). This is useful | 471 // 0.0 (no dithering) and 1.0 (maximum dithering). This is useful |
463 // for photographic picture. | 472 // for photographic picture. |
464 WEBP_EXTERN(int) WebPPictureARGBToYUVADithered( | 473 WEBP_EXTERN(int) WebPPictureARGBToYUVADithered( |
465 WebPPicture* picture, WebPEncCSP colorspace, float dithering); | 474 WebPPicture* picture, WebPEncCSP colorspace, float dithering); |
466 | 475 |
467 #if WEBP_ENCODER_ABI_VERSION > 0x0204 | |
468 // Performs 'smart' RGBA->YUVA420 downsampling and colorspace conversion. | 476 // Performs 'smart' RGBA->YUVA420 downsampling and colorspace conversion. |
469 // Downsampling is handled with extra care in case of color clipping. This | 477 // Downsampling is handled with extra care in case of color clipping. This |
470 // method is roughly 2x slower than WebPPictureARGBToYUVA() but produces better | 478 // method is roughly 2x slower than WebPPictureARGBToYUVA() but produces better |
471 // YUV representation. | 479 // YUV representation. |
472 // Returns false in case of error. | 480 // Returns false in case of error. |
473 WEBP_EXTERN(int) WebPPictureSmartARGBToYUVA(WebPPicture* picture); | 481 WEBP_EXTERN(int) WebPPictureSmartARGBToYUVA(WebPPicture* picture); |
474 #endif | |
475 | 482 |
476 // Converts picture->yuv to picture->argb and sets picture->use_argb to true. | 483 // Converts picture->yuv to picture->argb and sets picture->use_argb to true. |
477 // The input format must be YUV_420 or YUV_420A. | 484 // The input format must be YUV_420 or YUV_420A. |
478 // Note that the use of this method is discouraged if one has access to the | 485 // Note that the use of this method is discouraged if one has access to the |
479 // raw ARGB samples, since using YUV420 is comparatively lossy. Also, the | 486 // raw ARGB samples, since using YUV420 is comparatively lossy. Also, the |
480 // conversion from YUV420 to ARGB incurs a small loss too. | 487 // conversion from YUV420 to ARGB incurs a small loss too. |
481 // Returns false in case of error. | 488 // Returns false in case of error. |
482 WEBP_EXTERN(int) WebPPictureYUVAToARGB(WebPPicture* picture); | 489 WEBP_EXTERN(int) WebPPictureYUVAToARGB(WebPPicture* picture); |
483 | 490 |
484 // Helper function: given a width x height plane of RGBA or YUV(A) samples | 491 // Helper function: given a width x height plane of RGBA or YUV(A) samples |
(...skipping 26 matching lines...) Expand all Loading... |
511 // another is provided but they both incur some loss. | 518 // another is provided but they both incur some loss. |
512 WEBP_EXTERN(int) WebPEncode(const WebPConfig* config, WebPPicture* picture); | 519 WEBP_EXTERN(int) WebPEncode(const WebPConfig* config, WebPPicture* picture); |
513 | 520 |
514 //------------------------------------------------------------------------------ | 521 //------------------------------------------------------------------------------ |
515 | 522 |
516 #ifdef __cplusplus | 523 #ifdef __cplusplus |
517 } // extern "C" | 524 } // extern "C" |
518 #endif | 525 #endif |
519 | 526 |
520 #endif /* WEBP_WEBP_ENCODE_H_ */ | 527 #endif /* WEBP_WEBP_ENCODE_H_ */ |
OLD | NEW |