Commit e2a004ad authored by Kostya Shishkov's avatar Kostya Shishkov

Prefix visible YUV2RGB functions with sws_

Originally committed as revision 28496 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
parent fa58ba15
...@@ -2133,12 +2133,12 @@ int sws_setColorspaceDetails(SwsContext *c, const int inv_table[4], int srcRange ...@@ -2133,12 +2133,12 @@ int sws_setColorspaceDetails(SwsContext *c, const int inv_table[4], int srcRange
c->yuv2rgb_u2g_coeff= (int16_t)roundToInt16(cgu<<13); c->yuv2rgb_u2g_coeff= (int16_t)roundToInt16(cgu<<13);
c->yuv2rgb_u2b_coeff= (int16_t)roundToInt16(cbu<<13); c->yuv2rgb_u2b_coeff= (int16_t)roundToInt16(cbu<<13);
yuv2rgb_c_init_tables(c, inv_table, srcRange, brightness, contrast, saturation); sws_yuv2rgb_c_init_tables(c, inv_table, srcRange, brightness, contrast, saturation);
//FIXME factorize //FIXME factorize
#ifdef COMPILE_ALTIVEC #ifdef COMPILE_ALTIVEC
if (c->flags & SWS_CPU_CAPS_ALTIVEC) if (c->flags & SWS_CPU_CAPS_ALTIVEC)
yuv2rgb_altivec_init_tables (c, inv_table, brightness, contrast, saturation); sws_yuv2rgb_altivec_init_tables (c, inv_table, brightness, contrast, saturation);
#endif #endif
return 0; return 0;
} }
...@@ -2336,7 +2336,7 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d ...@@ -2336,7 +2336,7 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d
if ((srcFormat==PIX_FMT_YUV420P || srcFormat==PIX_FMT_YUV422P) && (isBGR(dstFormat) || isRGB(dstFormat)) if ((srcFormat==PIX_FMT_YUV420P || srcFormat==PIX_FMT_YUV422P) && (isBGR(dstFormat) || isRGB(dstFormat))
&& !(flags & SWS_ACCURATE_RND) && !(dstH&1)) && !(flags & SWS_ACCURATE_RND) && !(dstH&1))
{ {
c->swScale= yuv2rgb_get_func_ptr(c); c->swScale= sws_yuv2rgb_get_func_ptr(c);
} }
#endif #endif
......
...@@ -212,11 +212,11 @@ typedef struct SwsContext{ ...@@ -212,11 +212,11 @@ typedef struct SwsContext{
} SwsContext; } SwsContext;
//FIXME check init (where 0) //FIXME check init (where 0)
SwsFunc yuv2rgb_get_func_ptr (SwsContext *c); SwsFunc sws_yuv2rgb_get_func_ptr (SwsContext *c);
int yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange, int brightness, int contrast, int saturation); int sws_yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange, int brightness, int contrast, int saturation);
void yuv2rgb_altivec_init_tables (SwsContext *c, const int inv_table[4],int brightness,int contrast, int saturation); void sws_yuv2rgb_altivec_init_tables (SwsContext *c, const int inv_table[4],int brightness,int contrast, int saturation);
SwsFunc yuv2rgb_init_altivec (SwsContext *c); SwsFunc sws_yuv2rgb_init_altivec (SwsContext *c);
void altivec_yuv2packedX (SwsContext *c, void altivec_yuv2packedX (SwsContext *c,
int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize, int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize,
int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize, int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize,
......
...@@ -481,7 +481,7 @@ PROLOG(yuv2rgb_c_1_ordered_dither, uint8_t) ...@@ -481,7 +481,7 @@ PROLOG(yuv2rgb_c_1_ordered_dither, uint8_t)
dst_2[0]= out_2; dst_2[0]= out_2;
EPILOG(1) EPILOG(1)
SwsFunc yuv2rgb_get_func_ptr (SwsContext *c) SwsFunc sws_yuv2rgb_get_func_ptr (SwsContext *c)
{ {
#if HAVE_MMX2 || HAVE_MMX #if HAVE_MMX2 || HAVE_MMX
if (c->flags & SWS_CPU_CAPS_MMX2){ if (c->flags & SWS_CPU_CAPS_MMX2){
...@@ -503,20 +503,20 @@ SwsFunc yuv2rgb_get_func_ptr (SwsContext *c) ...@@ -503,20 +503,20 @@ SwsFunc yuv2rgb_get_func_ptr (SwsContext *c)
#endif #endif
#if HAVE_VIS #if HAVE_VIS
{ {
SwsFunc t= yuv2rgb_init_vis(c); SwsFunc t= sws_yuv2rgb_init_vis(c);
if (t) return t; if (t) return t;
} }
#endif #endif
#if CONFIG_MLIB #if CONFIG_MLIB
{ {
SwsFunc t= yuv2rgb_init_mlib(c); SwsFunc t= sws_yuv2rgb_init_mlib(c);
if (t) return t; if (t) return t;
} }
#endif #endif
#if HAVE_ALTIVEC #if HAVE_ALTIVEC
if (c->flags & SWS_CPU_CAPS_ALTIVEC) if (c->flags & SWS_CPU_CAPS_ALTIVEC)
{ {
SwsFunc t = yuv2rgb_init_altivec(c); SwsFunc t = sws_yuv2rgb_init_altivec(c);
if (t) return t; if (t) return t;
} }
#endif #endif
...@@ -563,7 +563,7 @@ static int div_round (int dividend, int divisor) ...@@ -563,7 +563,7 @@ static int div_round (int dividend, int divisor)
return -((-dividend + (divisor>>1)) / divisor); return -((-dividend + (divisor>>1)) / divisor);
} }
int yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange, int brightness, int contrast, int saturation) int sws_yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange, int brightness, int contrast, int saturation)
{ {
const int isRgb = c->dstFormat==PIX_FMT_RGB32 const int isRgb = c->dstFormat==PIX_FMT_RGB32
|| c->dstFormat==PIX_FMT_RGB32_1 || c->dstFormat==PIX_FMT_RGB32_1
......
...@@ -690,7 +690,7 @@ static int altivec_uyvy_rgb32 (SwsContext *c, ...@@ -690,7 +690,7 @@ static int altivec_uyvy_rgb32 (SwsContext *c,
So we just fall back to the C codes for this. So we just fall back to the C codes for this.
*/ */
SwsFunc yuv2rgb_init_altivec (SwsContext *c) SwsFunc sws_yuv2rgb_init_altivec (SwsContext *c)
{ {
if (!(c->flags & SWS_CPU_CAPS_ALTIVEC)) if (!(c->flags & SWS_CPU_CAPS_ALTIVEC))
return NULL; return NULL;
...@@ -750,7 +750,7 @@ SwsFunc yuv2rgb_init_altivec (SwsContext *c) ...@@ -750,7 +750,7 @@ SwsFunc yuv2rgb_init_altivec (SwsContext *c)
return NULL; return NULL;
} }
void yuv2rgb_altivec_init_tables (SwsContext *c, const int inv_table[4],int brightness,int contrast, int saturation) void sws_yuv2rgb_altivec_init_tables (SwsContext *c, const int inv_table[4],int brightness,int contrast, int saturation)
{ {
union { union {
signed short tmp[8] __attribute__ ((aligned(16))); signed short tmp[8] __attribute__ ((aligned(16)));
......
...@@ -73,7 +73,7 @@ static int mlib_YUV2RGB420_24(SwsContext *c, uint8_t* src[], int srcStride[], in ...@@ -73,7 +73,7 @@ static int mlib_YUV2RGB420_24(SwsContext *c, uint8_t* src[], int srcStride[], in
} }
SwsFunc yuv2rgb_init_mlib(SwsContext *c) SwsFunc sws_yuv2rgb_init_mlib(SwsContext *c)
{ {
switch(c->dstFormat){ switch(c->dstFormat){
case PIX_FMT_RGB24: return mlib_YUV2RGB420_24; case PIX_FMT_RGB24: return mlib_YUV2RGB420_24;
......
...@@ -182,7 +182,7 @@ static int vis_422P_ARGB32(SwsContext *c, uint8_t* src[], int srcStride[], int s ...@@ -182,7 +182,7 @@ static int vis_422P_ARGB32(SwsContext *c, uint8_t* src[], int srcStride[], int s
return srcSliceH; return srcSliceH;
} }
SwsFunc yuv2rgb_init_vis(SwsContext *c) { SwsFunc sws_yuv2rgb_init_vis(SwsContext *c) {
c->sparc_coeffs[5]=c->yCoeff; c->sparc_coeffs[5]=c->yCoeff;
c->sparc_coeffs[6]=c->vgCoeff; c->sparc_coeffs[6]=c->vgCoeff;
c->sparc_coeffs[7]=c->vrCoeff; c->sparc_coeffs[7]=c->vrCoeff;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment