#include <pixeldevice.h>
Public Member Functions | |
| NativePixelDevice (const Context *context, const unsigned int threadIndex, const unsigned int devIndex) | |
| ~NativePixelDevice () | |
| void | Init (const unsigned int w, const unsigned int h) |
| void | ClearFrameBuffer () |
| void | ClearSampleFrameBuffer () |
| void | SetGamma (const float gamma=2.2f) |
| void | Start () |
| void | Interrupt () |
| void | Stop () |
| SampleBuffer * | GetFreeSampleBuffer () |
| void | FreeSampleBuffer (SampleBuffer *sampleBuffer) |
| void | AddSampleBuffer (const FilterType type, SampleBuffer *sampleBuffer) |
| void | Merge (const SampleFrameBuffer *sfb) |
| const SampleFrameBuffer * | GetSampleFrameBuffer () const |
| void | UpdateFrameBuffer (const ToneMapParams ¶ms) |
| const FrameBuffer * | GetFrameBuffer () const |
| unsigned int | GetFreeDevBufferCount () |
| unsigned int | GetTotalDevBufferCount () |
Static Public Attributes | |
| static size_t | SampleBufferSize = 4096 |
Private Member Functions | |
| void | SplatPreview (const SampleBufferElem *sampleElem) |
| void | SplatFiltered (const SampleBufferElem *sampleElem) |
| void | SplatRadiance (const Spectrum radiance, const unsigned int x, const unsigned int y, const float weight=1.f) |
| float | Radiance2PixelFloat (const float x) const |
Private Attributes | |
| boost::mutex | splatMutex |
| SampleFrameBuffer * | sampleFrameBuffer |
| FrameBuffer * | frameBuffer |
| std::vector< SampleBuffer * > | sampleBuffers |
| std::deque< SampleBuffer * > | freeSampleBuffers |
| float | gammaTable [GammaTableSize] |
| Filter * | filter |
| FilterLUTs * | filterLUTs |
Static Private Attributes | |
| static const unsigned int | GammaTableSize = 1024 |
Friends | |
| class | Context |
Definition at line 130 of file pixeldevice.h.
| NativePixelDevice::NativePixelDevice | ( | const Context * | context, | |
| const unsigned int | threadIndex, | |||
| const unsigned int | devIndex | |||
| ) |
Definition at line 35 of file nativepdevice.cpp.
References luxrays::Device::deviceName, filter, filterLUTs, frameBuffer, freeSampleBuffers, sampleBuffers, sampleFrameBuffer, and SetGamma().
| NativePixelDevice::~NativePixelDevice | ( | ) |
Definition at line 55 of file nativepdevice.cpp.
References filter, filterLUTs, frameBuffer, sampleBuffers, sampleFrameBuffer, luxrays::Device::started, and Stop().
| void NativePixelDevice::AddSampleBuffer | ( | const FilterType | type, | |
| SampleBuffer * | sampleBuffer | |||
| ) | [virtual] |
Implements luxrays::PixelDevice.
Definition at line 186 of file nativepdevice.cpp.
References luxrays::FILTER_GAUSSIAN, luxrays::FILTER_NONE, luxrays::FILTER_PREVIEW, freeSampleBuffers, luxrays::SampleBuffer::GetSampleBuffer(), luxrays::SampleBuffer::GetSampleCount(), luxrays::SampleBufferElem::radiance, luxrays::SampleBufferElem::screenX, luxrays::SampleBufferElem::screenY, SplatFiltered(), splatMutex, SplatPreview(), SplatRadiance(), luxrays::Device::started, luxrays::PixelDevice::statsTotalSamplesCount, luxrays::PixelDevice::statsTotalSampleTime, and luxrays::WallClockTime().
| void NativePixelDevice::ClearFrameBuffer | ( | ) | [virtual] |
Implements luxrays::PixelDevice.
Definition at line 86 of file nativepdevice.cpp.
References luxrays::FrameBuffer::Clear(), and frameBuffer.
| void NativePixelDevice::ClearSampleFrameBuffer | ( | ) | [virtual] |
Implements luxrays::PixelDevice.
Definition at line 82 of file nativepdevice.cpp.
References luxrays::SampleFrameBuffer::Clear(), and sampleFrameBuffer.
| void NativePixelDevice::FreeSampleBuffer | ( | SampleBuffer * | sampleBuffer | ) | [virtual] |
Implements luxrays::PixelDevice.
Definition at line 132 of file nativepdevice.cpp.
References freeSampleBuffers, and splatMutex.
| const FrameBuffer* luxrays::NativePixelDevice::GetFrameBuffer | ( | ) | const [inline, virtual] |
Implements luxrays::PixelDevice.
Definition at line 153 of file pixeldevice.h.
References frameBuffer.
| unsigned int luxrays::NativePixelDevice::GetFreeDevBufferCount | ( | ) | [inline] |
Definition at line 155 of file pixeldevice.h.
References freeSampleBuffers, and splatMutex.
| SampleBuffer * NativePixelDevice::GetFreeSampleBuffer | ( | ) | [virtual] |
Implements luxrays::PixelDevice.
Definition at line 112 of file nativepdevice.cpp.
References freeSampleBuffers, luxrays::SampleBuffer::Reset(), sampleBuffers, SampleBufferSize, and splatMutex.
| const SampleFrameBuffer * NativePixelDevice::GetSampleFrameBuffer | ( | ) | const [virtual] |
Implements luxrays::PixelDevice.
Definition at line 324 of file nativepdevice.cpp.
References sampleFrameBuffer.
| unsigned int luxrays::NativePixelDevice::GetTotalDevBufferCount | ( | ) | [inline] |
Definition at line 160 of file pixeldevice.h.
References sampleBuffers, and splatMutex.
| void NativePixelDevice::Init | ( | const unsigned int | w, | |
| const unsigned int | h | |||
| ) | [virtual] |
Reimplemented from luxrays::PixelDevice.
Definition at line 69 of file nativepdevice.cpp.
References luxrays::FrameBuffer::Clear(), luxrays::SampleFrameBuffer::Clear(), frameBuffer, luxrays::PixelDevice::height, sampleFrameBuffer, and luxrays::PixelDevice::width.
| void NativePixelDevice::Interrupt | ( | ) | [virtual] |
Implements luxrays::Device.
Definition at line 102 of file nativepdevice.cpp.
References splatMutex, and luxrays::Device::started.
| void NativePixelDevice::Merge | ( | const SampleFrameBuffer * | sfb | ) | [virtual] |
Implements luxrays::PixelDevice.
Definition at line 311 of file nativepdevice.cpp.
References luxrays::SampleFrameBuffer::GetPixel(), luxrays::PixelDevice::height, luxrays::SamplePixel::radiance, sampleFrameBuffer, splatMutex, luxrays::SamplePixel::weight, and luxrays::PixelDevice::width.
| float luxrays::NativePixelDevice::Radiance2PixelFloat | ( | const float | x | ) | const [inline, private] |
Definition at line 184 of file pixeldevice.h.
References luxrays::Clamp(), gammaTable, and GammaTableSize.
Referenced by UpdateFrameBuffer().
| void NativePixelDevice::SetGamma | ( | const float | gamma = 2.2f |
) | [virtual] |
Implements luxrays::PixelDevice.
Definition at line 90 of file nativepdevice.cpp.
References luxrays::Clamp(), gammaTable, and GammaTableSize.
Referenced by NativePixelDevice().
| void NativePixelDevice::SplatFiltered | ( | const SampleBufferElem * | sampleElem | ) | [private] |
Definition at line 156 of file nativepdevice.cpp.
References luxrays::Ceil2Int(), filter, filterLUTs, luxrays::FilterLUT::GetHeight(), luxrays::FilterLUT::GetLUT(), luxrays::FilterLUTs::GetLUT(), luxrays::FilterLUT::GetWidth(), luxrays::PixelDevice::height, luxrays::SampleBufferElem::radiance, luxrays::SampleBufferElem::screenX, luxrays::SampleBufferElem::screenY, SplatRadiance(), luxrays::PixelDevice::width, luxrays::Filter::xWidth, and luxrays::Filter::yWidth.
Referenced by AddSampleBuffer().
| void NativePixelDevice::SplatPreview | ( | const SampleBufferElem * | sampleElem | ) | [private] |
Definition at line 138 of file nativepdevice.cpp.
References luxrays::Ceil2Int(), luxrays::Floor2Int(), luxrays::PixelDevice::height, luxrays::SampleBufferElem::radiance, luxrays::SampleBufferElem::screenX, luxrays::SampleBufferElem::screenY, SplatRadiance(), and luxrays::PixelDevice::width.
Referenced by AddSampleBuffer().
| void luxrays::NativePixelDevice::SplatRadiance | ( | const Spectrum | radiance, | |
| const unsigned int | x, | |||
| const unsigned int | y, | |||
| const float | weight = 1.f | |||
| ) | [inline, private] |
Definition at line 176 of file pixeldevice.h.
References luxrays::SampleFrameBuffer::GetPixels(), luxrays::SamplePixel::radiance, sampleFrameBuffer, luxrays::SamplePixel::weight, and luxrays::PixelDevice::width.
Referenced by AddSampleBuffer(), SplatFiltered(), and SplatPreview().
| void NativePixelDevice::Start | ( | ) | [virtual] |
Reimplemented from luxrays::PixelDevice.
Definition at line 97 of file nativepdevice.cpp.
References splatMutex.
| void NativePixelDevice::Stop | ( | ) | [virtual] |
Reimplemented from luxrays::Device.
Definition at line 107 of file nativepdevice.cpp.
References splatMutex.
Referenced by ~NativePixelDevice().
| void NativePixelDevice::UpdateFrameBuffer | ( | const ToneMapParams & | params | ) | [virtual] |
Implements luxrays::PixelDevice.
Definition at line 225 of file nativepdevice.cpp.
References luxrays::Spectrum::b, luxrays::Reinhard02ToneMapParams::burn, frameBuffer, luxrays::Spectrum::g, luxrays::FrameBuffer::GetPixels(), luxrays::SampleFrameBuffer::GetPixels(), luxrays::ToneMapParams::GetType(), luxrays::PixelDevice::height, luxrays::Reinhard02ToneMapParams::postScale, luxrays::Reinhard02ToneMapParams::preScale, luxrays::Spectrum::r, luxrays::SamplePixel::radiance, Radiance2PixelFloat(), sampleFrameBuffer, luxrays::LinearToneMapParams::scale, splatMutex, luxrays::TONEMAP_LINEAR, luxrays::TONEMAP_REINHARD02, luxrays::SamplePixel::weight, and luxrays::PixelDevice::width.
friend class Context [friend] |
Reimplemented from luxrays::PixelDevice.
Definition at line 168 of file pixeldevice.h.
Filter* luxrays::NativePixelDevice::filter [private] |
Definition at line 206 of file pixeldevice.h.
Referenced by NativePixelDevice(), SplatFiltered(), and ~NativePixelDevice().
FilterLUTs* luxrays::NativePixelDevice::filterLUTs [private] |
Definition at line 207 of file pixeldevice.h.
Referenced by NativePixelDevice(), SplatFiltered(), and ~NativePixelDevice().
Definition at line 199 of file pixeldevice.h.
Referenced by ClearFrameBuffer(), GetFrameBuffer(), Init(), NativePixelDevice(), UpdateFrameBuffer(), and ~NativePixelDevice().
std::deque<SampleBuffer *> luxrays::NativePixelDevice::freeSampleBuffers [private] |
Definition at line 202 of file pixeldevice.h.
Referenced by AddSampleBuffer(), FreeSampleBuffer(), GetFreeDevBufferCount(), GetFreeSampleBuffer(), and NativePixelDevice().
float luxrays::NativePixelDevice::gammaTable[GammaTableSize] [private] |
Definition at line 204 of file pixeldevice.h.
Referenced by Radiance2PixelFloat(), and SetGamma().
const unsigned int luxrays::NativePixelDevice::GammaTableSize = 1024 [static, private] |
Definition at line 171 of file pixeldevice.h.
Referenced by Radiance2PixelFloat(), and SetGamma().
std::vector<SampleBuffer *> luxrays::NativePixelDevice::sampleBuffers [private] |
Definition at line 201 of file pixeldevice.h.
Referenced by GetFreeSampleBuffer(), GetTotalDevBufferCount(), NativePixelDevice(), and ~NativePixelDevice().
size_t NativePixelDevice::SampleBufferSize = 4096 [static] |
Definition at line 166 of file pixeldevice.h.
Referenced by GetFreeSampleBuffer().
Definition at line 198 of file pixeldevice.h.
Referenced by ClearSampleFrameBuffer(), GetSampleFrameBuffer(), Init(), Merge(), NativePixelDevice(), SplatRadiance(), UpdateFrameBuffer(), and ~NativePixelDevice().
boost::mutex luxrays::NativePixelDevice::splatMutex [private] |
Definition at line 197 of file pixeldevice.h.
Referenced by AddSampleBuffer(), FreeSampleBuffer(), GetFreeDevBufferCount(), GetFreeSampleBuffer(), GetTotalDevBufferCount(), Interrupt(), Merge(), Start(), Stop(), and UpdateFrameBuffer().
1.6.3