From cf821c821fd459db1560ba8d2f3e63398366c98d Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 14 Mar 2014 11:18:52 -0700 Subject: [PATCH] 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 --- src/enc/histogram.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/enc/histogram.c b/src/enc/histogram.c index 03deaaaa..d5296fa5 100644 --- a/src/enc/histogram.c +++ b/src/enc/histogram.c @@ -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);