mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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
This commit is contained in:
parent
76d6abc17c
commit
a18ba90880
@ -195,14 +195,14 @@ static int decode_frame(AVCodecContext *avctx,
|
|||||||
p->linesize[1], buf, buf_size, 1);
|
p->linesize[1], buf, buf_size, 1);
|
||||||
break;
|
break;
|
||||||
case LOCO_CRGB: case LOCO_RGB:
|
case LOCO_CRGB: case LOCO_RGB:
|
||||||
decoded = loco_decode_plane(l, p->data[0], avctx->width, avctx->height,
|
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);
|
-p->linesize[0], buf, buf_size, 3);
|
||||||
buf += decoded; buf_size -= decoded;
|
buf += decoded; buf_size -= decoded;
|
||||||
decoded = loco_decode_plane(l, p->data[0] + 1, avctx->width, avctx->height,
|
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);
|
-p->linesize[0], buf, buf_size, 3);
|
||||||
buf += decoded; buf_size -= decoded;
|
buf += decoded; buf_size -= decoded;
|
||||||
decoded = loco_decode_plane(l, p->data[0] + 2, avctx->width, avctx->height,
|
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);
|
-p->linesize[0], buf, buf_size, 3);
|
||||||
break;
|
break;
|
||||||
case LOCO_RGBA:
|
case LOCO_RGBA:
|
||||||
decoded = loco_decode_plane(l, p->data[0], avctx->width, avctx->height,
|
decoded = loco_decode_plane(l, p->data[0], avctx->width, avctx->height,
|
||||||
|
Loading…
Reference in New Issue
Block a user