[SCM] libav/experimental: Fix typo that lead to averaging of the same pixel in rgb24ToUV_half().

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:29:58 UTC 2013


The following commit has been merged in the experimental branch:
commit e09d7eef375918fd4218ffb7e0d5c182b3038cb3
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Thu Sep 11 14:47:18 2008 +0000

    Fix typo that lead to averaging of the same pixel in rgb24ToUV_half().
    
    Originally committed as revision 27582 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale

diff --git a/libswscale/swscale_template.c b/libswscale/swscale_template.c
index a52dfd5..c7f278b 100644
--- a/libswscale/swscale_template.c
+++ b/libswscale/swscale_template.c
@@ -2109,9 +2109,9 @@ static inline void RENAME(rgb24ToUV_half)(uint8_t *dstU, uint8_t *dstV, uint8_t
     assert(src1==src2);
     for (i=0; i<width; i++)
     {
-        int r= src1[6*i + 0] + src1[6*i + 0];
-        int g= src1[6*i + 1] + src1[6*i + 1];
-        int b= src1[6*i + 2] + src1[6*i + 2];
+        int r= src1[6*i + 0] + src1[6*i + 3];
+        int g= src1[6*i + 1] + src1[6*i + 4];
+        int b= src1[6*i + 2] + src1[6*i + 5];
 
         dstU[i]= (RU*r + GU*g + BU*b + (257<<RGB2YUV_SHIFT))>>(RGB2YUV_SHIFT+1);
         dstV[i]= (RV*r + GV*g + BV*b + (257<<RGB2YUV_SHIFT))>>(RGB2YUV_SHIFT+1);

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list