fix MSVC float->int conversion warning

+ add a clarifying comment

Change-Id: I8ac1df1de2e5277f2d968dec489546e680bb5e0c
This commit is contained in:
Pascal Massimino 2014-09-27 00:36:01 -07:00
parent 35ad48b848
commit 47a2d8e1d9

View File

@ -965,7 +965,8 @@ int VP8LGetHistoImageSymbols(int xsize, int ysize,
{
const float x = quality / 100.f;
const int threshold_size = 1 + (x * x * x) * (MAX_HISTO_GREEDY - 1);
// cubic ramp between 1 and MAX_HISTO_GREEDY:
const int threshold_size = (int)(1 + (x * x * x) * (MAX_HISTO_GREEDY - 1));
HistogramCombineStochastic(image_histo, histos, quality, threshold_size);
if ((image_histo->size <= threshold_size) &&
!HistogramCombineGreedy(image_histo, histos->histograms[0])) {