export raw histogram data

This commit is contained in:
Claude Heiland-Allen
2023-12-05 11:18:40 +00:00
parent 6ef145e76e
commit a7b4cc70d6
10 changed files with 122 additions and 6 deletions

View File

@ -1137,6 +1137,25 @@ eRenderStatus Renderer<T, bucketT>::AccumulatorToFinalImage(vector<v4F>& pixels,
return eRenderStatus::RENDER_ERROR;
}
if (RawHistogram())
{
auto p = pixels.data() + finalOffset;
auto q = m_AccumulatorBuckets.data();
auto bytes = sizeof(*p) * FinalRasW();
parallel_for(size_t(0), FinalRasH(), size_t(1), [&](size_t j)
{
auto pixelsRowStart = (m_YAxisUp ? ((FinalRasH() - j) - 1) : j) * FinalRasW();//Pull out of inner loop for optimization.
auto rowStart = j * m_SuperRasW;
memcpy(p + pixelsRowStart, q + rowStart, bytes);
}
#if defined(_WIN32) || defined(__APPLE__)
, tbb::static_partitioner()
#endif
);
LeaveFinalAccum();
return m_Abort ? eRenderStatus::RENDER_ABORT : eRenderStatus::RENDER_OK;
}
//Timing t(4);
const size_t filterWidth = m_SpatialFilter->FinalFilterWidth();
bucketT g, linRange, vibrancy;