mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-16 05:49:51 +02:00
Evaluate output cluster's bit_costs once in HistogramRefine.
Avoid bit_costs evaluated every time in function HistogramDistance. Also moved VP8LInitBackwardRefs and VP8LClearBackwardRefs to backward_references.h Change-Id: Id507f164d0fc64480aebc4a3ea3e6950ed377a60
This commit is contained in:
@ -154,20 +154,6 @@ static int VP8LEncAnalyze(VP8LEncoder* const enc) {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
static void VP8LInitBackwardRefs(VP8LBackwardRefs* const refs) {
|
||||
if (refs != NULL) {
|
||||
refs->refs = NULL;
|
||||
refs->size = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void VP8LClearBackwardRefs(VP8LBackwardRefs* const refs) {
|
||||
if (refs != NULL) {
|
||||
free(refs->refs);
|
||||
VP8LInitBackwardRefs(refs);
|
||||
}
|
||||
}
|
||||
|
||||
static int GetBackwardReferences(int width, int height,
|
||||
const uint32_t* argb,
|
||||
int quality, int use_color_cache,
|
||||
|
Reference in New Issue
Block a user