Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > VSs > VSs__H264__App
diff libavutil/x86/timer.h @ 2:897f711a7157
rearrange to work with autoconf
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Tue, 25 Sep 2012 15:55:33 +0200 |
| parents | |
| children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/libavutil/x86/timer.h Tue Sep 25 15:55:33 2012 +0200 1.3 @@ -0,0 +1,35 @@ 1.4 +/* 1.5 + * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at> 1.6 + * 1.7 + * This file is part of FFmpeg. 1.8 + * 1.9 + * FFmpeg is free software; you can redistribute it and/or 1.10 + * modify it under the terms of the GNU Lesser General Public 1.11 + * License as published by the Free Software Foundation; either 1.12 + * version 2.1 of the License, or (at your option) any later version. 1.13 + * 1.14 + * FFmpeg is distributed in the hope that it will be useful, 1.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 1.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1.17 + * Lesser General Public License for more details. 1.18 + * 1.19 + * You should have received a copy of the GNU Lesser General Public 1.20 + * License along with FFmpeg; if not, write to the Free Software 1.21 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 1.22 + */ 1.23 + 1.24 +#ifndef AVUTIL_X86_TIMER_H 1.25 +#define AVUTIL_X86_TIMER_H 1.26 + 1.27 +#include <stdint.h> 1.28 + 1.29 +#define AV_READ_TIME read_time 1.30 + 1.31 +static inline uint64_t read_time(void) 1.32 +{ 1.33 + uint32_t a, d; 1.34 + __asm__ volatile("rdtsc" : "=a" (a), "=d" (d)); 1.35 + return ((uint64_t)d << 32) + a; 1.36 +} 1.37 + 1.38 +#endif /* AVUTIL_X86_TIMER_H */
