-
Notifications
You must be signed in to change notification settings - Fork 16
Description
(opening this 'issue' as a vague reminder for an interesting TODO)
Similar to WebP API[1], it would useful to have an inner loop that dichotomizes toward
a given, user-specified, target for PSNR or file-size.
Compared to an external script that would dichotomize on -quality, there's some savings to be had by not re-doing histogram collection or sample import for instance. Also the gradient descent could alternate trellis & adaptive-quantization (right now, the trellis pass is somewhat sub-optimal because there's no update pass on the Huffman codes).
Agreed, PSNR is not the ultimate metric to aim for, but targeting PSNR>40dB is usually a good threshold for lot of practical purpose.
[1] https://developers.google.com/speed/webp/docs/api#advanced_encoding_api