mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
UpdateHistogramCost: avoid implicit double->float
all the functions involved return double and later these locals are used in double calculations. fixes a vs build warning Change-Id: Idb547104ef00b48c71c124a774ef6f2ec5f30f14
This commit is contained in:
parent
1c58526fe1
commit
cf821c821f
@ -423,9 +423,10 @@ static void UpdateDominantCostRange(
|
||||
}
|
||||
|
||||
static void UpdateHistogramCost(VP8LHistogram* const h) {
|
||||
const float alpha_cost = PopulationCost(h->alpha_, 256);
|
||||
const float distance_cost = PopulationCost(h->distance_, NUM_DISTANCE_CODES) +
|
||||
ExtraCost(h->distance_, NUM_DISTANCE_CODES);
|
||||
const double alpha_cost = PopulationCost(h->alpha_, 256);
|
||||
const double distance_cost =
|
||||
PopulationCost(h->distance_, NUM_DISTANCE_CODES) +
|
||||
ExtraCost(h->distance_, NUM_DISTANCE_CODES);
|
||||
const int num_codes = VP8LHistogramNumCodes(h->palette_code_bits_);
|
||||
h->literal_cost_ = PopulationCost(h->literal_, num_codes) +
|
||||
ExtraCost(h->literal_ + 256, NUM_LENGTH_CODES);
|
||||
|
Loading…
Reference in New Issue
Block a user