summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureDecoder.h
diff options
context:
space:
mode:
authorhthh <hthh@hh.ht>2017-01-14 01:41:44 +1100
committerhthh <hthh@hh.ht>2017-01-14 10:52:35 +1100
commit5d4e4aa561dc7de12cd54f35a98adcccd85bb5d3 (patch)
tree65866e0ad230ce00daa9739ccf6be06f1e0ce07e /Source/Core/VideoCommon/TextureDecoder.h
parent0b6e5765ddda6a437d9ae999bc8d8f59cb5e76fc (diff)
TextureDecoder: Fix off-by-one errors in CMPR
Diffstat (limited to 'Source/Core/VideoCommon/TextureDecoder.h')
-rw-r--r--Source/Core/VideoCommon/TextureDecoder.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/TextureDecoder.h b/Source/Core/VideoCommon/TextureDecoder.h
index 44834c0623..977a81ecc4 100644
--- a/Source/Core/VideoCommon/TextureDecoder.h
+++ b/Source/Core/VideoCommon/TextureDecoder.h
@@ -88,3 +88,8 @@ void TexDecoder_SetTexFmtOverlayOptions(bool enable, bool center);
/* Internal method, implemented by TextureDecoder_Generic and TextureDecoder_x64. */
void _TexDecoder_DecodeImpl(u32* dst, const u8* src, int width, int height, int texformat,
const u8* tlut, TlutFormat tlutfmt);
+
+static constexpr int DXTBlend(int v1, int v2)
+{
+ return ((v1 * 3 + v2 * 5) >> 3);
+}