[SCM] libav/experimental: Fix colors for YV12 case (u/v planes are swapped) Fixes locoRGBA.avi (the file is really YV12, even if it's called RGBA)

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:43:35 UTC 2013


The following commit has been merged in the experimental branch:
commit 76d6abc17c8b921e9482d9f0a2489b5b169c14bf
Author: Roberto Togni <r_togni at tiscali.it>
Date:   Thu Apr 7 22:02:28 2005 +0000

    Fix colors for YV12 case (u/v planes are swapped)
    Fixes locoRGBA.avi (the file is really YV12, even if it's called RGBA)
    
    Originally committed as revision 4111 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/loco.c b/libavcodec/loco.c
index cace4bb..a012554 100644
--- a/libavcodec/loco.c
+++ b/libavcodec/loco.c
@@ -188,11 +188,11 @@ static int decode_frame(AVCodecContext *avctx,
         decoded = loco_decode_plane(l, p->data[0], avctx->width, avctx->height,
                                     p->linesize[0], buf, buf_size, 1);
         buf += decoded; buf_size -= decoded;
-        decoded = loco_decode_plane(l, p->data[1], avctx->width / 2, avctx->height / 2,
-                                    p->linesize[1], buf, buf_size, 1);
-        buf += decoded; buf_size -= decoded;
         decoded = loco_decode_plane(l, p->data[2], avctx->width / 2, avctx->height / 2,
                                     p->linesize[2], buf, buf_size, 1);
+        buf += decoded; buf_size -= decoded;
+        decoded = loco_decode_plane(l, p->data[1], avctx->width / 2, avctx->height / 2,
+                                    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,

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list