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
c10e9f70
Commit
c10e9f70
authored
Aug 08, 2001
by
Nick Kurshev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Portability and testing issues
Originally committed as revision 55 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
16fbebe1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
Makefile
libavcodec/Makefile
+5
-1
cputest.c
libavcodec/i386/cputest.c
+13
-3
No files found.
libavcodec/Makefile
View file @
c10e9f70
...
...
@@ -37,7 +37,7 @@ LIB= libavcodec.a
TESTS
=
imgresample-test dct-test
all
:
$(LIB)
tests
:
apiexample $(TESTS)
tests
:
apiexample
cpuid_test
$(TESTS)
$(LIB)
:
$(OBJS) $(ASM_OBJS)
rm
-f
$@
...
...
@@ -70,6 +70,10 @@ distclean: clean
apiexample
:
apiexample.c $(LIB)
$(CC)
$(CFLAGS)
-o
$@
$<
$(LIB)
-lm
# cpuid test
cpuid_test
:
i386/cputest.c
$(CC)
$(CFLAGS)
-D__TEST__
-o
$@
$<
# testing progs
imgresample-test
:
imgresample.c
...
...
libavcodec/i386/cputest.c
View file @
c10e9f70
...
...
@@ -6,13 +6,13 @@
/* ebx saving is necessary for PIC. gcc seems unable to see it alone */
#define cpuid(index,eax,ebx,ecx,edx)\
asm ("movl %%ebx, %%esi\n\t"\
__asm __volatile\
("movl %%ebx, %%esi\n\t"\
"cpuid\n\t"\
"xchgl %%ebx, %%esi"\
: "=a" (eax), "=S" (ebx),\
"=c" (ecx), "=d" (edx)\
: "0" (index)\
: "cc")\
: "0" (index));
/* Function to test if multimedia instructions are supported... */
int
mm_support
(
void
)
...
...
@@ -102,3 +102,13 @@ int mm_support(void)
return
0
;
}
}
#ifdef __TEST__
int
main
(
void
)
{
int
mm_flags
;
mm_flags
=
mm_support
();
printf
(
"mm_support = 0x%08u
\n
"
,
mm_flags
);
return
0
;
}
#endif
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