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:
@@ -48,6 +48,7 @@ int WebPConfigInitInternal(WebPConfig* config,
|
||||
config->image_hint = WEBP_HINT_DEFAULT;
|
||||
config->emulate_jpeg_size = 0;
|
||||
config->thread_level = 0;
|
||||
config->low_memory = 0;
|
||||
|
||||
// TODO(skal): tune.
|
||||
switch (preset) {
|
||||
@@ -128,6 +129,8 @@ int WebPValidateConfig(const WebPConfig* config) {
|
||||
return 0;
|
||||
if (config->thread_level < 0 || config->thread_level > 1)
|
||||
return 0;
|
||||
if (config->low_memory < 0 || config->low_memory > 1)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user