mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 06:24:27 +02:00
Add image-hint for low-color images.
For low-color images, it may be better to not use color-palettes. Users should treat this as one another hint (as with Photo & Picture) and another parameter for tuning the compression density. The optimum compression can still be obtained by running (outer loop) compression with all possible tunable parameters. Change-Id: Icb1a4face2a84774e16e801aee4a8ae97e232e8a
This commit is contained in:
@ -141,7 +141,7 @@ static int VP8LEncAnalyze(VP8LEncoder* const enc, WebPImageHint image_hint) {
|
||||
const WebPPicture* const pic = enc->pic_;
|
||||
assert(pic != NULL && pic->argb != NULL);
|
||||
|
||||
enc->use_palette_ =
|
||||
enc->use_palette_ = (image_hint == WEBP_HINT_GRAPH) ? 0 :
|
||||
AnalyzeAndCreatePalette(pic, enc->palette_, &enc->palette_size_);
|
||||
if (!enc->use_palette_) {
|
||||
if (image_hint == WEBP_HINT_DEFAULT) {
|
||||
@ -162,7 +162,6 @@ static int VP8LEncAnalyze(VP8LEncoder* const enc, WebPImageHint image_hint) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static int GetHuffBitLengthsAndCodes(
|
||||
const VP8LHistogramSet* const histogram_image,
|
||||
HuffmanTreeCode* const huffman_codes) {
|
||||
|
Reference in New Issue
Block a user