./libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr' make: *** [ffbuild/common.mak:81: libavformat/adtsenc.o] Error 1 更改编译代码方式: cd FFmpeg-n5.1.2/libavcodec/x86/ vim mathops.h 定位到125 先删除125至最后一行,然后添加新的内容
// avoid +32 for shift optimization (gcc should do that ...) #define NEG_SSR32 NEG_SSR32 static inline int32_t NEG_SSR32( int32_t a, int8_t s){ if (__builtin_constant_p(s)) __asm__ ("sarl %1, %0\n\t" : "+r" (a) : "i" (-s & 0x1F) ); else __asm__ ("sarl %1, %0\n\t" : "+r" (a) : "c" ((uint8_t)(-s)) ); return a; } #define NEG_USR32 NEG_USR32 static inline uint32_t NEG_USR32(uint32_t a, int8_t s){ if (__builtin_constant_p(s)) __asm__ ("shrl %1, %0\n\t" : "+r" (a) : "i" (-s & 0x1F) ); else __asm__ ("shrl %1, %0\n\t" : "+r" (a) : "c" ((uint8_t)(-s)) ); return a; } #endif /* HAVE_INLINE_ASM */ #endif /* AVCODEC_X86_MATHOPS_H */
cd ../../ make clean make -j4 make install