@ -3,22 +3,19 @@
*
* This file is part of FFmpeg .
*
* FFmpeg is free software ; you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , o r
* ( at your option ) any later version .
* FFmpeg is free software ; you can redistribute it and / or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 of the License , or ( at your option ) any later version .
*
* FFmpeg is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the GNU
* Lesser General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with FFmpeg ; if not , write to the Free Software
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg ; if not , write to the Free Software
* Foundation , Inc . , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 USA
*
* the C code ( not assembly , mmx , . . . ) of this file can be used
* under the LGPL license too
*/
/*
@ -130,7 +127,7 @@ add BGR4 output support
write special BGR - > BGR scaler
*/
# if ARCH_X86 && CONFIG_GPL
# if ARCH_X86
DECLARE_ASM_CONST ( 8 , uint64_t , bF8 ) = 0xF8F8F8F8F8F8F8F8LL ;
DECLARE_ASM_CONST ( 8 , uint64_t , bFC ) = 0xFCFCFCFCFCFCFCFCLL ;
DECLARE_ASM_CONST ( 8 , uint64_t , w10 ) = 0x0010001000100010LL ;
@ -185,7 +182,7 @@ DECLARE_ASM_CONST(8, uint64_t, ff_bgr24toUV)[2][4] = {
DECLARE_ASM_CONST ( 8 , uint64_t , ff_bgr24toUVOffset ) = 0x0040400000404000ULL ;
# endif /* ARCH_X86 && CONFIG_GPL */
# endif /* ARCH_X86 */
DECLARE_ALIGNED ( 8 , static const uint8_t , dither_2x2_4 ) [ 2 ] [ 8 ] = {
{ 1 , 3 , 1 , 3 , 1 , 3 , 1 , 3 , } ,
@ -1154,7 +1151,7 @@ static inline void monoblack2Y(uint8_t *dst, const uint8_t *src, long width, uin
//Note: we have C, MMX, MMX2, 3DNOW versions, there is no 3DNOW+MMX2 one
//Plain C versions
# if (( !HAVE_MMX || !CONFIG_GPL) && !HAVE_ALTIVEC) || CONFIG_RUNTIME_CPUDETECT
# if (!HAVE_MMX && !HAVE_ALTIVEC) || CONFIG_RUNTIME_CPUDETECT
# define COMPILE_C
# endif
@ -1166,15 +1163,15 @@ static inline void monoblack2Y(uint8_t *dst, const uint8_t *src, long width, uin
# if ARCH_X86
# if (( HAVE_MMX && !HAVE_AMD3DNOW && !HAVE_MMX2) || CONFIG_RUNTIME_CPUDETECT) && CONFIG_GPL
# if (HAVE_MMX && !HAVE_AMD3DNOW && !HAVE_MMX2) || CONFIG_RUNTIME_CPUDETECT
# define COMPILE_MMX
# endif
# if ( HAVE_MMX2 || CONFIG_RUNTIME_CPUDETECT) && CONFIG_GPL
# if HAVE_MMX2 || CONFIG_RUNTIME_CPUDETECT
# define COMPILE_MMX2
# endif
# if (( HAVE_AMD3DNOW && !HAVE_MMX2) || CONFIG_RUNTIME_CPUDETECT) && CONFIG_GPL
# if (HAVE_AMD3DNOW && !HAVE_MMX2) || CONFIG_RUNTIME_CPUDETECT
# define COMPILE_3DNOW
# endif
# endif //ARCH_X86
@ -1245,7 +1242,7 @@ SwsFunc ff_getSwsFunc(SwsContext *c)
# if CONFIG_RUNTIME_CPUDETECT
int flags = c - > flags ;
# if ARCH_X86 && CONFIG_GPL
# if ARCH_X86
// ordered per speed fastest first
if ( flags & SWS_CPU_CAPS_MMX2 ) {
sws_init_swScale_MMX2 ( c ) ;
@ -1273,7 +1270,7 @@ SwsFunc ff_getSwsFunc(SwsContext *c)
# endif
sws_init_swScale_C ( c ) ;
return swScale_C ;
# endif /* ARCH_X86 && CONFIG_GPL */
# endif /* ARCH_X86 */
# else //CONFIG_RUNTIME_CPUDETECT
# if COMPILE_TEMPLATE_MMX2
sws_init_swScale_MMX2 ( c ) ;