comparison libxvidff.c @ 12474:cf54b8e98e7a libavcodec

Remove reference to not anymore existing symbol has_altivec and use mm_support instead. Fix compilation if altivec is present and libxvidff.c is compiled.
author stefano
date Wed, 08 Sep 2010 14:36:13 +0000
parents a08f20066719
children 9fef0a8ddd63
comparison
equal deleted inserted replaced
12473:06abedae2906 12474:cf54b8e98e7a
29 #define _XOPEN_SOURCE 600 29 #define _XOPEN_SOURCE 600
30 30
31 #include <xvid.h> 31 #include <xvid.h>
32 #include <unistd.h> 32 #include <unistd.h>
33 #include "avcodec.h" 33 #include "avcodec.h"
34 #include "dsputil.h"
34 #include "libavutil/intreadwrite.h" 35 #include "libavutil/intreadwrite.h"
35 #include "libxvid_internal.h" 36 #include "libxvid_internal.h"
36 #if !HAVE_MKSTEMP 37 #if !HAVE_MKSTEMP
37 #include <fcntl.h> 38 #include <fcntl.h>
38 #endif 39 #endif
41 * Buffer management macros. 42 * Buffer management macros.
42 */ 43 */
43 #define BUFFER_SIZE 1024 44 #define BUFFER_SIZE 1024
44 #define BUFFER_REMAINING(x) (BUFFER_SIZE - strlen(x)) 45 #define BUFFER_REMAINING(x) (BUFFER_SIZE - strlen(x))
45 #define BUFFER_CAT(x) (&((x)[strlen(x)])) 46 #define BUFFER_CAT(x) (&((x)[strlen(x)]))
46
47 /* For PPC Use */
48 int has_altivec(void);
49 47
50 /** 48 /**
51 * Structure for the private Xvid context. 49 * Structure for the private Xvid context.
52 * This stores all the private context for the codec. 50 * This stores all the private context for the codec.
53 */ 51 */
213 xvid_gbl_init.debug = 0; 211 xvid_gbl_init.debug = 0;
214 212
215 #if ARCH_PPC 213 #if ARCH_PPC
216 /* Xvid's PPC support is borked, use libavcodec to detect */ 214 /* Xvid's PPC support is borked, use libavcodec to detect */
217 #if HAVE_ALTIVEC 215 #if HAVE_ALTIVEC
218 if( has_altivec() ) { 216 if (mm_support() & AV_CPU_FLAG_ALTIVEC) {
219 xvid_gbl_init.cpu_flags = XVID_CPU_FORCE | XVID_CPU_ALTIVEC; 217 xvid_gbl_init.cpu_flags = XVID_CPU_FORCE | XVID_CPU_ALTIVEC;
220 } else 218 } else
221 #endif 219 #endif
222 xvid_gbl_init.cpu_flags = XVID_CPU_FORCE; 220 xvid_gbl_init.cpu_flags = XVID_CPU_FORCE;
223 #else 221 #else