From 5dbd491eb38efab1d1313d4129ed76ab2e98176d Mon Sep 17 00:00:00 2001 From: Tom Butterworth Date: Tue, 23 Jun 2015 17:40:11 +0100 Subject: TextureDSP: fix erroneous condition which produced blocky output for DXT --- libavcodec/texturedspenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/texturedspenc.c') diff --git a/libavcodec/texturedspenc.c b/libavcodec/texturedspenc.c index 4a387c5edc..2036998c81 100644 --- a/libavcodec/texturedspenc.c +++ b/libavcodec/texturedspenc.c @@ -363,7 +363,7 @@ static int refine_colors(const uint8_t *block, ptrdiff_t stride, const int prods[4] = { 0x090000, 0x000900, 0x040102, 0x010402 }; /* Check if all pixels have the same index */ - if (mask ^ (mask << 2) < 4) { + if ((mask ^ (mask << 2)) < 4) { /* If so, linear system would be singular; solve using optimal * single-color match on average color. */ int r = 8, g = 8, b = 8; -- cgit v1.2.3