refactor: Improve utils code style (#841)

* Improve utils code style

* Fix indendation

Co-authored-by: brindosch <edeltraud70@gmx.de>
This commit is contained in:
Murat Seker
2020-06-28 23:12:22 +02:00
committed by GitHub
parent bfb50b8d91
commit 458113f8f9
15 changed files with 71 additions and 98 deletions

View File

@@ -68,7 +68,7 @@ void ImageResampler::processImage(const uint8_t * data, int width, int height, i
for (int xDest = 0, xSource = _cropLeft + (_horizontalDecimation >> 1); xDest < outputWidth; xSource += _horizontalDecimation, ++xDest)
{
ColorRgb & rgb = outputImage(xDest, yDest);
switch (pixelFormat)
{
case PixelFormat::UYVY:
@@ -144,7 +144,7 @@ void ImageResampler::yuv2rgb(uint8_t y, uint8_t u, uint8_t v, uint8_t &r, uint8_
int c = y - 16;
int d = u - 128;
int e = v - 128;
r = clamp((298 * c + 409 * e + 128) >> 8);
g = clamp((298 * c - 100 * d - 208 * e + 128) >> 8);
b = clamp((298 * c + 516 * d + 128) >> 8);