]> git.sesse.net Git - ffmpeg/commitdiff
Fix braindead and broken way to calculate abase, fixes regression tests on
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sun, 1 Mar 2009 11:33:10 +0000 (11:33 +0000)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sun, 1 Mar 2009 11:33:10 +0000 (11:33 +0000)
big-endian systems.

Originally committed as revision 28773 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale

libswscale/yuv2rgb.c

index 0a8cd99a977e53e42c60f266b8dfd608de2600ca..65af412c2c06788391cfeb81c13d69091779bbe8 100644 (file)
@@ -659,7 +659,7 @@ av_cold int sws_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], int
         rbase = base + (isRgb ? 16 : 0);
         gbase = base + 8;
         bbase = base + (isRgb ? 0 : 16);
-        abase = (c->dstFormat == PIX_FMT_RGBA || c->dstFormat == PIX_FMT_BGRA) ? 24 : 0;
+        abase = (base + 24) & 31;
         c->yuvTable = av_malloc(1024*3*4);
         y_table32 = c->yuvTable;
         yb = -(384<<16) - oy;