Skip to content

Add an API to target a given file-size or PSNR #22

@skal65535

Description

@skal65535

(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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions