summaryrefslogtreecommitdiff
path: root/libavcodec/texturedspenc.c
diff options
context:
space:
mode:
authorTom Butterworth <bangnoise@gmail.com>2015-06-23 17:40:11 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-06-24 14:45:23 +0100
commit5dbd491eb38efab1d1313d4129ed76ab2e98176d (patch)
treeee2e99cdaea0af39038ed263c20fb55e5dc405e7 /libavcodec/texturedspenc.c
parent4d55484391112a30d16812597b9ad81605af0c24 (diff)
TextureDSP: fix erroneous condition which produced blocky output for DXT
Diffstat (limited to 'libavcodec/texturedspenc.c')
-rw-r--r--libavcodec/texturedspenc.c2
1 files changed, 1 insertions, 1 deletions
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;