#define AVOPTION_SUB(ptr) { .name = NULL, .help = (const char*)ptr }
#define AVOPTION_END() AVOPTION_SUB(NULL)
-struct AVOption;
-#ifdef HAVE_MMX
-extern const struct AVOption avoptions_common[3 + 5];
-#else
-extern const struct AVOption avoptions_common[3];
-#endif
-extern const struct AVOption avoptions_workaround_bug[11];
-
#endif /* HAVE_AV_CONFIG_H */
/* Suppress restrict if it was not defined in config.h. */
#endif
#if defined(ARCH_X86) || defined(ARCH_X86_64)
+#if defined(ARCH_X86_64)
+static inline uint64_t rdtsc(void)
+{
+ uint64_t a, d;
+ asm volatile( "rdtsc\n\t"
+ : "=a" (a), "=d" (d)
+ );
+ return (d << 32) | (a & 0xffffffff);
+}
+#else
static inline long long rdtsc(void)
{
long long l;
);
return l;
}
+#endif
#define START_TIMER \
uint64_t tend;\
#define STOP_TIMER(id) {}
#endif
-#define CLAMP_TO_8BIT(d) ((d > 0xff) ? 0xff : (d < 0) ? 0 : d)
-
/* avoid usage of various functions */
#define malloc please_use_av_malloc
#define free please_use_av_free