Thanks to CPallini, who gave me a good hint, I came up with this function if anyone is interested. (This is first, rough code, but it produced exactly what I was looking for):
void scaleXLn(std::vector<double>& data, std::vector<double>& result)
{
size_t oldSize = data.size();
size_t newSize = log((double)oldSize);
++newSize; result.resize(newSize, 0.0);
size_t leftIdx = 0;
for (int i=newSize - 1; i>=0; --i)
{
size_t rightIdx = i ? oldSize - exp(i) : oldSize - 1;
double wxSum = 0.0f;
double avg = 0.0f;
for (size_t j = leftIdx; j<=rightIdx; ++j)
{
double wx = 1.0f/log(oldSize - j + 1);
wxSum += wx;
avg += wx*data[j];
}
result[newSize - i - 1] = avg/wxSum;
leftIdx = rightIdx + 1;
}
}