mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-20 04:18:26 +01:00
Remove handling for WEBP_HINT_GRAPH
Remove handling for WEBP_HINT_GRAPH w.r.t use_palette flag. The WEBP_HINT_GRAPH is now used at one place, to set the initial size of the Bit Writer as bpp for photo images are generally larger than the graphical images. Change-Id: I1b9c4436c85a8f69da74c0dbcd292397323f2696
This commit is contained in:
parent
413dfc0c4b
commit
a0df55104e
@ -27,7 +27,6 @@
|
||||
#define PALETTE_KEY_RIGHT_SHIFT 22 // Key for 1K buffer.
|
||||
// Maximum number of histogram images (sub-blocks).
|
||||
#define MAX_HUFF_IMAGE_SIZE 2600
|
||||
#define MAX_COLORS_FOR_GRAPH 64
|
||||
|
||||
#define OPTIMIZE_MIN_NUM_COLORS 8
|
||||
|
||||
@ -312,13 +311,6 @@ static int AnalyzeAndInit(VP8LEncoder* const enc, WebPImageHint image_hint) {
|
||||
enc->use_palette_ =
|
||||
AnalyzeAndCreatePalette(pic, enc->palette_, &enc->palette_size_);
|
||||
|
||||
// TODO(vikasa): Evaluate and update/remove the handling for hint=GRAPH.
|
||||
if (image_hint == WEBP_HINT_GRAPH) {
|
||||
if (enc->use_palette_ && enc->palette_size_ < MAX_COLORS_FOR_GRAPH) {
|
||||
enc->use_palette_ = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (!enc->use_palette_ ||
|
||||
EvalSubtractGreenForPalette(enc->palette_size_, quality)) {
|
||||
if (!AnalyzeSubtractGreen(pic->argb, width, height,
|
||||
|
Loading…
Reference in New Issue
Block a user