implemented conversions between internal pixel formats

This commit is contained in:
itsmattkc
2019-08-12 18:24:52 +10:00
parent eca8d98497
commit 3eee9893f8
6 changed files with 236 additions and 1 deletions
+20
View File
@@ -0,0 +1,20 @@
#include "colorservice.h"
const int kRGBAChannels = 4;
ColorService::ColorService()
{
}
void ColorService::ConvertFrame(FramePtr f)
{
OCIO::ConstConfigRcPtr config = OCIO::GetCurrentConfig();
OCIO::ConstProcessorRcPtr processor = config->getProcessor("srgb",
OCIO::ROLE_SCENE_LINEAR);
OCIO::PackedImageDesc img(reinterpret_cast<float*>(f->data()), f->width(), f->height(), kRGBAChannels);
processor->apply(img);
}