Mercurial > mplayer.hg
view my_profile.h @ 2833:1b6c207c0410
Enable MMX stuff
I don't know why Michael Niedermayer disabled it but:
my benchmarks of 25 frames for TIMER+SUBTITLE (measured by RDTSC):
Non-MMX stuff:
total=306142159
MMX stuff:
total=159534150
author | nick |
---|---|
date | Sun, 11 Nov 2001 14:42:10 +0000 |
parents | 99d169b25fbf |
children | b7d3b450f8fd |
line wrap: on
line source
/* * my_profile.h * * Copyright (C) Nick Kurshev <nickols_k@mail.ru> - Oct 2001 * * You can redistribute this file under terms and conditions * of GNU General Public licence v2. * This file is partly based on vbetest.c from lrmi distributive. */ #ifndef MY_PROFILE_INC #define MY_PROFILE_INC extern unsigned long long int my_profile_start,my_profile_end,my_profile_total; #if defined ( ENABLE_PROFILE ) && defined ( ARCH_X86 ) static inline unsigned long long int read_tsc( void ) { unsigned long long int retval; __asm __volatile ("rdtsc":"=A"(retval)::"memory"); return retval; } #define PROFILE_START() (my_profile_start=read_tsc()) #define PROFILE_END(your_message) { my_profile_end=read_tsc(); my_profile_total+=my_profile_end - my_profile_start; printf(your_message" current=%llu total=%llu\n\t",my_profile_end-my_profile_start,my_profile_total); } #else #define PROFILE_INIT() #define PROFILE_START() #define PROFILE_END(your_message) #endif #endif