aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJindřich Makovička <makovick@gmail.com>2005-04-08 21:34:48 +0000
committerRoberto Togni <r_togni@tiscali.it>2005-04-08 21:34:48 +0000
commita18ba9088042a60f49ada6c85f22f1318cfa0503 (patch)
tree0a2b2f35558ea0f56edebc932f428c2a2f9b8fa3
parent76d6abc17c8b921e9482d9f0a2489b5b169c14bf (diff)
downloadffmpeg-a18ba9088042a60f49ada6c85f22f1318cfa0503.tar.gz
Fix upside-down picture for BGR24 images (fixes pig-loco-rgb.avi)
Patch by Jindrich Makovicka Originally committed as revision 4112 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/loco.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/loco.c b/libavcodec/loco.c
index a0125549b1..6f90c1ef14 100644
--- a/libavcodec/loco.c
+++ b/libavcodec/loco.c
@@ -195,14 +195,14 @@ static int decode_frame(AVCodecContext *avctx,
p->linesize[1], buf, buf_size, 1);
break;
case LOCO_CRGB: case LOCO_RGB:
- decoded = loco_decode_plane(l, p->data[0], avctx->width, avctx->height,
- p->linesize[0], buf, buf_size, 3);
+ decoded = loco_decode_plane(l, p->data[0] + p->linesize[0]*(avctx->height-1), avctx->width, avctx->height,
+ -p->linesize[0], buf, buf_size, 3);
buf += decoded; buf_size -= decoded;
- decoded = loco_decode_plane(l, p->data[0] + 1, avctx->width, avctx->height,
- p->linesize[0], buf, buf_size, 3);
+ decoded = loco_decode_plane(l, p->data[0] + p->linesize[0]*(avctx->height-1) + 1, avctx->width, avctx->height,
+ -p->linesize[0], buf, buf_size, 3);
buf += decoded; buf_size -= decoded;
- decoded = loco_decode_plane(l, p->data[0] + 2, avctx->width, avctx->height,
- p->linesize[0], buf, buf_size, 3);
+ decoded = loco_decode_plane(l, p->data[0] + p->linesize[0]*(avctx->height-1) + 2, avctx->width, avctx->height,
+ -p->linesize[0], buf, buf_size, 3);
break;
case LOCO_RGBA:
decoded = loco_decode_plane(l, p->data[0], avctx->width, avctx->height,