Correct UV pointer offset

This commit is contained in:
capitalistspz 2025-03-17 16:59:45 +00:00
parent 457672accf
commit 4d59741b25

View file

@ -51,7 +51,7 @@ void Rgb2Nv12(const uint8* rgbImage,
unsigned nv12Pitch) unsigned nv12Pitch)
{ {
cemu_assert_debug(!((imageWidth | imageHeight) & 1)); 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) for (auto row = 0u; row < imageHeight; row += 2)
{ {