Mercurial > libavcodec.hg
comparison loco.c @ 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 | ef2149182f1c |
comparison
equal
deleted
inserted
replaced
2598:6eaebf1fbd74 | 2599:3e36a706f5b7 |
---|---|
193 buf += decoded; buf_size -= decoded; | 193 buf += decoded; buf_size -= decoded; |
194 decoded = loco_decode_plane(l, p->data[1], avctx->width / 2, avctx->height / 2, | 194 decoded = loco_decode_plane(l, p->data[1], avctx->width / 2, avctx->height / 2, |
195 p->linesize[1], buf, buf_size, 1); | 195 p->linesize[1], buf, buf_size, 1); |
196 break; | 196 break; |
197 case LOCO_CRGB: case LOCO_RGB: | 197 case LOCO_CRGB: case LOCO_RGB: |
198 decoded = loco_decode_plane(l, p->data[0], avctx->width, avctx->height, | 198 decoded = loco_decode_plane(l, p->data[0] + p->linesize[0]*(avctx->height-1), avctx->width, avctx->height, |
199 p->linesize[0], buf, buf_size, 3); | 199 -p->linesize[0], buf, buf_size, 3); |
200 buf += decoded; buf_size -= decoded; | 200 buf += decoded; buf_size -= decoded; |
201 decoded = loco_decode_plane(l, p->data[0] + 1, avctx->width, avctx->height, | 201 decoded = loco_decode_plane(l, p->data[0] + p->linesize[0]*(avctx->height-1) + 1, avctx->width, avctx->height, |
202 p->linesize[0], buf, buf_size, 3); | 202 -p->linesize[0], buf, buf_size, 3); |
203 buf += decoded; buf_size -= decoded; | 203 buf += decoded; buf_size -= decoded; |
204 decoded = loco_decode_plane(l, p->data[0] + 2, avctx->width, avctx->height, | 204 decoded = loco_decode_plane(l, p->data[0] + p->linesize[0]*(avctx->height-1) + 2, avctx->width, avctx->height, |
205 p->linesize[0], buf, buf_size, 3); | 205 -p->linesize[0], buf, buf_size, 3); |
206 break; | 206 break; |
207 case LOCO_RGBA: | 207 case LOCO_RGBA: |
208 decoded = loco_decode_plane(l, p->data[0], avctx->width, avctx->height, | 208 decoded = loco_decode_plane(l, p->data[0], avctx->width, avctx->height, |
209 p->linesize[0], buf, buf_size, 4); | 209 p->linesize[0], buf, buf_size, 4); |
210 buf += decoded; buf_size -= decoded; | 210 buf += decoded; buf_size -= decoded; |