mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-14 21:09:55 +02:00
1.5x-2x faster encoding for method 3 and up
using token-buffer (that is: slightly more memory. O(output_size)) This change is ON by default. To return to previous behaviour, use 'cwebp -low_memory' or set config.low_memory to true. Side-effect of this new mode: it forces 1 partition only (which was default anyway), and makes some statistics about the bitstream no longer available. cwebp will no longer report 'intra4-coeffs', etc. This mode also doesn't work (yet) with multi-pass, and -low_memory is currently forced for multi-pass. also: reversed the flag: USE_TOKEN_BUFFER -> DISABLE_TOKEN_BUFFER also: fixed the kAverageBytesPerMB estimate Change-Id: I4ea80382038d6df4309663e0cb7bd88d9bca9cf1
This commit is contained in:
@ -18,7 +18,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define WEBP_ENCODER_ABI_VERSION 0x0200 // MAJOR(8b) + MINOR(8b)
|
||||
#define WEBP_ENCODER_ABI_VERSION 0x0201 // MAJOR(8b) + MINOR(8b)
|
||||
|
||||
#if !(defined(__cplusplus) || defined(c_plusplus))
|
||||
typedef enum WebPImageHint WebPImageHint;
|
||||
@ -126,8 +126,9 @@ struct WebPConfig {
|
||||
// JPEG compression. Generally, the output size will
|
||||
// be similar but the degradation will be lower.
|
||||
int thread_level; // If non-zero, try and use multi-threaded encoding.
|
||||
int low_memory; // If set, reduce memory usage (but increase CPU use).
|
||||
|
||||
uint32_t pad[6]; // padding for later use
|
||||
uint32_t pad[5]; // padding for later use
|
||||
};
|
||||
|
||||
// Enumerate some predefined settings for WebPConfig, depending on the type
|
||||
|
Reference in New Issue
Block a user