Mercurial > mplayer.hg
comparison libswscale/swscale.c @ 23289:786823779b67
Blackfin optimized YUV420 to RGB CSC Color Space Converters.
YUV2 -> RGB BGR for 565, 555 and 888 a.k.a. 24bit color.
Speed-up compared to C version compiled with -O3 187.28%
Patch by Marc Hoffman %mmh A pleasantst P com%
Original thread:
Date: May 9, 2007 2:46 AM
Subject: [FFmpeg-devel] PATCH BlackFin yuv2rgb color space conversion
author | gpoirier |
---|---|
date | Sun, 13 May 2007 19:22:32 +0000 |
parents | b745a8414f2c |
children | 705f72c9a0f6 |
comparison
equal
deleted
inserted
replaced
23288:3e0d632ec805 | 23289:786823779b67 |
---|---|
1990 if (flags & SWS_CPU_CAPS_MMX) | 1990 if (flags & SWS_CPU_CAPS_MMX) |
1991 asm volatile("emms\n\t"::: "memory"); | 1991 asm volatile("emms\n\t"::: "memory"); |
1992 #endif | 1992 #endif |
1993 | 1993 |
1994 #if !defined(RUNTIME_CPUDETECT) || !defined (CONFIG_GPL) //ensure that the flags match the compiled variant if cpudetect is off | 1994 #if !defined(RUNTIME_CPUDETECT) || !defined (CONFIG_GPL) //ensure that the flags match the compiled variant if cpudetect is off |
1995 flags &= ~(SWS_CPU_CAPS_MMX|SWS_CPU_CAPS_MMX2|SWS_CPU_CAPS_3DNOW|SWS_CPU_CAPS_ALTIVEC); | 1995 flags &= ~(SWS_CPU_CAPS_MMX|SWS_CPU_CAPS_MMX2|SWS_CPU_CAPS_3DNOW|SWS_CPU_CAPS_ALTIVEC|SWS_CPU_CAPS_BFIN); |
1996 #ifdef HAVE_MMX2 | 1996 #ifdef HAVE_MMX2 |
1997 flags |= SWS_CPU_CAPS_MMX|SWS_CPU_CAPS_MMX2; | 1997 flags |= SWS_CPU_CAPS_MMX|SWS_CPU_CAPS_MMX2; |
1998 #elif defined (HAVE_3DNOW) | 1998 #elif defined (HAVE_3DNOW) |
1999 flags |= SWS_CPU_CAPS_MMX|SWS_CPU_CAPS_3DNOW; | 1999 flags |= SWS_CPU_CAPS_MMX|SWS_CPU_CAPS_3DNOW; |
2000 #elif defined (HAVE_MMX) | 2000 #elif defined (HAVE_MMX) |
2001 flags |= SWS_CPU_CAPS_MMX; | 2001 flags |= SWS_CPU_CAPS_MMX; |
2002 #elif defined (HAVE_ALTIVEC) | 2002 #elif defined (HAVE_ALTIVEC) |
2003 flags |= SWS_CPU_CAPS_ALTIVEC; | 2003 flags |= SWS_CPU_CAPS_ALTIVEC; |
2004 #elif defined (ARCH_BFIN) | |
2005 flags |= SWS_CPU_CAPS_BFIN; | |
2004 #endif | 2006 #endif |
2005 #endif /* RUNTIME_CPUDETECT */ | 2007 #endif /* RUNTIME_CPUDETECT */ |
2006 if (clip_table[512] != 255) globalInit(); | 2008 if (clip_table[512] != 255) globalInit(); |
2007 if (rgb15to16 == NULL) sws_rgb2rgb_init(flags); | 2009 if (rgb15to16 == NULL) sws_rgb2rgb_init(flags); |
2008 | 2010 |