aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Butterworth <bangnoise@gmail.com>2015-05-07 21:21:46 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-05-07 23:10:56 +0200
commit288dc5b4a11884b9a5cd62310abe99878544982b (patch)
tree09ea8e83b7067464ca44abefe86efcece2b45fd2
parentb1b0baa3d6a30942b258dddfdd04b4b24c713879 (diff)
downloadffmpeg-288dc5b4a11884b9a5cd62310abe99878544982b.tar.gz
avcodec/s3tc: fix alpha decoding when dimensions are not a multiple of 4
Fix alpha position error for edge blocks of odd-dimensioned frames Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/s3tc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/s3tc.c b/libavcodec/s3tc.c
index 9886b1dc9c..a422874d17 100644
--- a/libavcodec/s3tc.c
+++ b/libavcodec/s3tc.c
@@ -71,8 +71,10 @@ static inline void dxt1_decode_pixels(GetByteContext *gb, uint32_t *d,
pixels >>= 2;
alpha >>= 4;
}
- for (; x<4; x++)
+ for (; x<4; x++) {
pixels >>= 2;
+ alpha >>= 4;
+ }
d += qstride;
}
}