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>
This commit is contained in:
Tom Butterworth 2015-05-07 21:21:46 +01:00 committed by Michael Niedermayer
parent b1b0baa3d6
commit 288dc5b4a1
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}
}