summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2015-09-10 06:21:58 +0200
committerYuri Kunde Schlesner <yuriks@yuriks.net>2015-09-10 06:21:58 +0200
commit248b2993e866d66632a7fc7148a2faed3c3c6416 (patch)
treebfecb17936ea2936c65ae758545ed6dfc47e5fe0 /src
parentMerge pull request #1132 from lioncash/unimpl (diff)
parenty2r: Give local variables an initial value (diff)
downloadyuzu-248b2993e866d66632a7fc7148a2faed3c3c6416.tar
yuzu-248b2993e866d66632a7fc7148a2faed3c3c6416.tar.gz
yuzu-248b2993e866d66632a7fc7148a2faed3c3c6416.tar.bz2
yuzu-248b2993e866d66632a7fc7148a2faed3c3c6416.tar.lz
yuzu-248b2993e866d66632a7fc7148a2faed3c3c6416.tar.xz
yuzu-248b2993e866d66632a7fc7148a2faed3c3c6416.tar.zst
yuzu-248b2993e866d66632a7fc7148a2faed3c3c6416.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hw/y2r.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core/hw/y2r.cpp b/src/core/hw/y2r.cpp
index 082a4db82..15f96ced8 100644
--- a/src/core/hw/y2r.cpp
+++ b/src/core/hw/y2r.cpp
@@ -33,7 +33,9 @@ static void ConvertYUVToRGB(InputFormat input_format,
for (unsigned int y = 0; y < height; ++y) {
for (unsigned int x = 0; x < width; ++x) {
- s32 Y, U, V;
+ s32 Y = 0;
+ s32 U = 0;
+ s32 V = 0;
switch (input_format) {
case InputFormat::YUV422_Indiv8:
case InputFormat::YUV422_Indiv16:
@@ -269,7 +271,7 @@ void PerformConversion(ConversionConfiguration& cvt) {
// LUT used to remap writes to a tile. Used to allow linear or swizzled output without
// requiring two different code paths.
- const u8* tile_remap;
+ const u8* tile_remap = nullptr;
switch (cvt.block_alignment) {
case BlockAlignment::Linear:
tile_remap = linear_lut; break;
@@ -323,7 +325,8 @@ void PerformConversion(ConversionConfiguration& cvt) {
u32* output_buffer = reinterpret_cast<u32*>(data_buffer.get());
for (int i = 0; i < num_tiles; ++i) {
- int image_strip_width, output_stride;
+ int image_strip_width = 0;
+ int output_stride = 0;
switch (cvt.rotation) {
case Rotation::None: