summaryrefslogtreecommitdiff
path: root/src/core/hw/y2r.cpp
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2016-09-18 18:01:46 -0700
committerGravatar Yuri Kunde Schlesner2016-09-18 21:14:25 -0700
commit396a8d91a4423d9c793eeff0798d544613647511 (patch)
treee0203961233db1ffcbbca2e15154d71d142c5822 /src/core/hw/y2r.cpp
parentTweak formatting settings (diff)
downloadyuzu-396a8d91a4423d9c793eeff0798d544613647511.tar.gz
yuzu-396a8d91a4423d9c793eeff0798d544613647511.tar.xz
yuzu-396a8d91a4423d9c793eeff0798d544613647511.zip
Manually tweak source formatting and then re-run clang-format
Diffstat (limited to 'src/core/hw/y2r.cpp')
-rw-r--r--src/core/hw/y2r.cpp32
1 files changed, 23 insertions, 9 deletions
diff --git a/src/core/hw/y2r.cpp b/src/core/hw/y2r.cpp
index 5a68d7e65..838b14163 100644
--- a/src/core/hw/y2r.cpp
+++ b/src/core/hw/y2r.cpp
@@ -61,7 +61,7 @@ static void ConvertYUVToRGB(InputFormat input_format, const u8* input_Y, const u
61 s32 cY = c[0] * Y; 61 s32 cY = c[0] * Y;
62 62
63 s32 r = cY + c[1] * V; 63 s32 r = cY + c[1] * V;
64 s32 g = cY - c[3] * U - c[2] * V; 64 s32 g = cY - c[2] * V - c[3] * U;
65 s32 b = cY + c[4] * U; 65 s32 b = cY + c[4] * U;
66 66
67 const s32 rounding_offset = 0x18; 67 const s32 rounding_offset = 0x18;
@@ -144,16 +144,30 @@ static void SendData(const u32* input, ConversionBuffer& buf, int amount_of_data
144 } 144 }
145} 145}
146 146
147static const u8 linear_lut[64] = { 147static const u8 linear_lut[TILE_SIZE] = {
148 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 148 // clang-format off
149 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 149 0, 1, 2, 3, 4, 5, 6, 7,
150 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 150 8, 9, 10, 11, 12, 13, 14, 15,
151 16, 17, 18, 19, 20, 21, 22, 23,
152 24, 25, 26, 27, 28, 29, 30, 31,
153 32, 33, 34, 35, 36, 37, 38, 39,
154 40, 41, 42, 43, 44, 45, 46, 47,
155 48, 49, 50, 51, 52, 53, 54, 55,
156 56, 57, 58, 59, 60, 61, 62, 63,
157 // clang-format on
151}; 158};
152 159
153static const u8 morton_lut[64] = { 160static const u8 morton_lut[TILE_SIZE] = {
154 0, 1, 4, 5, 16, 17, 20, 21, 2, 3, 6, 7, 18, 19, 22, 23, 8, 9, 12, 13, 24, 25, 161 // clang-format off
155 28, 29, 10, 11, 14, 15, 26, 27, 30, 31, 32, 33, 36, 37, 48, 49, 52, 53, 34, 35, 38, 39, 162 0, 1, 4, 5, 16, 17, 20, 21,
156 50, 51, 54, 55, 40, 41, 44, 45, 56, 57, 60, 61, 42, 43, 46, 47, 58, 59, 62, 63, 163 2, 3, 6, 7, 18, 19, 22, 23,
164 8, 9, 12, 13, 24, 25, 28, 29,
165 10, 11, 14, 15, 26, 27, 30, 31,
166 32, 33, 36, 37, 48, 49, 52, 53,
167 34, 35, 38, 39, 50, 51, 54, 55,
168 40, 41, 44, 45, 56, 57, 60, 61,
169 42, 43, 46, 47, 58, 59, 62, 63,
170 // clang-format on
157}; 171};
158 172
159static void RotateTile0(const ImageTile& input, ImageTile& output, int height, 173static void RotateTile0(const ImageTile& input, ImageTile& output, int height,