[SCM] libav/experimental: Rename yuv2rgb variables to avoid name clashes with the ones used by bfin asm.

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


The following commit has been merged in the experimental branch:
commit 43c164788cc951e48a9c19eaf1a2539fb59a26fc
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Sat Sep 13 11:52:03 2008 +0000

    Rename yuv2rgb variables to avoid name clashes with the ones used by bfin asm.
    
    Originally committed as revision 27599 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale

diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index d9eadfe..e8fd0d1 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -498,12 +498,12 @@ static inline void yuv2nv12XinC(int16_t *lumFilter, int16_t **lumSrc, int lumFil
 
 #define YSCALE_YUV_2_RGBX_FULL_C(rnd) \
     YSCALE_YUV_2_PACKEDX_FULL_C\
-        Y-= c->oy;\
-        Y*= c->cy;\
+        Y-= c->yuv2rgb_y_offset;\
+        Y*= c->yuv2rgb_y_coeff;\
         Y+= rnd;\
-        R= Y + V*c->cvr;\
-        G= Y + V*c->cvg + U*c->cug;\
-        B= Y +            U*c->cub;\
+        R= Y + V*c->yuv2rgb_v2r_coeff;\
+        G= Y + V*c->yuv2rgb_v2g_coeff + U*c->yuv2rgb_u2g_coeff;\
+        B= Y +                          U*c->yuv2rgb_u2b_coeff;\
         if ((R|G|B)&(0xC0000000)){\
             if (R>=(256<<22))   R=(256<<22)-1; \
             else if (R<0)R=0;   \
@@ -1960,12 +1960,12 @@ int sws_setColorspaceDetails(SwsContext *c, const int inv_table[4], int srcRange
     c->ugCoeff=   roundToInt16(cgu*8192) * 0x0001000100010001ULL;
     c->yOffset=   roundToInt16(oy *   8) * 0x0001000100010001ULL;
 
-    c->cy = (int16_t)roundToInt16(cy <<13);
-    c->oy = (int16_t)roundToInt16(oy <<9);
-    c->cvr= (int16_t)roundToInt16(crv<<13);
-    c->cvg= (int16_t)roundToInt16(cgv<<13);
-    c->cug= (int16_t)roundToInt16(cgu<<13);
-    c->cub= (int16_t)roundToInt16(cbu<<13);
+    c->yuv2rgb_y_coeff  = (int16_t)roundToInt16(cy <<13);
+    c->yuv2rgb_y_offset = (int16_t)roundToInt16(oy << 9);
+    c->yuv2rgb_v2r_coeff= (int16_t)roundToInt16(crv<<13);
+    c->yuv2rgb_v2g_coeff= (int16_t)roundToInt16(cgv<<13);
+    c->yuv2rgb_u2g_coeff= (int16_t)roundToInt16(cgu<<13);
+    c->yuv2rgb_u2b_coeff= (int16_t)roundToInt16(cbu<<13);
 
     yuv2rgb_c_init_tables(c, inv_table, srcRange, brightness, contrast, saturation);
     //FIXME factorize
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index 9d82662..8290c04 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -126,7 +126,12 @@ typedef struct SwsContext{
     int srcColorspaceTable[4];
     int dstColorspaceTable[4];
     int srcRange, dstRange;
-    int oy,cy,cvr,cvg,cug,cub;
+    int yuv2rgb_y_offset;
+    int yuv2rgb_y_coeff;
+    int yuv2rgb_v2r_coeff;
+    int yuv2rgb_v2g_coeff;
+    int yuv2rgb_u2g_coeff;
+    int yuv2rgb_u2b_coeff;
 
 #define RED_DITHER            "0*8"
 #define GREEN_DITHER          "1*8"

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list