From 4d59741b2531e499676c8f39ab4f5184e8419212 Mon Sep 17 00:00:00 2001 From: capitalistspz Date: Mon, 17 Mar 2025 16:59:45 +0000 Subject: [PATCH] Correct UV pointer offset --- src/Cafe/OS/libs/camera/Rgb2Nv12.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cafe/OS/libs/camera/Rgb2Nv12.cpp b/src/Cafe/OS/libs/camera/Rgb2Nv12.cpp index 935d627d..2390be0a 100644 --- a/src/Cafe/OS/libs/camera/Rgb2Nv12.cpp +++ b/src/Cafe/OS/libs/camera/Rgb2Nv12.cpp @@ -51,7 +51,7 @@ void Rgb2Nv12(const uint8* rgbImage, unsigned nv12Pitch) { cemu_assert_debug(!((imageWidth | imageHeight) & 1)); - unsigned char* UV = outNv12Image + imageWidth * imageHeight; + unsigned char* UV = outNv12Image + nv12Pitch * imageHeight; for (auto row = 0u; row < imageHeight; row += 2) {