summaryrefslogtreecommitdiff
path: root/libavcodec/interplayvideo.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2009-12-27 08:15:19 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2009-12-27 08:15:19 +0000
commit9156a5ad72e989e0fa2735741edf894fffad33b9 (patch)
tree20d86abbcda31c4f6a4728080d86cb0ec9585c42 /libavcodec/interplayvideo.c
parent66d23c968c4b1534d347d46325cb9e5d4de285f4 (diff)
Change main loop in Interplay Video decoder, so variables x and y really mean
coordinates, not offsets. Originally committed as revision 20926 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/interplayvideo.c')
-rw-r--r--libavcodec/interplayvideo.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c
index fd5f44a5d0..b3a43bdd34 100644
--- a/libavcodec/interplayvideo.c
+++ b/libavcodec/interplayvideo.c
@@ -586,18 +586,19 @@ static void ipvideo_decode_opcodes(IpvideoContext *s)
+ s->avctx->width - 8;
init_get_bits(&gb, s->decoding_map, s->decoding_map_size * 8);
- for (y = 0; y < (s->stride * s->avctx->height); y += s->stride * 8) {
- for (x = y; x < y + s->avctx->width; x += 8) {
+ for (y = 0; y < s->avctx->height; y += 8) {
+ for (x = 0; x < s->avctx->width; x += 8) {
opcode = get_bits(&gb, 4);
debug_interplay(" block @ (%3d, %3d): encoding 0x%X, data ptr @ %p\n",
- x - y, y / s->stride, opcode, s->stream_ptr);
+ x, y, opcode, s->stream_ptr);
- s->pixel_ptr = s->current_frame.data[0] + x;
+ s->pixel_ptr = s->current_frame.data[0] + x
+ + y*s->current_frame.linesize[0];
ret = ipvideo_decode_block[opcode](s);
if (ret != 0) {
av_log(s->avctx, AV_LOG_ERROR, " Interplay video: decode problem on frame %d, @ block (%d, %d)\n",
- frame, x - y, y / s->stride);
+ frame, x, y);
return;
}
}