Refactor color utils (#955)

Co-authored-by: Paulchen Panther <16664240+Paulchen-Panther@users.noreply.github.com>
This commit is contained in:
Murat Seker
2020-08-08 13:22:37 +02:00
committed by GitHub
parent 63d95a5a2a
commit a18ccb8b48
20 changed files with 181 additions and 120 deletions

View File

@@ -12,22 +12,11 @@ public:
~ImageResampler();
void setHorizontalPixelDecimation(int decimator);
void setVerticalPixelDecimation(int decimator);
void setCropping(int cropLeft,
int cropRight,
int cropTop,
int cropBottom);
void setCropping(int cropLeft, int cropRight, int cropTop, int cropBottom);
void setVideoMode(VideoMode mode);
void processImage(const uint8_t * data, int width, int height, int lineLength, PixelFormat pixelFormat, Image<ColorRgb> & outputImage) const;
private:
static inline uint8_t clamp(int x);
static void yuv2rgb(uint8_t y, uint8_t u, uint8_t v, uint8_t & r, uint8_t & g, uint8_t & b);
private:
int _horizontalDecimation;
int _verticalDecimation;
@@ -37,3 +26,4 @@ private:
int _cropBottom;
VideoMode _videoMode;
};