[x265] [PATCH] optimize and remove Pow() in processRowEncoder() to avoid VS2008 build error 'ambiguous...'
Derek Buitenhuis
derek.buitenhuis at gmail.com
Thu Jul 3 21:00:31 CEST 2014
On 7/3/2014 7:40 PM, Min Chen wrote:
> - double scale = pow((double)2, g_maxCUSize / 16);
> + static const uint32_t scaleTable[] = {2, 4, 16};
> + uint32_t scaleIndex = (g_convertToBit[g_maxCUSize] + 2 - 4);
> + double scale = (double)scaleTable[scaleIndex];
> + X265_CHECK(pow((double)2, (int)(g_maxCUSize >> 4)) == scale, "Failed on scale!\n");
Any reason you cant just use 1<<N ?
- Derek
More information about the x265-devel
mailing list