multi-threaded alpha encoding for lossy

new option: 'cwebp -mt ...'
new config flag: config.thread_level
(allowed thread_level are 0 or 1 for now. Maybe more later...)
If -mt is activated (and WEBP_USE_THREAD is used for compile), the alpha-compression
will be done in parallel to RGB coding for lossy. Can save quite a bit of latency...
Has no effect for lossless encoding.

Change-Id: I769d0bf90e7380cf99344ad62cd77277f4df5a46
This commit is contained in:
skal
2013-03-01 01:21:34 +01:00
parent 72655350ea
commit f817930a55
9 changed files with 96 additions and 33 deletions

View File

@ -125,8 +125,9 @@ struct WebPConfig {
// to better match the expected output size from
// 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.
uint32_t pad[7]; // padding for later use
uint32_t pad[6]; // padding for later use
};
// Enumerate some predefined settings for WebPConfig, depending on the type