[x265] [PATCH] optimize and remove Pow() in processRowEncoder() to avoid VS2008 build error 'ambiguous...'
chen
chenm003 at 163.com
Thu Jul 3 21:29:23 CEST 2014
At 2014-07-04 03:00:31,"Derek Buitenhuis" <derek.buitenhuis at gmail.com> wrote:
>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 ?
> In here, you need (1 << (1 << N)), it is more operators
More information about the x265-devel
mailing list