Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
c10e9f70
Commit
c10e9f70
authored
23 years ago
by
Nick Kurshev
Browse files
Options
Downloads
Patches
Plain Diff
Portability and testing issues
Originally committed as revision 55 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
16fbebe1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavcodec/Makefile
+5
-1
5 additions, 1 deletion
libavcodec/Makefile
libavcodec/i386/cputest.c
+13
-3
13 additions, 3 deletions
libavcodec/i386/cputest.c
with
18 additions
and
4 deletions
libavcodec/Makefile
+
5
−
1
View file @
c10e9f70
...
@@ -37,7 +37,7 @@ LIB= libavcodec.a
...
@@ -37,7 +37,7 @@ LIB= libavcodec.a
TESTS
=
imgresample-test dct-test
TESTS
=
imgresample-test dct-test
all
:
$(LIB)
all
:
$(LIB)
tests
:
apiexample $(TESTS)
tests
:
apiexample
cpuid_test
$(TESTS)
$(LIB)
:
$(OBJS) $(ASM_OBJS)
$(LIB)
:
$(OBJS) $(ASM_OBJS)
rm
-f
$@
rm
-f
$@
...
@@ -70,6 +70,10 @@ distclean: clean
...
@@ -70,6 +70,10 @@ distclean: clean
apiexample
:
apiexample.c $(LIB)
apiexample
:
apiexample.c $(LIB)
$(
CC
)
$(
CFLAGS
)
-o
$@
$<
$(
LIB
)
-lm
$(
CC
)
$(
CFLAGS
)
-o
$@
$<
$(
LIB
)
-lm
# cpuid test
cpuid_test
:
i386/cputest.c
$(
CC
)
$(
CFLAGS
)
-D__TEST__
-o
$@
$<
# testing progs
# testing progs
imgresample-test
:
imgresample.c
imgresample-test
:
imgresample.c
...
...
This diff is collapsed.
Click to expand it.
libavcodec/i386/cputest.c
+
13
−
3
View file @
c10e9f70
...
@@ -6,13 +6,13 @@
...
@@ -6,13 +6,13 @@
/* ebx saving is necessary for PIC. gcc seems unable to see it alone */
/* ebx saving is necessary for PIC. gcc seems unable to see it alone */
#define cpuid(index,eax,ebx,ecx,edx)\
#define cpuid(index,eax,ebx,ecx,edx)\
asm ("movl %%ebx, %%esi\n\t"\
__asm __volatile\
("movl %%ebx, %%esi\n\t"\
"cpuid\n\t"\
"cpuid\n\t"\
"xchgl %%ebx, %%esi"\
"xchgl %%ebx, %%esi"\
: "=a" (eax), "=S" (ebx),\
: "=a" (eax), "=S" (ebx),\
"=c" (ecx), "=d" (edx)\
"=c" (ecx), "=d" (edx)\
: "0" (index)\
: "0" (index));
: "cc")\
/* Function to test if multimedia instructions are supported... */
/* Function to test if multimedia instructions are supported... */
int
mm_support
(
void
)
int
mm_support
(
void
)
...
@@ -102,3 +102,13 @@ int mm_support(void)
...
@@ -102,3 +102,13 @@ int mm_support(void)
return
0
;
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment