diff options
author | Sebastian Vater <cdgs.basty@googlemail.com> | 2010-05-05 17:02:55 +0000 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2010-05-05 17:02:55 +0000 |
commit | cfdaee45d1d279ac2dcedef8abb00f1768488e38 (patch) | |
tree | b5677c185ef0546807eea13e0393380545d6207b /libavcodec | |
parent | ddb630177a01609913c22ed03a7c9286231da892 (diff) | |
download | ffmpeg-cfdaee45d1d279ac2dcedef8abb00f1768488e38.tar.gz |
Align plane size to word-boundary.
Patch by Sebastian Vater, cdgs D basty A googlemail
Originally committed as revision 23023 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/iff.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/iff.c b/libavcodec/iff.c index 2989bb0ead..7189ac31cb 100644 --- a/libavcodec/iff.c +++ b/libavcodec/iff.c @@ -72,7 +72,7 @@ static av_cold int decode_init(AVCodecContext *avctx) return AVERROR_INVALIDDATA; } - s->planesize = avctx->width >> 3; + s->planesize = FFALIGN(avctx->width, 16) >> 3; // Align plane size in bits to word-boundary s->planebuf = av_malloc(s->planesize + FF_INPUT_BUFFER_PADDING_SIZE); if (!s->planebuf) return AVERROR(ENOMEM); @@ -99,7 +99,7 @@ static void decodeplane8(uint8_t *dst, const uint8_t *const buf, int buf_size, i { GetBitContext gb; int i; - const int b = (buf_size * 8) + bps - 1; + const int b = buf_size * 8; init_get_bits(&gb, buf, buf_size * 8); for(i = 0; i < b; i++) { dst[i] |= get_bits1(&gb) << plane; @@ -118,7 +118,7 @@ static void decodeplane32(uint32_t *dst, const uint8_t *const buf, int buf_size, { GetBitContext gb; int i; - const int b = (buf_size * 8) + bps - 1; + const int b = buf_size * 8; init_get_bits(&gb, buf, buf_size * 8); for(i = 0; i < b; i++) { dst[i] |= get_bits1(&gb) << plane; |