refactoring of RgbChannelAdjustment (#79)

* common ledbuffer for color transform

hyperion class uses a common buffer for all operations on ledColors got from muxer
all color transforms uses new ledBuffer instead of making copies of ledbuffer

other fixes:
fix compile bug in profiler
update doxygen config

* migrate logging for color transform classes

* prepare new logger in hyperion class

* implement hwledcount

* Update Hyperion.cpp

Fix off color

* remove ledscount equivalent from apa102
migrate logging in hyperion.cpp
remove unused and duuplicate colorcorrection - but same is available through tempertature

* remove colorcorrection completly
fix compile

* set colororder back to static

* in remote: using correction is the same as using temperature - correction is obsolete, command not delete atm for compat reasons

* refactoring of RgbChannelAdjustment
This commit is contained in:
redPanther
2016-07-02 14:00:48 +02:00
committed by brindosch
parent 36b4d072c5
commit 921f164b26
4 changed files with 76 additions and 98 deletions

View File

@@ -15,29 +15,34 @@ public:
/// @param adjustR
/// @param adjustG
/// @param adjustB
RgbChannelAdjustment(int adjustR, int adjustG, int adjustB);
RgbChannelAdjustment(uint8_t adjustR, uint8_t adjustG, uint8_t adjustB);
/// Destructor
~RgbChannelAdjustment();
/// @return The current adjustR value
uint8_t getadjustmentR() const;
uint8_t getAdjustmentR() const;
/// setAdjustment RGB
/// @param adjustR
/// @param adjustG
/// @param adjustB
void setAdjustment(uint8_t adjustR, uint8_t adjustG, uint8_t adjustB);
/// @param threshold New adjustR value
void setadjustmentR(uint8_t adjustR);
void setAdjustmentR(uint8_t adjustR);
/// @return The current adjustG value
uint8_t getadjustmentG() const;
uint8_t getAdjustmentG() const;
/// @param gamma New adjustG value
void setadjustmentG(uint8_t adjustG);
void setAdjustmentG(uint8_t adjustG);
/// @return The current adjustB value
uint8_t getadjustmentB() const;
uint8_t getAdjustmentB() const;
/// @param blacklevel New adjustB value
void setadjustmentB(uint8_t adjustB);
void setAdjustmentB(uint8_t adjustB);
/// Transform the given array value
/// @param input The input color bytes
@@ -48,19 +53,15 @@ public:
private:
/// color channels
enum ColorChannel { RED=0,GREEN=1, BLUE=2 };
/// (re)-initilize the color mapping
void initializeMapping();
private:
/// The adjustment of R channel
int _adjustR;
/// The adjustment of G channel
int _adjustG;
/// The adjustment of B channel
int _adjustB;
/// The adjustment of RGB channel
uint8_t _adjust[3];
/// The mapping from input color to output color
int _mappingR[256];
int _mappingG[256];
int _mappingB[256];
uint8_t _mapping[3][256];
};