diff options
| author | Scott Mansell <phiren@gmail.com> | 2016-05-19 10:16:26 +1200 |
|---|---|---|
| committer | Stenzek <stenzek@gmail.com> | 2018-04-29 17:56:53 +1000 |
| commit | a192a3bb3043c921ec897186c2a927b33050dffc (patch) | |
| tree | d146020842b3624586dab3ec55ce672c37d58605 /Source/Core/VideoBackends/Software/EfbInterface.cpp | |
| parent | fc96479f122d3b2fdd9a5191c67ebce811ff569d (diff) | |
While I'm here, fix some chroma sub-sampling bugs.
RE4's brightness screen is actually very good for spotting these.
Bug 1: Colors at the end of the scanlines are clamped, instead of a black
border
Bug 2: U and V color channels share coordinates, instead of being offset
by a pixel.
Diffstat (limited to 'Source/Core/VideoBackends/Software/EfbInterface.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Software/EfbInterface.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/VideoBackends/Software/EfbInterface.cpp b/Source/Core/VideoBackends/Software/EfbInterface.cpp index 12c208f70c..5d852e0ff9 100644 --- a/Source/Core/VideoBackends/Software/EfbInterface.cpp +++ b/Source/Core/VideoBackends/Software/EfbInterface.cpp @@ -599,7 +599,7 @@ void EncodeXFB(u8* xfb_in_ram, u32 memory_stride, const EFBRectangle& source_rec src_ptr[x + 1].Y = scanline[i + 1].Y + 16; // V[i] = 1/4 * V[i-1] + 1/2 * V[i] + 1/4 * V[i+1] src_ptr[x + 1].UV = - 128 + ((scanline[i].V + (scanline[i + 1].V << 1) + scanline[i + 2].V) >> 2); + 128 + ((scanline[i - 1].V + (scanline[i].V << 1) + scanline[i + 1].V) >> 2); } src_ptr += memory_stride; } |
