# HG changeset patch # User rtognimp # Date 1112996088 0 # Node ID 3e36a706f5b7c709010c40cb94820ee24c273ca4 # Parent 6eaebf1fbd74b8d6e558080f6b3ba593d7b0b229 Fix upside-down picture for BGR24 images (fixes pig-loco-rgb.avi) Patch by Jindrich Makovicka diff -r 6eaebf1fbd74 -r 3e36a706f5b7 loco.c --- 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,