Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
b534c7f9
Commit
b534c7f9
authored
May 23, 2003
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some benchmarking code
Originally committed as revision 1901 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
9fe690c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
common.h
libavcodec/common.h
+29
-0
No files found.
libavcodec/common.h
View file @
b534c7f9
...
@@ -1090,6 +1090,35 @@ if((y)<(x)){\
...
@@ -1090,6 +1090,35 @@ if((y)<(x)){\
}
}
#endif
#endif
#ifdef ARCH_X86
static
inline
long
long
rdtsc
()
{
long
long
l
;
asm
volatile
(
"rdtsc
\n\t
"
:
"=A"
(
l
)
);
return
l
;
}
#define START_TIMER \
static uint64_t tsum=0;\
static int tcount=0;\
static int tskip_count=0;\
uint64_t tend;\
uint64_t tstart= rdtsc();\
#define STOP_TIMER(id) \
tend= rdtsc();\
if(tcount<2 || tend - tstart < 4*tsum/tcount){\
tsum+= tend - tstart;\
tcount++;\
}else\
tskip_count++;\
if(256*256*256*64%(tcount+tskip_count)==0){\
fprintf(stderr, "%Ld dezicycles in %s, %d runs, %d skips\n", tsum*10/tcount, id, tcount, tskip_count);\
}
#endif
#define CLAMP_TO_8BIT(d) ((d > 0xff) ? 0xff : (d < 0) ? 0 : d)
#define CLAMP_TO_8BIT(d) ((d > 0xff) ? 0xff : (d < 0) ? 0 : d)
/* avoid usage of various functions */
/* avoid usage of various functions */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment