summaryrefslogtreecommitdiff
path: root/libavcodec/bink.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2011-01-15 13:29:14 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2011-01-15 13:29:14 +0000
commit03ec42aa1ce738761130335e6e6f5ef5d0d1eadf (patch)
treef5692863cd5bef42e2362b6146e595e2cc949e28 /libavcodec/bink.c
parentb0c8b8a69d37b55a03a600d753113f4314404080 (diff)
downloadffmpeg-03ec42aa1ce738761130335e6e6f5ef5d0d1eadf.tar.gz
Change some band size calculations in Bink decoder to use width in blocks
instead of real width, this fixes decoding of some Bink files with odd width. Originally committed as revision 26364 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/bink.c')
-rw-r--r--libavcodec/bink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/bink.c b/libavcodec/bink.c
index 5f2fc312bc..01294030bd 100644
--- a/libavcodec/bink.c
+++ b/libavcodec/bink.c
@@ -119,7 +119,7 @@ static void init_lengths(BinkContext *c, int width, int bw)
c->bundle[BINK_SRC_SUB_BLOCK_TYPES].len = av_log2((width >> 4) + 511) + 1;
- c->bundle[BINK_SRC_COLORS].len = av_log2((width >> 3)*64 + 511) + 1;
+ c->bundle[BINK_SRC_COLORS].len = av_log2(bw*64 + 511) + 1;
c->bundle[BINK_SRC_INTRA_DC].len =
c->bundle[BINK_SRC_INTER_DC].len =
@@ -128,7 +128,7 @@ static void init_lengths(BinkContext *c, int width, int bw)
c->bundle[BINK_SRC_PATTERN].len = av_log2((bw << 3) + 511) + 1;
- c->bundle[BINK_SRC_RUN].len = av_log2((width >> 3)*48 + 511) + 1;
+ c->bundle[BINK_SRC_RUN].len = av_log2(bw*48 + 511) + 1;
}
/**