merged 'localcontrast' into 'dev'

This commit is contained in:
Alberto Griggio
2017-12-20 23:16:28 +01:00
27 changed files with 645 additions and 7 deletions

View File

@@ -523,3 +523,45 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
DEMOSAIC // EvPixelShiftOneGreen
};
namespace rtengine {
RefreshMapper::RefreshMapper():
next_event_(rtengine::NUMOFEVENTS)
{
for (int event = 0; event < rtengine::NUMOFEVENTS; ++event) {
actions_[event] = refreshmap[event];
}
}
ProcEvent RefreshMapper::newEvent()
{
return ProcEvent(++next_event_);
}
void RefreshMapper::mapEvent(ProcEvent event, int action)
{
actions_[event] = action;
}
int RefreshMapper::getAction(ProcEvent event) const
{
auto it = actions_.find(event);
if (it == actions_.end()) {
return 0;
} else {
return it->second;
}
}
RefreshMapper *RefreshMapper::getInstance()
{
static RefreshMapper instance;
return &instance;
}
} // namespace rtengine