summaryrefslogtreecommitdiff
path: root/kms++util/src/drawing.cpp
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2022-12-22 12:04:50 +0200
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2022-12-22 12:04:50 +0200
commit2bd85abc108e0688384f42b0ec83dcd5a622d50d (patch)
tree903a9f221a2dc71435b52ace7c815f68217509f3 /kms++util/src/drawing.cpp
parent32b6f82fb55b7f9ce1cd8a9e2e8ebdc3a7ac746c (diff)
Code formatting fixes
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Diffstat (limited to 'kms++util/src/drawing.cpp')
-rw-r--r--kms++util/src/drawing.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/kms++util/src/drawing.cpp b/kms++util/src/drawing.cpp
index 2631f14..862638b 100644
--- a/kms++util/src/drawing.cpp
+++ b/kms++util/src/drawing.cpp
@@ -181,7 +181,7 @@ static void draw_yuv422_packed_macropixel(IFramebuffer& buf, unsigned x, unsigne
}
static void draw_y2xx_packed_macropixel(IFramebuffer& buf, unsigned x, unsigned y,
- YUV yuv1, YUV yuv2)
+ YUV yuv1, YUV yuv2)
{
const uint32_t macro_size = 4;
uint16_t* p = (uint16_t*)(buf.map(0) + buf.stride(0) * y + x * macro_size);
@@ -191,8 +191,8 @@ static void draw_y2xx_packed_macropixel(IFramebuffer& buf, unsigned x, unsigned
// XXX naive expansion to 10 bits, similar to 10-bit funcs in class RGB
uint16_t y0 = yuv1.y << 2;
uint16_t y1 = yuv2.y << 2;
- uint16_t cb = ((yuv1.u << 2) + (yuv2.u << 2)) / 2;
- uint16_t cr = ((yuv1.v << 2) + (yuv2.v << 2)) / 2;
+ uint16_t cb = ((yuv1.u << 2) + (yuv2.u << 2)) / 2;
+ uint16_t cr = ((yuv1.v << 2) + (yuv2.v << 2)) / 2;
// The 10 bits occupy the msb, so we shift left by 16-10 = 6
write16le(&p[0], y0 << 6);
@@ -206,8 +206,8 @@ static void draw_y2xx_packed_macropixel(IFramebuffer& buf, unsigned x, unsigned
// XXX naive expansion to 12 bits
uint16_t y0 = yuv1.y << 4;
uint16_t y1 = yuv2.y << 4;
- uint16_t cb = ((yuv1.u << 4) + (yuv2.u << 4)) / 2;
- uint16_t cr = ((yuv1.v << 4) + (yuv2.v << 4)) / 2;
+ uint16_t cb = ((yuv1.u << 4) + (yuv2.u << 4)) / 2;
+ uint16_t cr = ((yuv1.v << 4) + (yuv2.v << 4)) / 2;
// The 10 bits occupy the msb, so we shift left by 16-12 = 4
write16le(&p[0], y0 << 4);
@@ -221,8 +221,8 @@ static void draw_y2xx_packed_macropixel(IFramebuffer& buf, unsigned x, unsigned
// XXX naive expansion to 16 bits
uint16_t y0 = yuv1.y << 8;
uint16_t y1 = yuv2.y << 8;
- uint16_t cb = ((yuv1.u << 8) + (yuv2.u << 8)) / 2;
- uint16_t cr = ((yuv1.v << 8) + (yuv2.v << 8)) / 2;
+ uint16_t cb = ((yuv1.u << 8) + (yuv2.u << 8)) / 2;
+ uint16_t cr = ((yuv1.v << 8) + (yuv2.v << 8)) / 2;
write16le(&p[0], y0);
write16le(&p[1], cb);