Mercurial > libavcodec.hg
changeset 2599:3e36a706f5b7 libavcodec
Fix upside-down picture for BGR24 images (fixes pig-loco-rgb.avi)
Patch by Jindrich Makovicka
author | rtognimp |
---|---|
date | Fri, 08 Apr 2005 21:34:48 +0000 |
parents | 6eaebf1fbd74 |
children | 2bcea6618a87 |
files | loco.c |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/loco.c Thu Apr 07 22:02:28 2005 +0000 +++ b/loco.c Fri Apr 08 21:34:48 2005 +0000 @@ -195,14 +195,14 @@ 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,