Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
d8e44fce
Commit
d8e44fce
authored
Dec 13, 2001
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Fixed aspect ratio handling. * Fixed potential compilation issues under eg. BSD/OS.
parent
fb39f2e7
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
747 additions
and
653 deletions
+747
-653
Makefile.opts.in
Makefile.opts.in
+3
-0
configure
configure
+189
-179
configure.in
configure.in
+9
-1
include/common.h
include/common.h
+4
-3
include/modules_export.h
include/modules_export.h
+2
-0
include/video.h
include/video.h
+36
-19
include/video_output.h
include/video_output.h
+24
-70
plugins/directx/vout_directx.c
plugins/directx/vout_directx.c
+2
-2
plugins/dummy/vout_dummy.c
plugins/dummy/vout_dummy.c
+104
-66
plugins/imdct/Makefile
plugins/imdct/Makefile
+3
-3
plugins/mpeg_vdec/video_parser.h
plugins/mpeg_vdec/video_parser.h
+2
-2
plugins/mpeg_vdec/vpar_headers.c
plugins/mpeg_vdec/vpar_headers.c
+9
-15
plugins/sdl/vout_sdl.c
plugins/sdl/vout_sdl.c
+61
-42
plugins/x11/vout_common.c
plugins/x11/vout_common.c
+17
-19
plugins/x11/vout_common.h
plugins/x11/vout_common.h
+3
-3
plugins/x11/vout_xvideo.c
plugins/x11/vout_xvideo.c
+72
-96
src/video_output/video_output.c
src/video_output/video_output.c
+68
-39
src/video_output/vout_pictures.c
src/video_output/vout_pictures.c
+120
-81
src/video_output/vout_subpictures.c
src/video_output/vout_subpictures.c
+19
-13
No files found.
Makefile.opts.in
View file @
d8e44fce
...
...
@@ -80,6 +80,9 @@ LIB_GGI = @LIB_GGI@
LIB_GLIDE
=
@LIB_GLIDE@
LIB_GNOME
=
@LIB_GNOME@
LIB_GTK
=
@LIB_GTK@
LIB_IMDCT
=
@LIB_IMDCT@
LIB_IMDCT3DN
=
@LIB_IMDCT3DN@
LIB_IMDCTSSE
=
@LIB_IMDCTSSE@
LIB_KDE
=
@LIB_KDE@
LIB_LIBDVDCSS
=
@LIB_LIBDVDCSS@
LIB_MACOSX
=
@LIB_MACOSX@
...
...
configure
View file @
d8e44fce
...
...
@@ -4468,6 +4468,10 @@ fi
if
eval
"test
\"
`
echo
'$ac_cv_lib_'
$ac_lib_var
`
\"
= yes"
;
then
echo
"
$ac_t
""yes"
1>&6
LIB_YUV
=
"
${
LIB_YUV
}
-lm"
LIB_IMDCT
=
"
${
LIB_IMDCT
}
-lm"
LIB_IMDCT3DN
=
"
${
LIB_IMDCT3DN
}
-lm"
LIB_IMDCTSSE
=
"
${
LIB_IMDCTSSE
}
-lm"
else
echo
"
$ac_t
""no"
1>&6
fi
...
...
@@ -4476,7 +4480,7 @@ fi
THREAD_LIB
=
error
if
test
"x
${
THREAD_LIB
}
"
=
xerror
;
then
echo
$ac_n
"checking for pthread_attr_init in -lpthread""...
$ac_c
"
1>&6
echo
"configure:448
0
: checking for pthread_attr_init in -lpthread"
>
&5
echo
"configure:448
4
: checking for pthread_attr_init in -lpthread"
>
&5
ac_lib_var
=
`
echo
pthread
'_'
pthread_attr_init |
sed
'y%./+-%__p_%'
`
if
eval
"test
\"
`
echo
'$''{'
ac_cv_lib_
$ac_lib_var
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
...
...
@@ -4484,7 +4488,7 @@ else
ac_save_LIBS
=
"
$LIBS
"
LIBS
=
"-lpthread
$LIBS
"
cat
>
conftest.
$ac_ext
<<
EOF
#line 44
88
"configure"
#line 44
92
"configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
...
...
@@ -4495,7 +4499,7 @@ int main() {
pthread_attr_init()
; return 0; }
EOF
if
{
(
eval echo
configure:4
499
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:4
503
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
eval
"ac_cv_lib_
$ac_lib_var
=yes"
else
...
...
@@ -4518,7 +4522,7 @@ fi
fi
if
test
"x
${
THREAD_LIB
}
"
=
xerror
;
then
echo
$ac_n
"checking for pthread_attr_init in -lpthreads""...
$ac_c
"
1>&6
echo
"configure:452
2
: checking for pthread_attr_init in -lpthreads"
>
&5
echo
"configure:452
6
: checking for pthread_attr_init in -lpthreads"
>
&5
ac_lib_var
=
`
echo
pthreads
'_'
pthread_attr_init |
sed
'y%./+-%__p_%'
`
if
eval
"test
\"
`
echo
'$''{'
ac_cv_lib_
$ac_lib_var
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
...
...
@@ -4526,7 +4530,7 @@ else
ac_save_LIBS
=
"
$LIBS
"
LIBS
=
"-lpthreads
$LIBS
"
cat
>
conftest.
$ac_ext
<<
EOF
#line 453
0
"configure"
#line 453
4
"configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
...
...
@@ -4537,7 +4541,7 @@ int main() {
pthread_attr_init()
; return 0; }
EOF
if
{
(
eval echo
configure:454
1
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:454
5
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
eval
"ac_cv_lib_
$ac_lib_var
=yes"
else
...
...
@@ -4560,7 +4564,7 @@ fi
fi
if
test
"x
${
THREAD_LIB
}
"
=
xerror
;
then
echo
$ac_n
"checking for pthread_attr_init in -lc_r""...
$ac_c
"
1>&6
echo
"configure:456
4
: checking for pthread_attr_init in -lc_r"
>
&5
echo
"configure:456
8
: checking for pthread_attr_init in -lc_r"
>
&5
ac_lib_var
=
`
echo
c_r
'_'
pthread_attr_init |
sed
'y%./+-%__p_%'
`
if
eval
"test
\"
`
echo
'$''{'
ac_cv_lib_
$ac_lib_var
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
...
...
@@ -4568,7 +4572,7 @@ else
ac_save_LIBS
=
"
$LIBS
"
LIBS
=
"-lc_r
$LIBS
"
cat
>
conftest.
$ac_ext
<<
EOF
#line 457
2
"configure"
#line 457
6
"configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
...
...
@@ -4579,7 +4583,7 @@ int main() {
pthread_attr_init()
; return 0; }
EOF
if
{
(
eval echo
configure:458
3
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:458
7
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
eval
"ac_cv_lib_
$ac_lib_var
=yes"
else
...
...
@@ -4602,12 +4606,12 @@ fi
fi
if
test
"x
${
THREAD_LIB
}
"
=
xerror
;
then
echo
$ac_n
"checking for pthread_attr_init""...
$ac_c
"
1>&6
echo
"configure:46
06
: checking for pthread_attr_init"
>
&5
echo
"configure:46
10
: checking for pthread_attr_init"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_func_pthread_attr_init
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 461
1
"configure"
#line 461
5
"configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char pthread_attr_init(); below. */
...
...
@@ -4630,7 +4634,7 @@ pthread_attr_init();
; return 0; }
EOF
if
{
(
eval echo
configure:463
4
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:463
8
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
eval
"ac_cv_func_pthread_attr_init=yes"
else
...
...
@@ -4653,7 +4657,7 @@ fi
fi
echo
$ac_n
"checking for cthread_fork in -lthreads""...
$ac_c
"
1>&6
echo
"configure:46
57
: checking for cthread_fork in -lthreads"
>
&5
echo
"configure:46
61
: checking for cthread_fork in -lthreads"
>
&5
ac_lib_var
=
`
echo
threads
'_'
cthread_fork |
sed
'y%./+-%__p_%'
`
if
eval
"test
\"
`
echo
'$''{'
ac_cv_lib_
$ac_lib_var
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
...
...
@@ -4661,7 +4665,7 @@ else
ac_save_LIBS
=
"
$LIBS
"
LIBS
=
"-lthreads
$LIBS
"
cat
>
conftest.
$ac_ext
<<
EOF
#line 466
5
"configure"
#line 466
9
"configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
...
...
@@ -4672,7 +4676,7 @@ int main() {
cthread_fork()
; return 0; }
EOF
if
{
(
eval echo
configure:46
76
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:46
80
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
eval
"ac_cv_lib_
$ac_lib_var
=yes"
else
...
...
@@ -4694,7 +4698,7 @@ fi
cat
>
conftest.
$ac_ext
<<
EOF
#line 4
698
"configure"
#line 4
702
"configure"
#include "confdefs.h"
#include <pthread.h>
EOF
...
...
@@ -4710,7 +4714,7 @@ fi
rm
-f
conftest
*
cat
>
conftest.
$ac_ext
<<
EOF
#line 471
4
"configure"
#line 471
8
"configure"
#include "confdefs.h"
#include <strings.h>
EOF
...
...
@@ -4730,17 +4734,17 @@ for ac_hdr in stddef.h getopt.h strings.h
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:473
4
: checking for
$ac_hdr
"
>
&5
echo
"configure:473
8
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 47
39
"configure"
#line 47
43
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:474
4
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:474
8
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -4770,17 +4774,17 @@ for ac_hdr in sys/sockio.h fcntl.h sys/time.h sys/times.h
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:477
4
: checking for
$ac_hdr
"
>
&5
echo
"configure:477
8
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 47
79
"configure"
#line 47
83
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:478
4
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:478
8
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -4810,17 +4814,17 @@ for ac_hdr in sys/soundcard.h machine/soundcard.h
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:481
4
: checking for
$ac_hdr
"
>
&5
echo
"configure:481
8
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 48
19
"configure"
#line 48
23
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:482
4
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:482
8
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -4850,17 +4854,17 @@ for ac_hdr in dlfcn.h image.h
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:485
4
: checking for
$ac_hdr
"
>
&5
echo
"configure:485
8
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 48
59
"configure"
#line 48
63
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:486
4
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:486
8
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -4890,17 +4894,17 @@ for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:489
4
: checking for
$ac_hdr
"
>
&5
echo
"configure:489
8
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 4
899
"configure"
#line 4
903
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:490
4
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:490
8
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -4930,17 +4934,17 @@ for ac_hdr in machine/param.h
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:493
4
: checking for
$ac_hdr
"
>
&5
echo
"configure:493
8
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 49
39
"configure"
#line 49
43
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:494
4
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:494
8
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -4971,17 +4975,17 @@ for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:497
5
: checking for
$ac_hdr
"
>
&5
echo
"configure:497
9
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 498
0
"configure"
#line 498
4
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:498
5
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:498
9
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -5009,20 +5013,20 @@ done
echo
$ac_n
"checking for ntohl in sys/param.h""...
$ac_c
"
1>&6
echo
"configure:501
3
: checking for ntohl in sys/param.h"
>
&5
echo
"configure:501
7
: checking for ntohl in sys/param.h"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_c_ntohl_sys_param_h
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
CFLAGS
=
"
${
save_CFLAGS
}
-Wall -Werror"
cat
>
conftest.
$ac_ext
<<
EOF
#line 50
19
"configure"
#line 50
23
"configure"
#include "confdefs.h"
#include <sys/param.h>
int main() {
void foo() { int meuh; ntohl(meuh); }
; return 0; }
EOF
if
{
(
eval echo
configure:50
26
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:50
30
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_c_ntohl_sys_param_h
=
yes
else
...
...
@@ -5043,20 +5047,20 @@ EOF
fi
echo
$ac_n
"checking if
\$
CC accepts -finline-limit""...
$ac_c
"
1>&6
echo
"configure:50
47
: checking if
\$
CC accepts -finline-limit"
>
&5
echo
"configure:50
51
: checking if
\$
CC accepts -finline-limit"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_c_inline_limit
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
CFLAGS
=
"
${
save_CFLAGS
}
-finline-limit-30000"
cat
>
conftest.
$ac_ext
<<
EOF
#line 505
3
"configure"
#line 505
7
"configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if
{
(
eval echo
configure:506
0
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:506
4
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_c_inline_limit
=
yes
else
...
...
@@ -5074,20 +5078,20 @@ if test x"$ac_cv_c_inline_limit" != x"no"; then
fi
echo
$ac_n
"checking if
\$
CC accepts -bundle -undefined error""...
$ac_c
"
1>&6
echo
"configure:50
78
: checking if
\$
CC accepts -bundle -undefined error"
>
&5
echo
"configure:50
82
: checking if
\$
CC accepts -bundle -undefined error"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_ld_darwin
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
CFLAGS
=
"
${
save_CFLAGS
}
-bundle -undefined error"
cat
>
conftest.
$ac_ext
<<
EOF
#line 508
4
"configure"
#line 508
8
"configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if
{
(
eval echo
configure:509
1
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:509
5
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_ld_darwin
=
yes
else
...
...
@@ -5105,20 +5109,20 @@ if test x"$ac_cv_ld_darwin" != x"no"; then
fi
echo
$ac_n
"checking if
\$
CC accepts -shared""...
$ac_c
"
1>&6
echo
"configure:51
09
: checking if
\$
CC accepts -shared"
>
&5
echo
"configure:51
13
: checking if
\$
CC accepts -shared"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_ld_plugins
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
CFLAGS
=
"
${
save_CFLAGS
}
-shared"
cat
>
conftest.
$ac_ext
<<
EOF
#line 511
5
"configure"
#line 511
9
"configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if
{
(
eval echo
configure:512
2
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:512
6
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_ld_plugins
=
yes
else
...
...
@@ -5137,7 +5141,7 @@ fi
if
test
x
"
${
SOFLAGS
}
"
=
x
;
then
echo
$ac_n
"checking for soname setting""...
$ac_c
"
1>&6
echo
"configure:514
1
: checking for soname setting"
>
&5
echo
"configure:514
5
: checking for soname setting"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_ld_soname
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -5146,14 +5150,14 @@ else
try_SOFLAGS
=
"-Wl,-soname -Wl,"
LDFLAGS
=
"
${
save_LDFLAGS
}
${
try_SOFLAGS
}
foo.so.0"
cat
>
conftest.
$ac_ext
<<
EOF
#line 515
0
"configure"
#line 515
4
"configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if
{
(
eval echo
configure:51
57
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:51
61
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
ac_cv_ld_soname
=
"
${
try_SOFLAGS
}
"
else
...
...
@@ -5165,14 +5169,14 @@ else
try_SOFLAGS
=
"-Wl,-h -Wl,"
LDFLAGS
=
"
${
save_LDFLAGS
}
${
try_SOFLAGS
}
foo.so.0"
cat
>
conftest.
$ac_ext
<<
EOF
#line 51
69
"configure"
#line 51
73
"configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if
{
(
eval echo
configure:51
76
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:51
80
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
ac_cv_ld_soname
=
"
${
try_SOFLAGS
}
"
else
...
...
@@ -5201,7 +5205,7 @@ have problems using libdvdcss.
fi
echo
$ac_n
"checking __attribute__ ((aligned ())) support""...
$ac_c
"
1>&6
echo
"configure:520
5
: checking __attribute__ ((aligned ())) support"
>
&5
echo
"configure:520
9
: checking __attribute__ ((aligned ())) support"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_c_attribute_aligned
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -5209,14 +5213,14 @@ else
CFLAGS
=
"
${
save_CFLAGS
}
-Werror"
for
ac_cv_c_attr_align_try
in
2 4 8 16 32 64
;
do
cat
>
conftest.
$ac_ext
<<
EOF
#line 521
3
"configure"
#line 521
7
"configure"
#include "confdefs.h"
int main() {
static char c __attribute__ ((aligned(
$ac_cv_c_attr_align_try
))) = 0; return c;
; return 0; }
EOF
if
{
(
eval echo
configure:522
0
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:522
4
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_c_attribute_aligned
=
$ac_cv_c_attr_align_try
else
...
...
@@ -5239,19 +5243,19 @@ CFLAGS="${save_CFLAGS}"
LDFLAGS
=
"
${
save_LDFLAGS
}
"
echo
$ac_n
"checking for boolean_t in sys/types.h""...
$ac_c
"
1>&6
echo
"configure:524
3
: checking for boolean_t in sys/types.h"
>
&5
echo
"configure:524
7
: checking for boolean_t in sys/types.h"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_c_boolean_t_sys_types_h
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 52
48
"configure"
#line 52
52
"configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
boolean_t foo;
; return 0; }
EOF
if
{
(
eval echo
configure:525
5
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:525
9
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_c_boolean_t_sys_types_h
=
yes
else
...
...
@@ -5272,19 +5276,19 @@ EOF
fi
echo
$ac_n
"checking for boolean_t in pthread.h""...
$ac_c
"
1>&6
echo
"configure:52
76
: checking for boolean_t in pthread.h"
>
&5
echo
"configure:52
80
: checking for boolean_t in pthread.h"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_c_boolean_t_pthread_h
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 528
1
"configure"
#line 528
5
"configure"
#include "confdefs.h"
#include <pthread.h>
int main() {
boolean_t foo;
; return 0; }
EOF
if
{
(
eval echo
configure:52
88
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:52
92
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_c_boolean_t_pthread_h
=
yes
else
...
...
@@ -5305,19 +5309,19 @@ EOF
fi
echo
$ac_n
"checking for boolean_t in cthreads.h""...
$ac_c
"
1>&6
echo
"configure:53
09
: checking for boolean_t in cthreads.h"
>
&5
echo
"configure:53
13
: checking for boolean_t in cthreads.h"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_c_boolean_t_cthreads_h
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 531
4
"configure"
#line 531
8
"configure"
#include "confdefs.h"
#include <cthreads.h>
int main() {
boolean_t foo;
; return 0; }
EOF
if
{
(
eval echo
configure:532
1
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:532
5
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_c_boolean_t_cthreads_h
=
yes
else
...
...
@@ -5338,12 +5342,12 @@ EOF
fi
echo
$ac_n
"checking for working const""...
$ac_c
"
1>&6
echo
"configure:534
2
: checking for working const"
>
&5
echo
"configure:534
6
: checking for working const"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_c_const
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 53
47
"configure"
#line 53
51
"configure"
#include "confdefs.h"
int main() {
...
...
@@ -5392,7 +5396,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
if
{
(
eval echo
configure:5
396
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:5
400
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_c_const
=
yes
else
...
...
@@ -5413,12 +5417,12 @@ EOF
fi
echo
$ac_n
"checking for size_t""...
$ac_c
"
1>&6
echo
"configure:54
17
: checking for size_t"
>
&5
echo
"configure:54
21
: checking for size_t"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_type_size_t
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 542
2
"configure"
#line 542
6
"configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
...
...
@@ -5446,12 +5450,12 @@ EOF
fi
echo
$ac_n
"checking whether time.h and sys/time.h may both be included""...
$ac_c
"
1>&6
echo
"configure:545
0
: checking whether time.h and sys/time.h may both be included"
>
&5
echo
"configure:545
4
: checking whether time.h and sys/time.h may both be included"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_time
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 545
5
"configure"
#line 545
9
"configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
...
...
@@ -5460,7 +5464,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
if
{
(
eval echo
configure:546
4
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:546
8
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_header_time
=
yes
else
...
...
@@ -5495,19 +5499,19 @@ SSE_MODULES="imdctsse downmixsse"
ALTIVEC_MODULES
=
"idctaltivec motionaltivec"
echo
$ac_n
"checking if
\$
CC groks MMX inline assembly""...
$ac_c
"
1>&6
echo
"configure:5
499
: checking if
\$
CC groks MMX inline assembly"
>
&5
echo
"configure:5
503
: checking if
\$
CC groks MMX inline assembly"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_mmx_inline
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 550
4
"configure"
#line 550
8
"configure"
#include "confdefs.h"
int main() {
void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));
; return 0; }
EOF
if
{
(
eval echo
configure:551
1
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:551
5
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_mmx_inline
=
yes
else
...
...
@@ -5525,19 +5529,19 @@ if test x"$ac_cv_mmx_inline" != x"no"; then
fi
echo
$ac_n
"checking if
\$
CC groks MMX EXT inline assembly""...
$ac_c
"
1>&6
echo
"configure:55
29
: checking if
\$
CC groks MMX EXT inline assembly"
>
&5
echo
"configure:55
33
: checking if
\$
CC groks MMX EXT inline assembly"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_mmxext_inline
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 553
4
"configure"
#line 553
8
"configure"
#include "confdefs.h"
int main() {
void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));
; return 0; }
EOF
if
{
(
eval echo
configure:554
1
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:554
5
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_mmxext_inline
=
yes
else
...
...
@@ -5555,19 +5559,19 @@ if test x"$ac_cv_mmxext_inline" != x"no"; then
fi
echo
$ac_n
"checking if
\$
CC groks 3D Now! inline assembly""...
$ac_c
"
1>&6
echo
"configure:55
59
: checking if
\$
CC groks 3D Now! inline assembly"
>
&5
echo
"configure:55
63
: checking if
\$
CC groks 3D Now! inline assembly"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_3dnow_inline
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 556
4
"configure"
#line 556
8
"configure"
#include "confdefs.h"
int main() {
void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));
; return 0; }
EOF
if
{
(
eval echo
configure:557
1
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:557
5
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_3dnow_inline
=
yes
else
...
...
@@ -5589,19 +5593,19 @@ EOF
fi
echo
$ac_n
"checking if
\$
CC groks SSE inline assembly""...
$ac_c
"
1>&6
echo
"configure:559
3
: checking if
\$
CC groks SSE inline assembly"
>
&5
echo
"configure:559
7
: checking if
\$
CC groks SSE inline assembly"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_sse_inline
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 5
598
"configure"
#line 5
602
"configure"
#include "confdefs.h"
int main() {
void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));
; return 0; }
EOF
if
{
(
eval echo
configure:560
5
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:560
9
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_sse_inline
=
yes
else
...
...
@@ -5623,19 +5627,19 @@ EOF
fi
echo
$ac_n
"checking if
\$
CC groks Altivec inline assembly""...
$ac_c
"
1>&6
echo
"configure:56
27
: checking if
\$
CC groks Altivec inline assembly"
>
&5
echo
"configure:56
31
: checking if
\$
CC groks Altivec inline assembly"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_altivec_inline
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 563
2
"configure"
#line 563
6
"configure"
#include "confdefs.h"
int main() {
asm volatile("vperm 0,1,2,3");
; return 0; }
EOF
if
{
(
eval echo
configure:56
39
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:56
43
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_altivec_inline
=
yes
else
...
...
@@ -5645,14 +5649,14 @@ else
save_CFLAGS
=
$CFLAGS
CFLAGS
=
"
$CFLAGS
-Wa,-m7400"
cat
>
conftest.
$ac_ext
<<
EOF
#line 56
49
"configure"
#line 56
53
"configure"
#include "confdefs.h"
int main() {
asm volatile("vperm 0,1,2,3");
; return 0; }
EOF
if
{
(
eval echo
configure:56
56
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:56
60
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_altivec_inline
=
"-Wa,-m7400"
else
...
...
@@ -5681,7 +5685,7 @@ EOF
fi
echo
$ac_n
"checking if
\$
CC groks Altivec C extensions""...
$ac_c
"
1>&6
echo
"configure:568
5
: checking if
\$
CC groks Altivec C extensions"
>
&5
echo
"configure:568
9
: checking if
\$
CC groks Altivec C extensions"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_c_altivec
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -5689,14 +5693,14 @@ else
CFLAGS
=
"
$CFLAGS
-faltivec"
# Darwin test
cat
>
conftest.
$ac_ext
<<
EOF
#line 569
3
"configure"
#line 569
7
"configure"
#include "confdefs.h"
int main() {
vec_mtvscr((vector unsigned int)(0));
; return 0; }
EOF
if
{
(
eval echo
configure:570
0
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:570
4
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_c_altivec
=
-faltivec
else
...
...
@@ -5707,14 +5711,14 @@ else
# Linux/PPC test
CFLAGS
=
"
$save_CFLAGS
$CFLAGS_ALTIVEC
-fvec"
cat
>
conftest.
$ac_ext
<<
EOF
#line 571
1
"configure"
#line 571
5
"configure"
#include "confdefs.h"
int main() {
vec_mtvscr((vector unsigned int)(0));
; return 0; }
EOF
if
{
(
eval echo
configure:57
18
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:57
22
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_c_altivec
=
"-fvec"
else
...
...
@@ -5742,21 +5746,21 @@ EOF
fi
echo
$ac_n
"checking if linker needs -framework vecLib""...
$ac_c
"
1>&6
echo
"configure:57
46
: checking if linker needs -framework vecLib"
>
&5
echo
"configure:57
50
: checking if linker needs -framework vecLib"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_ld_altivec
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
save_LDFLAGS
=
$LDFLAGS
LDFLAGS
=
"
$LDFLAGS
-framework vecLib"
cat
>
conftest.
$ac_ext
<<
EOF
#line 575
3
"configure"
#line 575
7
"configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if
{
(
eval echo
configure:576
0
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:576
4
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
ac_cv_ld_altivec
=
yes
else
...
...
@@ -5802,7 +5806,7 @@ if test $SYS = mingw32; then
# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
set
dummy
${
ac_tool_prefix
}
windres
;
ac_word
=
$2
echo
$ac_n
"checking for
$ac_word
""...
$ac_c
"
1>&6
echo
"configure:58
06
: checking for
$ac_word
"
>
&5
echo
"configure:58
10
: checking for
$ac_word
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_prog_WINDRES
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -5834,7 +5838,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "windres", so it can be a program name with args.
set
dummy windres
;
ac_word
=
$2
echo
$ac_n
"checking for
$ac_word
""...
$ac_c
"
1>&6
echo
"configure:58
38
: checking for
$ac_word
"
>
&5
echo
"configure:58
42
: checking for
$ac_word
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_prog_WINDRES
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -5877,17 +5881,17 @@ for ac_hdr in winioctl.h
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:588
1
: checking for
$ac_hdr
"
>
&5
echo
"configure:588
5
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 58
86
"configure"
#line 58
90
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:589
1
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:589
5
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -5920,17 +5924,17 @@ for ac_hdr in sys/ioctl.h
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:592
4
: checking for
$ac_hdr
"
>
&5
echo
"configure:592
8
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 59
29
"configure"
#line 59
33
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:593
4
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:593
8
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -5956,17 +5960,17 @@ EOF
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:596
0
: checking for
$ac_hdr
"
>
&5
echo
"configure:596
4
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 596
5
"configure"
#line 596
9
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:597
0
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:597
4
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -5996,7 +6000,7 @@ done
LINUX_DVD_STRUCT
=
0
OPENBSD_DVD_STRUCT
=
0
cat
>
conftest.
$ac_ext
<<
EOF
#line 600
0
"configure"
#line 600
4
"configure"
#include "confdefs.h"
#include <sys/cdio.h>
EOF
...
...
@@ -6009,7 +6013,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
EOF
cat
>
conftest.
$ac_ext
<<
EOF
#line 601
3
"configure"
#line 601
7
"configure"
#include "confdefs.h"
#include <sys/cdio.h>
EOF
...
...
@@ -6029,7 +6033,7 @@ fi
rm
-f
conftest
*
cat
>
conftest.
$ac_ext
<<
EOF
#line 603
3
"configure"
#line 603
7
"configure"
#include "confdefs.h"
#include <sys/dvdio.h>
EOF
...
...
@@ -6042,7 +6046,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
EOF
cat
>
conftest.
$ac_ext
<<
EOF
#line 60
46
"configure"
#line 60
50
"configure"
#include "confdefs.h"
#include <sys/dvdio.h>
EOF
...
...
@@ -6062,7 +6066,7 @@ fi
rm
-f
conftest
*
cat
>
conftest.
$ac_ext
<<
EOF
#line 60
66
"configure"
#line 60
70
"configure"
#include "confdefs.h"
#include <linux/cdrom.h>
EOF
...
...
@@ -6081,7 +6085,7 @@ rm -f conftest*
NEED_BSDI_LIBDVD
=
0
cat
>
conftest.
$ac_ext
<<
EOF
#line 608
5
"configure"
#line 608
9
"configure"
#include "confdefs.h"
#include <dvd.h>
EOF
...
...
@@ -6103,17 +6107,17 @@ else
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:61
07
: checking for
$ac_hdr
"
>
&5
echo
"configure:61
11
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 611
2
"configure"
#line 611
6
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:61
17
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:61
21
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -6153,17 +6157,17 @@ rm -f conftest*
ac_safe
=
`
echo
"sys/scsi/scsi_types.h"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for sys/scsi/scsi_types.h""...
$ac_c
"
1>&6
echo
"configure:61
57
: checking for sys/scsi/scsi_types.h"
>
&5
echo
"configure:61
61
: checking for sys/scsi/scsi_types.h"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 616
2
"configure"
#line 616
6
"configure"
#include "confdefs.h"
#include <sys/scsi/scsi_types.h>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:61
67
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:61
71
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -6182,17 +6186,17 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
ac_safe
=
`
echo
"sys/scsi/impl/uscsi.h"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for sys/scsi/impl/uscsi.h""...
$ac_c
"
1>&6
echo
"configure:61
86
: checking for sys/scsi/impl/uscsi.h"
>
&5
echo
"configure:61
90
: checking for sys/scsi/impl/uscsi.h"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 619
1
"configure"
#line 619
5
"configure"
#include "confdefs.h"
#include <sys/scsi/impl/uscsi.h>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:6
196
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:6
200
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -6225,17 +6229,17 @@ fi
ac_safe
=
`
echo
"sys/scsi.h"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for sys/scsi.h""...
$ac_c
"
1>&6
echo
"configure:62
29
: checking for sys/scsi.h"
>
&5
echo
"configure:62
33
: checking for sys/scsi.h"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 623
4
"configure"
#line 623
8
"configure"
#include "confdefs.h"
#include <sys/scsi.h>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:62
39
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:62
43
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -6253,7 +6257,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo
"
$ac_t
""yes"
1>&6
cat
>
conftest.
$ac_ext
<<
EOF
#line 62
57
"configure"
#line 62
61
"configure"
#include "confdefs.h"
#include <sys/scsi.h>
EOF
...
...
@@ -6399,7 +6403,7 @@ if test "${enable_pth+set}" = set; then
enableval
=
"
$enable_pth
"
if
test
x
$enableval
=
xyes
;
then
echo
$ac_n
"checking for pth_init in -lpth""...
$ac_c
"
1>&6
echo
"configure:640
3
: checking for pth_init in -lpth"
>
&5
echo
"configure:640
7
: checking for pth_init in -lpth"
>
&5
ac_lib_var
=
`
echo
pth
'_'
pth_init |
sed
'y%./+-%__p_%'
`
if
eval
"test
\"
`
echo
'$''{'
ac_cv_lib_
$ac_lib_var
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
...
...
@@ -6407,7 +6411,7 @@ else
ac_save_LIBS
=
"
$LIBS
"
LIBS
=
"-lpth
$LIBS
"
cat
>
conftest.
$ac_ext
<<
EOF
#line 641
1
"configure"
#line 641
5
"configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
...
...
@@ -6418,7 +6422,7 @@ int main() {
pth_init()
; return 0; }
EOF
if
{
(
eval echo
configure:642
2
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:642
6
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
eval
"ac_cv_lib_
$ac_lib_var
=yes"
else
...
...
@@ -6446,7 +6450,7 @@ else
fi
cat
>
conftest.
$ac_ext
<<
EOF
#line 645
0
"configure"
#line 645
4
"configure"
#include "confdefs.h"
#include <pth.h>
EOF
...
...
@@ -6567,7 +6571,7 @@ fi
if
test
x
$enable_vcd
!=
xno
then
cat
>
conftest.
$ac_ext
<<
EOF
#line 657
1
"configure"
#line 657
5
"configure"
#include "confdefs.h"
#include <linux/cdrom.h>
EOF
...
...
@@ -6641,17 +6645,17 @@ if test "${with_mad+set}" = set; then
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:664
5
: checking for
$ac_hdr
"
>
&5
echo
"configure:664
9
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 665
0
"configure"
#line 665
4
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:665
5
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:665
9
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -6681,7 +6685,7 @@ fi
done
echo
$ac_n
"checking for mad_bit_init in -lmad""...
$ac_c
"
1>&6
echo
"configure:668
5
: checking for mad_bit_init in -lmad"
>
&5
echo
"configure:668
9
: checking for mad_bit_init in -lmad"
>
&5
ac_lib_var
=
`
echo
mad
'_'
mad_bit_init |
sed
'y%./+-%__p_%'
`
if
eval
"test
\"
`
echo
'$''{'
ac_cv_lib_
$ac_lib_var
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
...
...
@@ -6689,7 +6693,7 @@ else
ac_save_LIBS
=
"
$LIBS
"
LIBS
=
"-lmad
$LIBS
"
cat
>
conftest.
$ac_ext
<<
EOF
#line 669
3
"configure"
#line 669
7
"configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
...
...
@@ -6700,7 +6704,7 @@ int main() {
mad_bit_init()
; return 0; }
EOF
if
{
(
eval echo
configure:670
4
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:670
8
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
eval
"ac_cv_lib_
$ac_lib_var
=yes"
else
...
...
@@ -6770,7 +6774,7 @@ if test "${enable_esd+set}" = set; then
# Extract the first word of "esd-config", so it can be a program name with args.
set
dummy esd-config
;
ac_word
=
$2
echo
$ac_n
"checking for
$ac_word
""...
$ac_c
"
1>&6
echo
"configure:677
4
: checking for
$ac_word
"
>
&5
echo
"configure:677
8
: checking for
$ac_word
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_path_ESD_CONFIG
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -6821,7 +6825,7 @@ if test "${enable_arts+set}" = set; then
# Extract the first word of "artsc-config", so it can be a program name with args.
set
dummy artsc-config
;
ac_word
=
$2
echo
$ac_n
"checking for
$ac_word
""...
$ac_c
"
1>&6
echo
"configure:682
5
: checking for
$ac_word
"
>
&5
echo
"configure:682
9
: checking for
$ac_word
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_path_ARTS_CONFIG
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -6878,17 +6882,17 @@ else
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:688
2
: checking for
$ac_hdr
"
>
&5
echo
"configure:688
6
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 68
87
"configure"
#line 68
91
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:689
2
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:689
6
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -6932,17 +6936,17 @@ fi
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:69
36
: checking for
$ac_hdr
"
>
&5
echo
"configure:69
40
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 694
1
"configure"
#line 694
5
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:69
46
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:69
50
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -7020,7 +7024,7 @@ fi
# Extract the first word of "sdl12-config", so it can be a program name with args.
set
dummy sdl12-config
;
ac_word
=
$2
echo
$ac_n
"checking for
$ac_word
""...
$ac_c
"
1>&6
echo
"configure:702
4
: checking for
$ac_word
"
>
&5
echo
"configure:702
8
: checking for
$ac_word
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_path_SDL12_CONFIG
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -7060,7 +7064,7 @@ fi
# Extract the first word of "sdl11-config", so it can be a program name with args.
set
dummy sdl11-config
;
ac_word
=
$2
echo
$ac_n
"checking for
$ac_word
""...
$ac_c
"
1>&6
echo
"configure:706
4
: checking for
$ac_word
"
>
&5
echo
"configure:706
8
: checking for
$ac_word
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_path_SDL11_CONFIG
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -7101,7 +7105,7 @@ fi
# Extract the first word of "sdl-config", so it can be a program name with args.
set
dummy sdl-config
;
ac_word
=
$2
echo
$ac_n
"checking for
$ac_word
""...
$ac_c
"
1>&6
echo
"configure:710
5
: checking for
$ac_word
"
>
&5
echo
"configure:710
9
: checking for
$ac_word
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_path_SDL_CONFIG
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -7147,17 +7151,17 @@ fi
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:715
1
: checking for
$ac_hdr
"
>
&5
echo
"configure:715
5
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 71
56
"configure"
#line 71
60
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:716
1
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:716
5
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -7227,17 +7231,17 @@ fi
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:723
1
: checking for
$ac_hdr
"
>
&5
echo
"configure:723
5
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 72
36
"configure"
#line 72
40
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:724
1
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:724
5
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -7266,7 +7270,7 @@ done
else
echo
$ac_n
"checking for directX headers in
${
withval
}
""...
$ac_c
"
1>&6
echo
"configure:727
0
: checking for directX headers in
${
withval
}
"
>
&5
echo
"configure:727
4
: checking for directX headers in
${
withval
}
"
>
&5
if
test
-f
${
withval
}
/include/directx.h
then
PLUGINS
=
"
${
PLUGINS
}
directx"
...
...
@@ -7349,7 +7353,7 @@ if test "${enable_gnome+set}" = set; then
# Extract the first word of "gnome-config", so it can be a program name with args.
set
dummy gnome-config
;
ac_word
=
$2
echo
$ac_n
"checking for
$ac_word
""...
$ac_c
"
1>&6
echo
"configure:735
3
: checking for
$ac_word
"
>
&5
echo
"configure:735
7
: checking for
$ac_word
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_path_GNOME_CONFIG
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -7394,17 +7398,17 @@ fi
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:7
398
: checking for
$ac_hdr
"
>
&5
echo
"configure:7
402
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 740
3
"configure"
#line 740
7
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:74
08
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:74
12
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -7464,7 +7468,7 @@ fi
# Extract the first word of "gtk-config", so it can be a program name with args.
set
dummy gtk-config
;
ac_word
=
$2
echo
$ac_n
"checking for
$ac_word
""...
$ac_c
"
1>&6
echo
"configure:74
68
: checking for
$ac_word
"
>
&5
echo
"configure:74
72
: checking for
$ac_word
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_path_GTK_CONFIG
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -7510,17 +7514,17 @@ fi
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:751
4
: checking for
$ac_hdr
"
>
&5
echo
"configure:751
8
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 75
19
"configure"
#line 75
23
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:752
4
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:752
8
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -7576,17 +7580,17 @@ if test x$enable_x11 != xno &&
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:758
0
: checking for
$ac_hdr
"
>
&5
echo
"configure:758
4
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 758
5
"configure"
#line 758
9
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:759
0
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:759
4
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -7639,17 +7643,17 @@ if test x$enable_xvideo != xno &&
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:764
3
: checking for
$ac_hdr
"
>
&5
echo
"configure:764
7
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 76
48
"configure"
#line 76
52
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:765
3
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:765
7
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -7689,17 +7693,17 @@ if test "${enable_alsa+set}" = set; then
then
ac_safe
=
`
echo
"alsa/asoundlib.h"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for alsa/asoundlib.h""...
$ac_c
"
1>&6
echo
"configure:769
3
: checking for alsa/asoundlib.h"
>
&5
echo
"configure:769
7
: checking for alsa/asoundlib.h"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 7
698
"configure"
#line 7
702
"configure"
#include "confdefs.h"
#include <alsa/asoundlib.h>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:770
3
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:770
7
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -7716,7 +7720,7 @@ fi
if
eval
"test
\"
`
echo
'$ac_cv_header_'
$ac_safe
`
\"
= yes"
;
then
echo
"
$ac_t
""yes"
1>&6
echo
$ac_n
"checking for main in -lasound""...
$ac_c
"
1>&6
echo
"configure:772
0
: checking for main in -lasound"
>
&5
echo
"configure:772
4
: checking for main in -lasound"
>
&5
ac_lib_var
=
`
echo
asound
'_'
main |
sed
'y%./+-%__p_%'
`
if
eval
"test
\"
`
echo
'$''{'
ac_cv_lib_
$ac_lib_var
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
...
...
@@ -7724,14 +7728,14 @@ else
ac_save_LIBS
=
"
$LIBS
"
LIBS
=
"-lasound
$LIBS
"
cat
>
conftest.
$ac_ext
<<
EOF
#line 77
28
"configure"
#line 77
32
"configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if
{
(
eval echo
configure:773
5
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:773
9
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
eval
"ac_cv_lib_
$ac_lib_var
=yes"
else
...
...
@@ -7849,6 +7853,9 @@ fi
...
...
@@ -8079,6 +8086,9 @@ s%@LIB_GGI@%$LIB_GGI%g
s%@LIB_GLIDE@%
$LIB_GLIDE
%g
s%@LIB_GNOME@%
$LIB_GNOME
%g
s%@LIB_GTK@%
$LIB_GTK
%g
s%@LIB_IMDCT@%
$LIB_IMDCT
%g
s%@LIB_IMDCT3DN@%
$LIB_IMDCT3DN
%g
s%@LIB_IMDCTSSE@%
$LIB_IMDCTSSE
%g
s%@LIB_KDE@%
$LIB_KDE
%g
s%@LIB_LIBDVDCSS@%
$LIB_LIBDVDCSS
%g
s%@LIB_MACOSX@%
$LIB_MACOSX
%g
...
...
configure.in
View file @
d8e44fce
...
...
@@ -145,7 +145,12 @@ AC_FUNC_MMAP
AC_TYPE_SIGNAL
AC_CHECK_LIB(dl,dlopen,LIB="${LIB} -ldl")
AC_CHECK_LIB(m,cos,LIB_IMDCT="${LIB_IMDCT} -lm")
AC_CHECK_LIB(m,pow,LIB_YUV="${LIB_YUV} -lm")
AC_CHECK_LIB(m,pow,
LIB_YUV="${LIB_YUV} -lm"
LIB_IMDCT="${LIB_IMDCT} -lm"
LIB_IMDCT3DN="${LIB_IMDCT3DN} -lm"
LIB_IMDCTSSE="${LIB_IMDCTSSE} -lm"
)
dnl Check for pthreads - borrowed from XMMS
THREAD_LIB=error
...
...
@@ -1260,6 +1265,9 @@ AC_SUBST(LIB_GGI)
AC_SUBST(LIB_GLIDE)
AC_SUBST(LIB_GNOME)
AC_SUBST(LIB_GTK)
AC_SUBST(LIB_IMDCT)
AC_SUBST(LIB_IMDCT3DN)
AC_SUBST(LIB_IMDCTSSE)
AC_SUBST(LIB_KDE)
AC_SUBST(LIB_LIBDVDCSS)
AC_SUBST(LIB_MACOSX)
...
...
include/common.h
View file @
d8e44fce
...
...
@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: common.h,v 1.5
7 2001/12/12 02:13:50
sam Exp $
* $Id: common.h,v 1.5
8 2001/12/13 12:47:17
sam Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
...
...
@@ -544,8 +544,7 @@ typedef struct module_symbols_s
struct
vout_thread_s
*
(
*
vout_CreateThread
)
(
int
*
,
int
,
int
,
int
,
int
);
struct
subpicture_s
*
(
*
vout_CreateSubPicture
)
(
struct
vout_thread_s
*
,
int
,
int
);
struct
picture_s
*
(
*
vout_CreatePicture
)
(
struct
vout_thread_s
*
,
int
,
int
,
int
,
int
);
struct
picture_s
*
(
*
vout_CreatePicture
)
(
struct
vout_thread_s
*
);
void
(
*
vout_DestroySubPicture
)
(
struct
vout_thread_s
*
,
struct
subpicture_s
*
);
...
...
@@ -561,6 +560,8 @@ typedef struct module_symbols_s
struct
picture_s
*
);
void
(
*
vout_DatePicture
)
(
struct
vout_thread_s
*
p_vout
,
struct
picture_s
*
p_pic
,
mtime_t
);
void
(
*
vout_PlacePicture
)
(
struct
vout_thread_s
*
,
int
,
int
,
int
*
,
int
*
,
int
*
,
int
*
);
u32
(
*
UnalignedShowBits
)
(
struct
bit_stream_s
*
,
unsigned
int
);
void
(
*
UnalignedRemoveBits
)
(
struct
bit_stream_s
*
);
...
...
include/modules_export.h
View file @
d8e44fce
...
...
@@ -96,6 +96,7 @@
(p_symbols)->vout_DatePicture = vout_DatePicture; \
(p_symbols)->vout_LinkPicture = vout_LinkPicture; \
(p_symbols)->vout_UnlinkPicture = vout_UnlinkPicture; \
(p_symbols)->vout_PlacePicture = vout_PlacePicture; \
(p_symbols)->UnalignedGetBits = UnalignedGetBits; \
(p_symbols)->UnalignedRemoveBits = UnalignedRemoveBits; \
(p_symbols)->UnalignedShowBits = UnalignedShowBits; \
...
...
@@ -205,6 +206,7 @@
# define vout_DatePicture p_symbols->vout_DatePicture
# define vout_LinkPicture p_symbols->vout_LinkPicture
# define vout_UnlinkPicture p_symbols->vout_UnlinkPicture
# define vout_PlacePicture p_symbols->vout_PlacePicture
# define DecodeLanguage p_symbols->DecodeLanguage
...
...
include/video.h
View file @
d8e44fce
...
...
@@ -4,7 +4,7 @@
* includes all common video types and constants.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video.h,v 1.3
3 2001/12/09 17:01:35
sam Exp $
* $Id: video.h,v 1.3
4 2001/12/13 12:47:17
sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
...
...
@@ -60,6 +60,7 @@ typedef struct picture_s
/* Type and flags - should NOT be modified except by the vout thread */
int
i_status
;
/* picture flags */
int
i_type
;
/* is picture a direct buffer ? */
int
i_matrix_coefficients
;
/* in YUV type, encoding type */
/* Picture management properties - these properties can be modified using
...
...
@@ -67,14 +68,6 @@ typedef struct picture_s
int
i_refcount
;
/* link reference counter */
mtime_t
date
;
/* display date */
/* Picture static properties - those properties are fixed at initialization
* and should NOT be modified */
int
i_width
;
/* picture width */
int
i_height
;
/* picture height */
int
i_chroma
;
/* picture chroma */
int
i_aspect_ratio
;
/* aspect ratio */
boolean_t
b_directbuffer
;
/* is it a direct buffer ? */
/* These values can be calculated from i_chroma, i_width and i_height
* but we leave them to prevent unnecessary calculation */
int
i_size
;
...
...
@@ -104,16 +97,31 @@ typedef struct picture_s
}
picture_t
;
/* Pictures chromas */
#define EMPTY_PICTURE 0
/* picture slot is empty and available */
#define YUV_420_PICTURE 100
/* 4:2:0 YUV picture */
#define YUV_422_PICTURE 101
/* 4:2:2 YUV picture */
#define YUV_444_PICTURE 102
/* 4:4:4 YUV picture */
#define RGB_8BPP_PICTURE 200
/* RGB 8bpp picture */
#define RGB_16BPP_PICTURE 201
/* RGB 16bpp picture */
#define RGB_32BPP_PICTURE 202
/* RGB 32bpp picture */
/*****************************************************************************
* picture_heap_t: video picture heap
*****************************************************************************/
typedef
struct
picture_heap_s
{
int
i_pictures
;
/* current heap size */
/* Pictures status */
/* Picture static properties - those properties are fixed at initialization
* and should NOT be modified */
int
i_width
;
/* picture width */
int
i_height
;
/* picture height */
int
i_chroma
;
/* picture chroma */
int
i_aspect
;
/* aspect ratio */
/* Real pictures */
picture_t
*
pp_picture
[
VOUT_MAX_PICTURES
];
/* pictures */
}
picture_heap_t
;
/* Picture type */
#define EMPTY_PICTURE 0
/* empty buffer */
#define MEMORY_PICTURE 100
/* heap-allocated buffer */
#define DIRECT_PICTURE 200
/* direct buffer */
/* Picture status */
#define FREE_PICTURE 0
/* free and not allocated */
#define RESERVED_PICTURE 1
/* allocated and reserved */
#define RESERVED_DATED_PICTURE 2
/* waiting for DisplayPicture */
...
...
@@ -122,7 +130,16 @@ typedef struct picture_s
#define DISPLAYED_PICTURE 5
/* been displayed but is linked */
#define DESTROYED_PICTURE 6
/* allocated but no more used */
/* Aspect ratios (ISO/IEC 13818-2 section 6.3.3, table 6-3) */
/* Picture chroma */
#define EMPTY_PICTURE 0
/* picture slot is empty and available */
#define YUV_420_PICTURE 100
/* 4:2:0 YUV picture */
#define YUV_422_PICTURE 101
/* 4:2:2 YUV picture */
#define YUV_444_PICTURE 102
/* 4:4:4 YUV picture */
#define RGB_8BPP_PICTURE 200
/* RGB 8bpp picture */
#define RGB_16BPP_PICTURE 201
/* RGB 16bpp picture */
#define RGB_32BPP_PICTURE 202
/* RGB 32bpp picture */
/* Aspect ratio (ISO/IEC 13818-2 section 6.3.3, table 6-3) */
#define AR_SQUARE_PICTURE 1
/* square pixels */
#define AR_3_4_PICTURE 2
/* 3:4 picture (TV) */
#define AR_16_9_PICTURE 3
/* 16:9 picture (wide screen) */
...
...
include/video_output.h
View file @
d8e44fce
...
...
@@ -5,7 +5,7 @@
* thread, and destroy a previously oppenned video output thread.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video_output.h,v 1.6
4 2001/12/09 17:01:35
sam Exp $
* $Id: video_output.h,v 1.6
5 2001/12/13 12:47:17
sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
...
...
@@ -68,27 +68,6 @@ typedef struct vout_chroma_s
}
vout_chroma_t
;
/*****************************************************************************
* vout_buffer_t: rendering buffer
*****************************************************************************
* This structure stores information about a buffer. Buffers are not completely
* cleared between displays, and modified areas need to be stored.
*****************************************************************************/
typedef
struct
vout_buffer_s
{
/* Picture area */
int
i_pic_x
,
i_pic_y
;
/* picture position */
int
i_pic_width
,
i_pic_height
;
/* picture size */
/* Other areas - only vertical extensions of areas are stored */
int
i_areas
;
/* number of areas */
int
pi_area_begin
[
VOUT_MAX_AREAS
];
/* beginning of area */
int
pi_area_end
[
VOUT_MAX_AREAS
];
/* end of area */
/* Picture data */
byte_t
*
p_data
;
/* memory address */
}
vout_buffer_t
;
/*****************************************************************************
* vout_fifo_t
*****************************************************************************/
...
...
@@ -128,32 +107,15 @@ typedef struct vout_thread_s
int
*
pi_status
;
/* temporary status flag */
p_vout_sys_t
p_sys
;
/* system output method */
/* Current input properties */
int
i_width
;
/* current input width */
int
i_height
;
/* current input height */
int
i_chroma
;
/* current input chroma */
int
i_aspect_ratio
;
/* current input aspect ratio */
/* Current display properties */
u16
i_changes
;
/* changes made to the thread */
float
f_gamma
;
/* gamma */
/* Color masks and shifts in RGB mode - masks are set by system
* initialization, shifts are calculated. A pixel color value can be
* obtained using the formula ((value >> rshift) << lshift) */
u32
i_red_mask
;
/* red mask */
u32
i_green_mask
;
/* green mask */
u32
i_blue_mask
;
/* blue mask */
int
i_red_lshift
,
i_red_rshift
;
/* red shifts */
int
i_green_lshift
,
i_green_rshift
;
/* green shifts */
int
i_blue_lshift
,
i_blue_rshift
;
/* blue shifts */
/* Useful pre-calculated pixel values - these are not supposed to be
* accurate values, but rather values looking nice, given their usage. */
u32
i_white_pixel
;
/* white */
u32
i_black_pixel
;
/* black */
u32
i_gray_pixel
;
/* gray */
u32
i_blue_pixel
;
/* blue */
boolean_t
b_grayscale
;
/* color or grayscale display */
boolean_t
b_info
;
/* print additional information */
boolean_t
b_interface
;
/* render interface */
boolean_t
b_scale
;
/* allow picture scaling */
boolean_t
b_fullscreen
;
/* toogle fullscreen display */
mtime_t
render_time
;
/* last picture render time */
/* Plugin used and shortcuts to access its capabilities */
struct
module_s
*
p_module
;
...
...
@@ -167,26 +129,21 @@ typedef struct vout_thread_s
void
(
*
pf_setpalette
)
(
struct
vout_thread_s
*
,
u16
*
,
u16
*
,
u16
*
);
/* Pictures and rendering properties */
boolean_t
b_grayscale
;
/* color or grayscale display */
boolean_t
b_info
;
/* print additional information */
boolean_t
b_interface
;
/* render interface */
boolean_t
b_scale
;
/* allow picture scaling */
boolean_t
b_fullscreen
;
/* toogle fullscreen display */
mtime_t
render_time
;
/* last picture render time */
/* Statistics - these numbers are not supposed to be accurate, but are a
* good indication of the thread status */
count_t
c_fps_samples
;
/* picture counts */
mtime_t
p_fps_sample
[
VOUT_FPS_SAMPLES
];
/* FPS samples dates */
/* Video heap and translation tables */
int
i_heap_size
;
/* heap size */
picture_heap_t
render
;
/* rendered pictures */
picture_heap_t
output
;
/* direct buffers */
boolean_t
b_direct
;
/* rendered are like direct ? */
vout_chroma_t
chroma
;
/* translation tables */
/* Picture and subpicture heaps */
picture_t
p_picture
[
VOUT_MAX_PICTURES
];
/* pictures */
subpicture_t
p_subpicture
[
VOUT_MAX_PICTURES
];
/* subpictures */
int
i_directbuffers
;
/* number of pictures in VRAM */
int
i_pictures
;
/* current heap size */
vout_chroma_t
chroma
;
/* translation tables */
/* Bitmap fonts */
p_vout_font_t
p_default_font
;
/* default font */
...
...
@@ -200,6 +157,11 @@ typedef struct vout_thread_s
* calculation of the jitter */
}
vout_thread_t
;
#define I_OUTPUTPICTURES p_vout->output.i_pictures
#define PP_OUTPUTPICTURE p_vout->output.pp_picture
#define I_RENDERPICTURES p_vout->render.i_pictures
#define PP_RENDERPICTURE p_vout->render.pp_picture
/* Flags for changes - these flags are set in the i_changes field when another
* thread changed a variable */
#define VOUT_INFO_CHANGE 0x0001
/* b_info changed */
...
...
@@ -218,17 +180,6 @@ typedef struct vout_thread_s
#define MAX_JITTER_SAMPLES 20
/*****************************************************************************
* Macros
*****************************************************************************/
/* RGB2PIXEL: assemble RGB components to a pixel value, returns a u32 */
#define RGB2PIXEL( p_vout, i_red, i_green, i_blue ) \
(((((u32)i_red) >> p_vout->i_red_rshift) << p_vout->i_red_lshift) | \
((((u32)i_green) >> p_vout->i_green_rshift) << p_vout->i_green_lshift) | \
((((u32)i_blue) >> p_vout->i_blue_rshift) << p_vout->i_blue_lshift))
/*****************************************************************************
* Prototypes
*****************************************************************************/
...
...
@@ -242,7 +193,7 @@ vout_fifo_t * vout_CreateFifo ( void );
void
vout_DestroyFifo
(
vout_fifo_t
*
);
void
vout_FreeFifo
(
vout_fifo_t
*
);
picture_t
*
vout_CreatePicture
(
vout_thread_t
*
,
int
,
int
,
int
,
int
);
picture_t
*
vout_CreatePicture
(
vout_thread_t
*
);
void
vout_DestroyPicture
(
vout_thread_t
*
,
picture_t
*
);
void
vout_DisplayPicture
(
vout_thread_t
*
,
picture_t
*
);
void
vout_DatePicture
(
vout_thread_t
*
,
picture_t
*
,
mtime_t
);
...
...
@@ -250,10 +201,13 @@ void vout_LinkPicture ( vout_thread_t *, picture_t * );
void
vout_UnlinkPicture
(
vout_thread_t
*
,
picture_t
*
);
picture_t
*
vout_RenderPicture
(
vout_thread_t
*
,
picture_t
*
,
subpicture_t
*
);
void
vout_PlacePicture
(
vout_thread_t
*
,
int
,
int
,
int
*
,
int
*
,
int
*
,
int
*
);
subpicture_t
*
vout_CreateSubPicture
(
vout_thread_t
*
,
int
,
int
);
void
vout_DestroySubPicture
(
vout_thread_t
*
,
subpicture_t
*
);
void
vout_DisplaySubPicture
(
vout_thread_t
*
,
subpicture_t
*
);
subpicture_t
*
vout_SortSubPictures
(
vout_thread_t
*
,
mtime_t
);
void
vout_RenderSubPictures
(
picture_t
*
,
subpicture_t
*
);
void
vout_RenderSubPictures
(
vout_thread_t
*
,
picture_t
*
,
subpicture_t
*
);
plugins/directx/vout_directx.c
View file @
d8e44fce
...
...
@@ -2,7 +2,7 @@
* vout_directx.c: Windows DirectX video output display method
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: vout_directx.c,v 1.1
5 2001/12/07 18:33:0
7 sam Exp $
* $Id: vout_directx.c,v 1.1
6 2001/12/13 12:47:1
7 sam Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -1355,7 +1355,7 @@ static void DirectXKeepAspectRatio( vout_thread_t *p_vout, RECT *rect_window )
if
(
!
p_vout
->
p_rendered_pic
)
return
;
switch
(
p_vout
->
p_rendered_pic
->
i_aspect
_ratio
)
switch
(
p_vout
->
p_rendered_pic
->
i_aspect
)
{
case
AR_16_9_PICTURE
:
if
(
((
rect_window
->
right
-
rect_window
->
left
)
*
9
)
...
...
plugins/dummy/vout_dummy.c
View file @
d8e44fce
...
...
@@ -2,7 +2,7 @@
* vout_dummy.c: Dummy video output display method for testing purposes
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: vout_dummy.c,v 1.1
0 2001/12/09 17:01:36
sam Exp $
* $Id: vout_dummy.c,v 1.1
1 2001/12/13 12:47:17
sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
...
...
@@ -72,6 +72,8 @@ static void vout_Destroy ( struct vout_thread_s * );
static
int
vout_Manage
(
struct
vout_thread_s
*
);
static
void
vout_Display
(
struct
vout_thread_s
*
,
struct
picture_s
*
);
static
int
DummyNewPicture
(
struct
vout_thread_s
*
,
struct
picture_s
*
);
/*****************************************************************************
* Functions exported as capabilities. They are declared as static so that
* we don't pollute the namespace too much.
...
...
@@ -124,91 +126,62 @@ static int vout_Create( vout_thread_t *p_vout )
*****************************************************************************/
static
int
vout_Init
(
vout_thread_t
*
p_vout
)
{
int
i_index
;
picture_t
*
p_pic
;
int
i_index
=
0
;
int
i_luma_bytes
,
i_chroma_bytes
;
I_OUTPUTPICTURES
=
0
;
/*
Try to initialize DUMMY_MAX_DIRECTBUFFERS direct buffers
*/
while
(
i_index
<
DUMMY_MAX_DIRECTBUFFERS
)
/*
Initialize the output structure
*/
switch
(
p_vout
->
render
.
i_chroma
)
{
p_pic
=
&
p_vout
->
p_picture
[
i_index
];
switch
(
p_vout
->
i_chroma
)
{
/* We know this chroma, allocate a buffer which will be used
* directly by the decoder */
case
YUV_420_PICTURE
:
p_pic
->
i_chroma
=
YUV_420_PICTURE
;
p_pic
->
i_width
=
p_vout
->
i_width
;
p_pic
->
i_height
=
p_vout
->
i_height
;
/* Precalculate some values */
p_pic
->
i_size
=
p_vout
->
i_width
*
p_vout
->
i_height
;
p_pic
->
i_chroma_width
=
p_vout
->
i_width
/
2
;
p_pic
->
i_chroma_size
=
p_vout
->
i_width
*
p_vout
->
i_height
/
2
;
/* Allocate the memory buffer */
i_luma_bytes
=
p_pic
->
i_size
*
sizeof
(
pixel_data_t
);
i_chroma_bytes
=
p_pic
->
i_chroma_size
*
sizeof
(
pixel_data_t
);
/* Y buffer */
p_pic
->
planes
[
Y_PLANE
].
p_data
=
malloc
(
i_luma_bytes
+
2
*
i_chroma_bytes
);
p_pic
->
planes
[
Y_PLANE
].
i_bytes
=
i_luma_bytes
;
/* U buffer */
p_pic
->
planes
[
U_PLANE
].
p_data
=
p_pic
->
planes
[
Y_PLANE
].
p_data
+
p_pic
->
i_height
*
p_pic
->
i_width
;
p_pic
->
planes
[
U_PLANE
].
i_bytes
=
i_chroma_bytes
;
/* V buffer */
p_pic
->
planes
[
V_PLANE
].
p_data
=
p_pic
->
planes
[
U_PLANE
].
p_data
+
p_pic
->
i_height
*
p_pic
->
i_chroma_width
;
p_pic
->
planes
[
V_PLANE
].
i_bytes
=
i_chroma_bytes
;
/* We allocated 3 planes */
p_pic
->
i_planes
=
3
;
p_vout
->
output
.
i_chroma
=
p_vout
->
render
.
i_chroma
;
p_vout
->
output
.
i_width
=
p_vout
->
render
.
i_width
;
p_vout
->
output
.
i_height
=
p_vout
->
render
.
i_height
;
p_vout
->
output
.
i_aspect
=
p_vout
->
render
.
i_aspect
;
break
;
/* Unknown chroma, allocate an RGB buffer, the video output's job
* will be to do the chroma->RGB conversion */
default:
p_vout
->
output
.
i_chroma
=
RGB_16BPP_PICTURE
;
p_vout
->
output
.
i_width
=
p_vout
->
render
.
i_width
;
p_vout
->
output
.
i_height
=
p_vout
->
render
.
i_height
;
p_vout
->
output
.
i_aspect
=
p_vout
->
render
.
i_aspect
;
break
;
}
p_pic
->
i_chroma
=
RGB_16BPP_PICTURE
;
p_pic
->
i_width
=
DUMMY_WIDTH
;
p_pic
->
i_height
=
DUMMY_HEIGHT
;
/* Precalculate some values */
i_luma_bytes
=
sizeof
(
u16
)
*
DUMMY_WIDTH
*
DUMMY_HEIGHT
;
/* Allocate the memory buffer */
p_pic
->
planes
[
RGB_PLANE
].
p_data
=
malloc
(
i_luma_bytes
);
p_pic
->
planes
[
RGB_PLANE
].
i_bytes
=
i_luma_bytes
;
/* We allocated 1 plane */
p_pic
->
i_planes
=
1
;
/* Try to initialize DUMMY_MAX_DIRECTBUFFERS direct buffers */
while
(
I_OUTPUTPICTURES
<
DUMMY_MAX_DIRECTBUFFERS
)
{
p_pic
=
NULL
;
break
;
/* Find an empty picture slot */
for
(
i_index
=
0
;
i_index
<
VOUT_MAX_PICTURES
;
i_index
++
)
{
if
(
p_vout
->
p_picture
[
i_index
].
i_status
==
FREE_PICTURE
)
{
p_pic
=
p_vout
->
p_picture
+
i_index
;
break
;
}
}
if
(
p_pic
->
i_planes
==
0
)
/* Allocate the picture */
if
(
DummyNewPicture
(
p_vout
,
p_pic
)
)
{
break
;
}
p_pic
->
i_status
=
DESTROYED_PICTURE
;
p_pic
->
b_directbuffer
=
1
;
p_pic
->
i_type
=
DIRECT_PICTURE
;
p_pic
->
i_left_margin
=
p_pic
->
i_right_margin
=
p_pic
->
i_top_margin
=
p_pic
->
i_bottom_margin
=
0
;
i_index
++
;
}
PP_OUTPUTPICTURE
[
I_OUTPUTPICTURES
]
=
p_pic
;
/* How many directbuffers did we create ? */
p_vout
->
i_directbuffers
=
i_index
;
I_OUTPUTPICTURES
++
;
}
return
(
0
);
}
...
...
@@ -220,11 +193,11 @@ static void vout_End( vout_thread_t *p_vout )
{
int
i_index
;
/* Free the fake
direc
t buffers we allocated */
for
(
i_index
=
p_vout
->
i_directbuffers
;
i_index
;
)
/* Free the fake
outpu
t buffers we allocated */
for
(
i_index
=
I_OUTPUTPICTURES
;
i_index
;
)
{
i_index
--
;
free
(
p_vout
->
p_picture
[
i_index
].
planes
[
0
].
p_data
);
free
(
PP_OUTPUTPICTURE
[
i_index
]
->
planes
[
0
].
p_data
);
}
}
...
...
@@ -260,3 +233,68 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
/* No need to do anything, the fake direct buffers stay as they are */
}
/*****************************************************************************
* DummyNewPicture: allocate a picture
*****************************************************************************
* Returns 0 on success, -1 otherwise
*****************************************************************************/
static
int
DummyNewPicture
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
)
{
int
i_luma_bytes
,
i_chroma_bytes
;
int
i_width
=
p_vout
->
output
.
i_width
;
int
i_height
=
p_vout
->
output
.
i_height
;
switch
(
p_vout
->
output
.
i_chroma
)
{
/* We know this chroma, allocate a buffer which will be used
* directly by the decoder */
case
YUV_420_PICTURE
:
/* Precalculate some values */
p_pic
->
i_size
=
i_width
*
i_height
;
p_pic
->
i_chroma_width
=
i_width
/
2
;
p_pic
->
i_chroma_size
=
i_width
*
i_height
/
2
;
/* Allocate the memory buffer */
i_luma_bytes
=
p_pic
->
i_size
*
sizeof
(
pixel_data_t
);
i_chroma_bytes
=
p_pic
->
i_chroma_size
*
sizeof
(
pixel_data_t
);
/* Y buffer */
p_pic
->
planes
[
Y_PLANE
].
p_data
=
malloc
(
i_luma_bytes
+
2
*
i_chroma_bytes
);
p_pic
->
planes
[
Y_PLANE
].
i_bytes
=
i_luma_bytes
;
/* U buffer */
p_pic
->
planes
[
U_PLANE
].
p_data
=
p_pic
->
planes
[
Y_PLANE
].
p_data
+
i_height
*
i_width
;
p_pic
->
planes
[
U_PLANE
].
i_bytes
=
i_chroma_bytes
;
/* V buffer */
p_pic
->
planes
[
V_PLANE
].
p_data
=
p_pic
->
planes
[
U_PLANE
].
p_data
+
i_height
*
p_pic
->
i_chroma_width
;
p_pic
->
planes
[
V_PLANE
].
i_bytes
=
i_chroma_bytes
;
/* We allocated 3 planes */
p_pic
->
i_planes
=
3
;
return
(
0
);
break
;
/* Unknown chroma, allocate an RGB buffer, the video output's job
* will be to do the chroma->RGB conversion */
default:
/* Precalculate some values */
i_luma_bytes
=
sizeof
(
u16
)
*
i_width
*
i_height
;
/* Allocate the memory buffer */
p_pic
->
planes
[
RGB_PLANE
].
p_data
=
malloc
(
i_luma_bytes
);
p_pic
->
planes
[
RGB_PLANE
].
i_bytes
=
i_luma_bytes
;
/* We allocated 1 plane */
p_pic
->
i_planes
=
1
;
return
(
0
);
break
;
}
}
plugins/imdct/Makefile
View file @
d8e44fce
...
...
@@ -44,21 +44,21 @@ $(BUILTIN_IMDCT3DN): BUILTIN_IMDCT3DN_%.o: %.c
# Real targets
#
../imdct.so
:
$(PLUGIN_IMDCT) $(PLUGIN_IMDCTCOMMON)
../imdct.so
:
$(PLUGIN_IMDCT) $(PLUGIN_IMDCTCOMMON)
$(LIB_IMDCT)
$(CC)
-o
$@
$^
$(PLCFLAGS)
../imdct.a
:
$(BUILTIN_IMDCT)
ar r
$@
$^
$(RANLIB)
$@
../imdctsse.so
:
$(PLUGIN_IMDCTSSE) $(PLUGIN_IMDCTCOMMON)
../imdctsse.so
:
$(PLUGIN_IMDCTSSE) $(PLUGIN_IMDCTCOMMON)
$(LIB_IMDCTSSE)
$(CC)
-o
$@
$^
$(PLCFLAGS)
../imdctsse.a
:
$(BUILTIN_IMDCTSSE)
ar r
$@
$^
$(RANLIB)
$@
../imdct3dn.so
:
$(PLUGIN_IMDCT3DN) $(PLUGIN_IMDCTCOMMON)
../imdct3dn.so
:
$(PLUGIN_IMDCT3DN) $(PLUGIN_IMDCTCOMMON)
$(LIB_IMDCT3DN)
$(CC)
-o
$@
$^
$(PLCFLAGS)
../imdct3dn.a
:
$(BUILTIN_IMDCT3DN)
...
...
plugins/mpeg_vdec/video_parser.h
View file @
d8e44fce
...
...
@@ -2,7 +2,7 @@
* video_parser.h : video parser thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video_parser.h,v 1.
1 2001/11/13 12:09:18 henri
Exp $
* $Id: video_parser.h,v 1.
2 2001/12/13 12:47:17 sam
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Jean-Marc Dressler <polux@via.ecp.fr>
...
...
@@ -113,7 +113,7 @@ typedef struct sequence_s
u32
i_size
;
/* total number of pel of the lum comp */
u32
i_mb_height
,
i_mb_width
,
i_mb_size
;
/* the same, in macroblock units */
unsigned
int
i_aspect
_ratio
;
/* height/width display ratio */
unsigned
int
i_aspect
;
/* height/width display ratio */
unsigned
int
i_matrix_coefficients
;
/* coeffs of the YUV transform */
int
i_chroma_format
,
i_scalable_mode
;
int
i_chroma_nb_blocks
;
...
...
plugins/mpeg_vdec/vpar_headers.c
View file @
d8e44fce
...
...
@@ -2,7 +2,7 @@
* vpar_headers.c : headers parsing
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: vpar_headers.c,v 1.
5 2001/12/10 10:58:54 massiot
Exp $
* $Id: vpar_headers.c,v 1.
6 2001/12/13 12:47:17 sam
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Stphane Borel <stef@via.ecp.fr>
...
...
@@ -310,7 +310,7 @@ static void SequenceHeader( vpar_thread_t * p_vpar )
p_vpar
->
sequence
.
i_width
=
GetBits
(
&
p_vpar
->
bit_stream
,
12
);
p_vpar
->
sequence
.
i_height
=
GetBits
(
&
p_vpar
->
bit_stream
,
12
);
p_vpar
->
sequence
.
i_aspect
_ratio
=
GetBits
(
&
p_vpar
->
bit_stream
,
4
);
p_vpar
->
sequence
.
i_aspect
=
GetBits
(
&
p_vpar
->
bit_stream
,
4
);
p_vpar
->
sequence
.
i_frame_rate
=
i_frame_rate_table
[
GetBits
(
&
p_vpar
->
bit_stream
,
4
)
];
...
...
@@ -400,22 +400,22 @@ static void SequenceHeader( vpar_thread_t * p_vpar )
12015
};
if
(
p_vpar
->
sequence
.
i_aspect
_ratio
>
1
)
if
(
p_vpar
->
sequence
.
i_aspect
>
1
)
{
i_xyratio
=
p_vpar
->
sequence
.
i_height
*
pi_mpeg1ratio
[
p_vpar
->
sequence
.
i_aspect
_ratio
]
/
pi_mpeg1ratio
[
p_vpar
->
sequence
.
i_aspect
]
/
p_vpar
->
sequence
.
i_width
;
if
(
7450
<
i_xyratio
&&
i_xyratio
<
7550
)
{
p_vpar
->
sequence
.
i_aspect
_ratio
=
2
;
p_vpar
->
sequence
.
i_aspect
=
2
;
}
else
if
(
5575
<
i_xyratio
&&
i_xyratio
<
5675
)
{
p_vpar
->
sequence
.
i_aspect
_ratio
=
3
;
p_vpar
->
sequence
.
i_aspect
=
3
;
}
else
if
(
4475
<
i_xyratio
&&
i_xyratio
<
4575
)
{
p_vpar
->
sequence
.
i_aspect
_ratio
=
4
;
p_vpar
->
sequence
.
i_aspect
=
4
;
}
}
...
...
@@ -478,7 +478,7 @@ static void SequenceHeader( vpar_thread_t * p_vpar )
vout_CreateThread
(
NULL
,
p_vpar
->
sequence
.
i_width
,
p_vpar
->
sequence
.
i_height
,
99
+
p_vpar
->
sequence
.
i_chroma_format
,
p_vpar
->
sequence
.
i_aspect
_ratio
);
p_vpar
->
sequence
.
i_aspect
);
/* Everything failed */
if
(
p_vpar
->
p_vout
==
NULL
)
...
...
@@ -774,12 +774,7 @@ static void PictureHeader( vpar_thread_t * p_vpar )
if
(
!
p_vpar
->
picture
.
i_current_structure
)
{
/* This is a new frame. Get a structure from the video_output. */
while
(
(
P_picture
=
vout_CreatePicture
(
p_vpar
->
p_vout
,
p_vpar
->
sequence
.
i_width
,
p_vpar
->
sequence
.
i_height
,
/* XXX */
99
+
p_vpar
->
sequence
.
i_chroma_format
,
p_vpar
->
sequence
.
i_aspect_ratio
)
)
==
NULL
)
while
(
(
P_picture
=
vout_CreatePicture
(
p_vpar
->
p_vout
)
)
==
NULL
)
{
intf_DbgMsg
(
"vpar debug: vout_CreatePicture failed, delaying"
);
if
(
p_vpar
->
p_fifo
->
b_die
||
p_vpar
->
p_fifo
->
b_error
)
...
...
@@ -791,7 +786,6 @@ static void PictureHeader( vpar_thread_t * p_vpar )
/* Initialize values. */
vpar_SynchroDecode
(
p_vpar
,
p_vpar
->
picture
.
i_coding_type
,
i_structure
);
P_picture
->
i_aspect_ratio
=
p_vpar
->
sequence
.
i_aspect_ratio
;
P_picture
->
i_matrix_coefficients
=
p_vpar
->
sequence
.
i_matrix_coefficients
;
p_vpar
->
picture
.
i_field_width
=
(
p_vpar
->
sequence
.
i_width
<<
(
1
-
p_vpar
->
picture
.
b_frame_structure
)
);
...
...
plugins/sdl/vout_sdl.c
View file @
d8e44fce
...
...
@@ -2,7 +2,7 @@
* vout_sdl.c: SDL video output display method
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: vout_sdl.c,v 1.6
8 2001/12/09 17:01:3
7 sam Exp $
* $Id: vout_sdl.c,v 1.6
9 2001/12/13 12:47:1
7 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Pierre Baillet <oct@zoy.org>
...
...
@@ -176,8 +176,8 @@ static int vout_Create( vout_thread_t *p_vout )
p_vout
->
p_sys
->
b_cursor_autohidden
=
0
;
p_vout
->
p_sys
->
i_lastmoved
=
mdate
();
p_vout
->
p_sys
->
i_width
=
p_vout
->
i_width
;
p_vout
->
p_sys
->
i_height
=
p_vout
->
i_height
;
p_vout
->
p_sys
->
i_width
=
p_vout
->
render
.
i_width
;
p_vout
->
p_sys
->
i_height
=
p_vout
->
render
.
i_height
;
if
(
SDLOpenDisplay
(
p_vout
)
)
{
...
...
@@ -196,33 +196,58 @@ static int vout_Create( vout_thread_t *p_vout )
*****************************************************************************/
static
int
vout_Init
(
vout_thread_t
*
p_vout
)
{
int
i_index
;
picture_t
*
p_pic
;
int
i_index
=
0
;
I_OUTPUTPICTURES
=
0
;
/* Initialize the output structure */
switch
(
p_vout
->
render
.
i_chroma
)
{
case
YUV_420_PICTURE
:
p_vout
->
output
.
i_chroma
=
p_vout
->
render
.
i_chroma
;
p_vout
->
output
.
i_width
=
p_vout
->
render
.
i_width
;
p_vout
->
output
.
i_height
=
p_vout
->
render
.
i_height
;
p_vout
->
output
.
i_aspect
=
p_vout
->
render
.
i_aspect
;
break
;
default:
return
(
0
);
}
/* Try to initialize SDL_MAX_DIRECTBUFFERS direct buffers */
while
(
i_index
<
SDL_MAX_DIRECTBUFFERS
)
while
(
I_OUTPUTPICTURES
<
SDL_MAX_DIRECTBUFFERS
)
{
p_pic
=
&
p_vout
->
p_picture
[
i_index
];
p_pic
=
NULL
;
/* Find an empty picture slot */
for
(
i_index
=
0
;
i_index
<
VOUT_MAX_PICTURES
;
i_index
++
)
{
if
(
p_vout
->
p_picture
[
i_index
].
i_status
==
FREE_PICTURE
)
{
p_pic
=
p_vout
->
p_picture
+
i_index
;
break
;
}
}
/* Allocate the picture */
if
(
SDLNewPicture
(
p_vout
,
p_pic
)
)
{
break
;
}
p_pic
->
i_status
=
DESTROYED_PICTURE
;
p_pic
->
b_directbuffer
=
1
;
p_pic
->
i_type
=
DIRECT_PICTURE
;
p_pic
->
i_left_margin
=
p_pic
->
i_right_margin
=
p_pic
->
i_top_margin
=
p_pic
->
i_bottom_margin
=
0
;
i_index
++
;
}
PP_OUTPUTPICTURE
[
I_OUTPUTPICTURES
]
=
p_pic
;
/* How many directbuffers did we create ? */
p_vout
->
i_directbuffers
=
i_index
;
I_OUTPUTPICTURES
++
;
}
return
(
0
);
}
...
...
@@ -236,13 +261,13 @@ static void vout_End( vout_thread_t *p_vout )
{
int
i_index
;
/* Free the
direc
t buffers we allocated */
for
(
i_index
=
p_vout
->
i_directbuffers
;
i_index
;
)
/* Free the
outpu
t buffers we allocated */
for
(
i_index
=
I_OUTPUTPICTURES
;
i_index
;
)
{
i_index
--
;
SDL_UnlockYUVOverlay
(
p_vout
->
p_picture
[
i_index
].
p_sys
->
p_overlay
);
SDL_FreeYUVOverlay
(
p_vout
->
p_picture
[
i_index
].
p_sys
->
p_overlay
);
free
(
p_vout
->
p_picture
[
i_index
].
p_sys
);
SDL_UnlockYUVOverlay
(
PP_OUTPUTPICTURE
[
i_index
]
->
p_sys
->
p_overlay
);
SDL_FreeYUVOverlay
(
PP_OUTPUTPICTURE
[
i_index
]
->
p_sys
->
p_overlay
);
free
(
PP_OUTPUTPICTURE
[
i_index
]
->
p_sys
);
}
}
...
...
@@ -410,26 +435,21 @@ static int vout_Manage( vout_thread_t *p_vout )
*****************************************************************************
* This function sends the currently rendered image to the display.
*****************************************************************************/
static
void
vout_Display
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
ture
)
static
void
vout_Display
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
)
{
int
x
,
y
,
w
,
h
;
SDL_Rect
disp
;
/* We'll need to deal with aspect ratio later */
disp
.
w
=
p_vout
->
p_sys
->
i_width
;
disp
.
h
=
p_vout
->
p_sys
->
i_height
;
disp
.
x
=
0
;
disp
.
y
=
0
;
vout_PlacePicture
(
p_vout
,
p_vout
->
p_sys
->
i_width
,
p_vout
->
p_sys
->
i_height
,
&
x
,
&
y
,
&
w
,
&
h
);
disp
.
x
=
x
;
disp
.
y
=
y
;
disp
.
w
=
w
;
disp
.
h
=
h
;
if
(
p_picture
->
b_directbuffer
)
{
SDL_UnlockYUVOverlay
(
p_picture
->
p_sys
->
p_overlay
);
SDL_DisplayYUVOverlay
(
p_picture
->
p_sys
->
p_overlay
,
&
disp
);
SDL_LockYUVOverlay
(
p_picture
->
p_sys
->
p_overlay
);
}
else
{
intf_ErrMsg
(
"vout error: main thread passed a virtual buffer"
);
}
SDL_UnlockYUVOverlay
(
p_pic
->
p_sys
->
p_overlay
);
SDL_DisplayYUVOverlay
(
p_pic
->
p_sys
->
p_overlay
,
&
disp
);
SDL_LockYUVOverlay
(
p_pic
->
p_sys
->
p_overlay
);
}
/* following functions are local */
...
...
@@ -495,7 +515,10 @@ static void SDLCloseDisplay( vout_thread_t *p_vout )
*****************************************************************************/
static
int
SDLNewPicture
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
)
{
switch
(
p_vout
->
i_chroma
)
int
i_width
=
p_vout
->
output
.
i_width
;
int
i_height
=
p_vout
->
output
.
i_height
;
switch
(
p_vout
->
output
.
i_chroma
)
{
case
YUV_420_PICTURE
:
/* We know this chroma, allocate a buffer which will be used
...
...
@@ -508,7 +531,7 @@ static int SDLNewPicture( vout_thread_t *p_vout, picture_t *p_pic )
}
p_pic
->
p_sys
->
p_overlay
=
SDL_CreateYUVOverlay
(
p_vout
->
i_width
,
p_vout
->
i_height
,
SDL_CreateYUVOverlay
(
i_width
,
i_height
,
SDL_YV12_OVERLAY
,
p_vout
->
p_sys
->
p_display
);
...
...
@@ -520,14 +543,10 @@ static int SDLNewPicture( vout_thread_t *p_vout, picture_t *p_pic )
SDL_LockYUVOverlay
(
p_pic
->
p_sys
->
p_overlay
);
p_pic
->
i_chroma
=
p_vout
->
i_chroma
;
/* YUV_420_PICTURE */
p_pic
->
i_width
=
p_vout
->
i_width
;
p_pic
->
i_height
=
p_vout
->
i_height
;
/* Precalculate some values */
p_pic
->
i_size
=
p_vout
->
i_width
*
p_vout
->
i_height
;
p_pic
->
i_chroma_width
=
p_vout
->
i_width
/
2
;
p_pic
->
i_chroma_size
=
p_vout
->
i_height
*
p_pic
->
i_chroma_width
;
p_pic
->
i_size
=
i_width
*
i_height
;
p_pic
->
i_chroma_width
=
i_width
/
2
;
p_pic
->
i_chroma_size
=
i_height
*
(
i_width
/
2
)
;
/* FIXME: try to get the right i_bytes value from p_overlay */
p_pic
->
planes
[
Y_PLANE
].
p_data
=
p_pic
->
p_sys
->
p_overlay
->
pixels
[
0
];
...
...
plugins/x11/vout_common.c
View file @
d8e44fce
...
...
@@ -2,7 +2,7 @@
* vout_common.c: Functions common to the X11 and XVideo plugins
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: vout_common.c,v 1.
2 2001/12/10 10:58:54 massiot
Exp $
* $Id: vout_common.c,v 1.
3 2001/12/13 12:47:17 sam
Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -129,13 +129,13 @@ int _M( vout_Manage ) ( vout_thread_t *p_vout )
{
/* ConfigureNotify event: prepare */
if
(
(
xevent
.
type
==
ConfigureNotify
)
&&
((
xevent
.
xconfigure
.
width
!=
p_vout
->
p_sys
->
i_wi
ndow_wi
dth
)
||
(
xevent
.
xconfigure
.
height
!=
p_vout
->
p_sys
->
i_
window_
height
))
)
&&
((
xevent
.
xconfigure
.
width
!=
p_vout
->
p_sys
->
i_width
)
||
(
xevent
.
xconfigure
.
height
!=
p_vout
->
p_sys
->
i_height
))
)
{
/* Update dimensions */
b_resized
=
1
;
p_vout
->
p_sys
->
i_wi
ndow_wi
dth
=
xevent
.
xconfigure
.
width
;
p_vout
->
p_sys
->
i_
window_
height
=
xevent
.
xconfigure
.
height
;
p_vout
->
p_sys
->
i_width
=
xevent
.
xconfigure
.
width
;
p_vout
->
p_sys
->
i_height
=
xevent
.
xconfigure
.
height
;
}
/* MapNotify event: change window status and disable screen saver */
else
if
(
xevent
.
type
==
MapNotify
)
...
...
@@ -410,11 +410,9 @@ int _M( vout_Manage ) ( vout_thread_t *p_vout )
{
p_vout
->
i_changes
&=
~
VOUT_SIZE_CHANGE
;
p_vout
->
i_width
=
p_vout
->
p_sys
->
i_window_width
;
p_vout
->
i_height
=
p_vout
->
p_sys
->
i_window_height
;
intf_WarnMsg
(
3
,
"vout: video display resized (%dx%d)"
,
p_vout
->
i_width
,
p_vout
->
i_height
);
p_vout
->
p_sys
->
i_width
,
p_vout
->
p_sys
->
i_height
);
}
#endif
...
...
@@ -450,21 +448,21 @@ int _M( XCommonCreateWindow ) ( vout_thread_t *p_vout )
/* If we're full screen, we're full screen! */
if
(
p_vout
->
b_fullscreen
)
{
p_vout
->
p_sys
->
i_wi
ndow_wi
dth
=
p_vout
->
p_sys
->
i_width
=
DisplayWidth
(
p_vout
->
p_sys
->
p_display
,
p_vout
->
p_sys
->
i_screen
);
p_vout
->
p_sys
->
i_
window_
height
=
p_vout
->
p_sys
->
i_height
=
DisplayHeight
(
p_vout
->
p_sys
->
p_display
,
p_vout
->
p_sys
->
i_screen
);
}
else
{
/* Set main window's size */
p_vout
->
p_sys
->
i_wi
ndow_width
=
p_vout
->
i_width
;
p_vout
->
p_sys
->
i_
window_height
=
p_vout
->
i_height
;
p_vout
->
p_sys
->
i_wi
dth
=
p_vout
->
render
.
i_width
;
p_vout
->
p_sys
->
i_
height
=
p_vout
->
render
.
i_height
;
}
/* Prepare window manager hints and properties */
xsize_hints
.
base_width
=
p_vout
->
p_sys
->
i_wi
ndow_wi
dth
;
xsize_hints
.
base_height
=
p_vout
->
p_sys
->
i_
window_
height
;
xsize_hints
.
base_width
=
p_vout
->
p_sys
->
i_width
;
xsize_hints
.
base_height
=
p_vout
->
p_sys
->
i_height
;
xsize_hints
.
flags
=
PSize
;
p_vout
->
p_sys
->
wm_protocols
=
XInternAtom
(
p_vout
->
p_sys
->
p_display
,
"WM_PROTOCOLS"
,
True
);
...
...
@@ -485,8 +483,8 @@ int _M( XCommonCreateWindow ) ( vout_thread_t *p_vout )
XCreateWindow
(
p_vout
->
p_sys
->
p_display
,
DefaultRootWindow
(
p_vout
->
p_sys
->
p_display
),
0
,
0
,
p_vout
->
p_sys
->
i_wi
ndow_wi
dth
,
p_vout
->
p_sys
->
i_
window_
height
,
p_vout
->
p_sys
->
i_width
,
p_vout
->
p_sys
->
i_height
,
#ifdef MODULE_NAME_IS_x11
/* XXX - what's this ? */
0
,
...
...
@@ -567,8 +565,8 @@ int _M( XCommonCreateWindow ) ( vout_thread_t *p_vout )
&&
(
xevent
.
xconfigure
.
window
==
p_vout
->
p_sys
->
window
)
)
{
b_configure_notify
=
1
;
p_vout
->
p_sys
->
i_wi
ndow_wi
dth
=
xevent
.
xconfigure
.
width
;
p_vout
->
p_sys
->
i_
window_
height
=
xevent
.
xconfigure
.
height
;
p_vout
->
p_sys
->
i_width
=
xevent
.
xconfigure
.
width
;
p_vout
->
p_sys
->
i_height
=
xevent
.
xconfigure
.
height
;
}
}
while
(
!
(
b_expose
&&
b_configure_notify
&&
b_map_notify
)
);
...
...
plugins/x11/vout_common.h
View file @
d8e44fce
...
...
@@ -2,7 +2,7 @@
* vout_xvideo.c: Xvideo video output display method
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: vout_common.h,v 1.
1 2001/12/09 17:01:3
7 sam Exp $
* $Id: vout_common.h,v 1.
2 2001/12/13 12:47:1
7 sam Exp $
*
* Authors: Shane Harper <shanegh@optusnet.com.au>
* Vincent Seguin <seguin@via.ecp.fr>
...
...
@@ -63,8 +63,8 @@ typedef struct vout_sys_s
Atom
wm_protocols
;
Atom
wm_delete_window
;
int
i_wi
ndow_width
;
/* width of main window */
int
i_
window_height
;
/* height of main window */
int
i_wi
dth
;
/* width of main window */
int
i_
height
;
/* height of main window */
/* Screen saver properties */
int
i_ss_timeout
;
/* timeout */
...
...
plugins/x11/vout_xvideo.c
View file @
d8e44fce
...
...
@@ -2,7 +2,7 @@
* vout_xvideo.c: Xvideo video output display method
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: vout_xvideo.c,v 1.3
7 2001/12/09 17:01:3
7 sam Exp $
* $Id: vout_xvideo.c,v 1.3
8 2001/12/13 12:47:1
7 sam Exp $
*
* Authors: Shane Harper <shanegh@optusnet.com.au>
* Vincent Seguin <seguin@via.ecp.fr>
...
...
@@ -95,9 +95,6 @@ static void DestroyShmImage( Display *, XvImage *, XShmSegmentInfo * );
static
int
CheckForXVideo
(
Display
*
);
static
int
GetXVideoPort
(
Display
*
);
static
void
XVideoOutputCoords
(
const
picture_t
*
,
const
boolean_t
,
const
int
,
const
int
,
int
*
,
int
*
,
int
*
,
int
*
);
/*static void XVideoSetAttribute ( vout_thread_t *, char *, float );*/
...
...
@@ -137,7 +134,7 @@ static int vout_Probe( probedata_t *p_data )
intf_WarnMsg
(
3
,
"vout: Xvideo not supported"
);
return
(
0
);
}
if
(
!
CheckForXVideo
(
p_display
)
)
{
intf_WarnMsg
(
3
,
"vout: Xvideo not supported"
);
...
...
@@ -219,7 +216,7 @@ static int vout_Create( vout_thread_t *p_vout )
DefaultRootWindow
(
p_vout
->
p_sys
->
p_display
),
1
,
1
,
1
);
XParseColor
(
p_vout
->
p_sys
->
p_display
,
XCreateColormap
(
p_vout
->
p_sys
->
p_display
,
DefaultRootWindow
(
...
...
@@ -229,13 +226,13 @@ static int vout_Create( vout_thread_t *p_vout )
p_vout
->
p_sys
->
i_screen
),
AllocNone
),
"black"
,
&
cursor_color
);
p_vout
->
p_sys
->
blank_cursor
=
XCreatePixmapCursor
(
p_vout
->
p_sys
->
p_display
,
p_vout
->
p_sys
->
cursor_pixmap
,
p_vout
->
p_sys
->
cursor_pixmap
,
&
cursor_color
,
&
cursor_color
,
1
,
1
);
&
cursor_color
,
1
,
1
);
/* Spawn base window - this window will include the video output window,
* but also command buttons, subtitles and other indicators */
...
...
@@ -266,33 +263,58 @@ static int vout_Create( vout_thread_t *p_vout )
*****************************************************************************/
static
int
vout_Init
(
vout_thread_t
*
p_vout
)
{
int
i_index
;
picture_t
*
p_pic
;
int
i_index
=
0
;
I_OUTPUTPICTURES
=
0
;
/* Initialize the output structure */
switch
(
p_vout
->
render
.
i_chroma
)
{
case
YUV_420_PICTURE
:
p_vout
->
output
.
i_chroma
=
p_vout
->
render
.
i_chroma
;
p_vout
->
output
.
i_width
=
p_vout
->
render
.
i_width
;
p_vout
->
output
.
i_height
=
p_vout
->
render
.
i_height
;
p_vout
->
output
.
i_aspect
=
p_vout
->
render
.
i_aspect
;
break
;
default:
return
(
0
);
}
/* Try to initialize up to XVIDEO_MAX_DIRECTBUFFERS direct buffers */
while
(
i_index
<
XVIDEO_MAX_DIRECTBUFFERS
)
while
(
I_OUTPUTPICTURES
<
XVIDEO_MAX_DIRECTBUFFERS
)
{
p_pic
=
&
p_vout
->
p_picture
[
i_index
]
;
p_pic
=
NULL
;
/* Find an empty picture slot */
for
(
i_index
=
0
;
i_index
<
VOUT_MAX_PICTURES
;
i_index
++
)
{
if
(
p_vout
->
p_picture
[
i_index
].
i_status
==
FREE_PICTURE
)
{
p_pic
=
p_vout
->
p_picture
+
i_index
;
break
;
}
}
/* Allocate the picture */
if
(
XVideoNewPicture
(
p_vout
,
p_pic
)
)
{
break
;
}
p_pic
->
i_status
=
DESTROYED_PICTURE
;
p_pic
->
b_directbuffer
=
1
;
p_pic
->
i_type
=
DIRECT_PICTURE
;
p_pic
->
i_left_margin
=
p_pic
->
i_right_margin
=
p_pic
->
i_top_margin
=
p_pic
->
i_bottom_margin
=
0
;
i_index
++
;
}
PP_OUTPUTPICTURE
[
I_OUTPUTPICTURES
]
=
p_pic
;
/* How many directbuffers did we create ? */
p_vout
->
i_directbuffers
=
i_index
;
I_OUTPUTPICTURES
++
;
}
return
(
0
);
}
...
...
@@ -308,13 +330,13 @@ static void vout_End( vout_thread_t *p_vout )
int
i_index
;
/* Free the direct buffers we allocated */
for
(
i_index
=
p_vout
->
i_directbuffers
;
i_index
;
)
for
(
i_index
=
I_OUTPUTPICTURES
;
i_index
;
)
{
i_index
--
;
DestroyShmImage
(
p_vout
->
p_sys
->
p_display
,
p_vout
->
p_picture
[
i_index
].
p_sys
->
p_xvimage
,
&
p_vout
->
p_picture
[
i_index
].
p_sys
->
shminfo
);
free
(
p_vout
->
p_picture
[
i_index
].
p_sys
);
PP_OUTPUTPICTURE
[
i_index
]
->
p_sys
->
p_xvimage
,
&
PP_OUTPUTPICTURE
[
i_index
]
->
p_sys
->
shminfo
);
free
(
PP_OUTPUTPICTURE
[
i_index
]
->
p_sys
);
}
}
...
...
@@ -350,30 +372,23 @@ static void vout_Destroy( vout_thread_t *p_vout )
*****************************************************************************/
static
void
vout_Display
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
)
{
int
i_
dest_width
,
i_dest_height
,
i_dest_x
,
i_dest
_y
;
int
i_
width
,
i_height
,
i_x
,
i
_y
;
//printf("pic: %i %i, disp: %i %i\n", p_pic->i_width, p_pic->i_height, p_vout->p_sys->i_window_width, p_vout->p_sys->i_window_height);
//printf("pic aspect ratio: %i\n", p_pic->i_aspect_ratio);
XVideoOutputCoords
(
p_pic
,
p_vout
->
b_scale
,
p_vout
->
p_sys
->
i_window_width
,
p_vout
->
p_sys
->
i_window_height
,
&
i_dest_x
,
&
i_dest_y
,
&
i_dest_width
,
&
i_dest_height
);
//printf("resized to %i %i, moved at %i %i\n", i_dest_width, i_dest_height, i_dest_x, i_dest_y);
vout_PlacePicture
(
p_vout
,
p_vout
->
p_sys
->
i_width
,
p_vout
->
p_sys
->
i_height
,
&
i_x
,
&
i_y
,
&
i_width
,
&
i_height
);
XvShmPutImage
(
p_vout
->
p_sys
->
p_display
,
p_vout
->
p_sys
->
i_xvport
,
p_vout
->
p_sys
->
yuv_window
,
p_vout
->
p_sys
->
gc
,
p_pic
->
p_sys
->
p_xvimage
,
0
/*src_x*/
,
0
/*src_y*/
,
p_pic
->
i_width
,
p_pic
->
i_height
,
0
/*dest_x*/
,
0
/*dest_y*/
,
i_
dest_width
,
i_dest
_height
,
p_pic
->
p_sys
->
p_xvimage
,
0
/*src_x*/
,
0
/*src_y*/
,
p_vout
->
output
.
i_width
,
p_vout
->
output
.
i_height
,
0
/*dest_x*/
,
0
/*dest_y*/
,
i_
width
,
i
_height
,
True
);
XResizeWindow
(
p_vout
->
p_sys
->
p_display
,
p_vout
->
p_sys
->
yuv_window
,
i_
dest_width
,
i_dest
_height
);
#if 0
i_
width
,
i
_height
);
XMoveWindow
(
p_vout
->
p_sys
->
p_display
,
p_vout
->
p_sys
->
yuv_window
,
i_dest_x, i_dest_y );
#endif
i_x
,
i_y
);
}
/* following functions are local */
...
...
@@ -411,7 +426,10 @@ static int CheckForXVideo( Display *p_display )
*****************************************************************************/
static
int
XVideoNewPicture
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
)
{
switch
(
p_vout
->
i_chroma
)
int
i_width
=
p_vout
->
output
.
i_width
;
int
i_height
=
p_vout
->
output
.
i_height
;
switch
(
p_vout
->
output
.
i_chroma
)
{
case
YUV_420_PICTURE
:
/* We know this chroma, allocate a buffer which will be used
...
...
@@ -428,31 +446,29 @@ static int XVideoNewPicture( vout_thread_t *p_vout, picture_t *p_pic )
CreateShmImage
(
p_vout
->
p_sys
->
p_display
,
p_vout
->
p_sys
->
i_xvport
,
&
p_pic
->
p_sys
->
shminfo
,
p_vout
->
i_width
,
p_vout
->
i_height
);
p_vout
->
output
.
i_width
,
p_vout
->
output
.
i_height
);
if
(
p_pic
->
p_sys
->
p_xvimage
==
NULL
)
{
free
(
p_pic
->
p_sys
);
return
-
1
;
}
p_pic
->
i_chroma
=
p_vout
->
i_chroma
;
/* YUV_420_PICTURE */
p_pic
->
i_width
=
p_vout
->
i_width
;
p_pic
->
i_height
=
p_vout
->
i_height
;
/* Precalculate some values */
p_pic
->
i_size
=
p_vout
->
i_width
*
p_vout
->
i_height
;
p_pic
->
i_chroma_width
=
p_vout
->
i_width
/
2
;
p_pic
->
i_chroma_size
=
p_vout
->
i_height
*
p_pic
->
i_chroma_width
;
/* FIXME: try to get the right i_bytes value from p_
overlay
*/
p_pic
->
planes
[
Y_PLANE
].
p_data
=
p_pic
->
p_sys
->
p_xvimage
->
data
;
p_pic
->
planes
[
Y_PLANE
].
i_bytes
=
p_pic
->
i_size
*
sizeof
(
u8
);
p_pic
->
planes
[
U_PLANE
].
p_data
=
(
u8
*
)
p_pic
->
p_sys
->
p_xvimage
->
data
+
p_pic
->
i_size
*
5
/
4
;
p_pic
->
planes
[
U_PLANE
].
i_bytes
=
p_pic
->
i_size
*
sizeof
(
u8
)
/
4
;
p_pic
->
planes
[
V_PLANE
].
p_data
=
(
u8
*
)
p_pic
->
p_sys
->
p_xvimage
->
data
+
p_pic
->
i_size
;
p_pic
->
planes
[
V_PLANE
].
i_bytes
=
p_pic
->
i_size
*
sizeof
(
u8
)
/
4
;
p_pic
->
i_size
=
i_width
*
i_height
;
p_pic
->
i_chroma_width
=
i_width
/
2
;
p_pic
->
i_chroma_size
=
i_height
*
(
i_width
/
2
)
;
/* FIXME: try to get the right i_bytes value from p_
xvimage
*/
p_pic
->
planes
[
Y_PLANE
].
p_data
=
p_pic
->
p_sys
->
p_xvimage
->
data
;
p_pic
->
planes
[
Y_PLANE
].
i_bytes
=
p_pic
->
i_size
*
sizeof
(
u8
);
p_pic
->
planes
[
U_PLANE
].
p_data
=
(
u8
*
)
p_pic
->
p_sys
->
p_xvimage
->
data
+
p_pic
->
i_size
*
5
/
4
;
p_pic
->
planes
[
U_PLANE
].
i_bytes
=
p_pic
->
i_size
*
sizeof
(
u8
)
/
4
;
p_pic
->
planes
[
V_PLANE
].
p_data
=
(
u8
*
)
p_pic
->
p_sys
->
p_xvimage
->
data
+
p_pic
->
i_size
;
p_pic
->
planes
[
V_PLANE
].
i_bytes
=
p_pic
->
i_size
*
sizeof
(
u8
)
/
4
;
p_pic
->
i_planes
=
3
;
return
0
;
...
...
@@ -461,7 +477,7 @@ static int XVideoNewPicture( vout_thread_t *p_vout, picture_t *p_pic )
/* Unknown chroma, tell the guy to get lost */
p_pic
->
i_planes
=
0
;
return
0
;
return
-
1
;
}
}
...
...
@@ -549,46 +565,6 @@ static void DestroyShmImage( Display *p_display, XvImage *p_xvimage,
}
}
/* This based on some code in SetBufferPicture... At the moment it's only
* used by the xvideo plugin, but others may want to use it. */
static
void
XVideoOutputCoords
(
const
picture_t
*
p_pic
,
const
boolean_t
scale
,
const
int
win_w
,
const
int
win_h
,
int
*
dx
,
int
*
dy
,
int
*
w
,
int
*
h
)
{
if
(
!
scale
)
{
*
w
=
p_pic
->
i_width
;
*
h
=
p_pic
->
i_height
;
}
else
{
*
h
=
win_h
;
switch
(
p_pic
->
i_aspect_ratio
)
{
case
AR_3_4_PICTURE
:
*
w
=
win_h
*
4
/
3
;
break
;
case
AR_16_9_PICTURE
:
*
w
=
win_h
*
16
/
9
;
break
;
case
AR_221_1_PICTURE
:
*
w
=
win_h
*
221
/
100
;
break
;
case
AR_SQUARE_PICTURE
:
default:
*
w
=
win_h
*
p_pic
->
i_width
/
p_pic
->
i_height
;
break
;
}
}
/* Set picture position */
*
dx
=
(
win_w
-
*
w
)
/
2
;
*
dy
=
(
win_h
-
*
h
)
/
2
;
}
/*****************************************************************************
* GetXVideoPort: get YUV12 port
*****************************************************************************
...
...
src/video_output/video_output.c
View file @
d8e44fce
...
...
@@ -5,7 +5,7 @@
* thread, and destroy a previously oppened video output thread.
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: video_output.c,v 1.14
6 2001/12/09 17:01:3
7 sam Exp $
* $Id: video_output.c,v 1.14
7 2001/12/13 12:47:1
7 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
...
...
@@ -94,7 +94,7 @@ void vout_EndBank ( void )
*****************************************************************************/
vout_thread_t
*
vout_CreateThread
(
int
*
pi_status
,
int
i_width
,
int
i_height
,
int
i_chroma
,
int
i_aspect
_ratio
)
int
i_chroma
,
int
i_aspect
)
{
vout_thread_t
*
p_vout
;
/* thread descriptor */
int
i_status
;
/* thread status */
...
...
@@ -142,9 +142,7 @@ vout_thread_t * vout_CreateThread ( int *pi_status,
for
(
i_index
=
0
;
i_index
<
VOUT_MAX_PICTURES
;
i_index
++
)
{
p_vout
->
p_picture
[
i_index
].
i_status
=
FREE_PICTURE
;
p_vout
->
p_picture
[
i_index
].
i_chroma
=
EMPTY_PICTURE
;
p_vout
->
p_picture
[
i_index
].
i_aspect_ratio
=
i_aspect_ratio
;
p_vout
->
p_picture
[
i_index
].
b_directbuffer
=
0
;
p_vout
->
p_picture
[
i_index
].
i_type
=
EMPTY_PICTURE
;
}
for
(
i_index
=
0
;
i_index
<
VOUT_MAX_SUBPICTURES
;
i_index
++
)
...
...
@@ -153,23 +151,25 @@ vout_thread_t * vout_CreateThread ( int *pi_status,
p_vout
->
p_subpicture
[
i_index
].
i_type
=
EMPTY_SUBPICTURE
;
}
p_vout
->
i_width
=
i_width
;
p_vout
->
i_height
=
i_height
;
p_vout
->
i_chroma
=
i_chroma
;
p_vout
->
i_aspect_ratio
=
i_aspect_ratio
;
p_vout
->
i_pictures
=
0
;
p_vout
->
i_directbuffers
=
0
;
/* Initialize the rendering heap */
p_vout
->
i_heap_size
=
0
;
I_RENDERPICTURES
=
0
;
p_vout
->
render
.
i_width
=
i_width
;
p_vout
->
render
.
i_height
=
i_height
;
p_vout
->
render
.
i_chroma
=
i_chroma
;
p_vout
->
render
.
i_aspect
=
i_aspect
;
/* Initialize misc stuff */
p_vout
->
i_changes
=
0
;
p_vout
->
f_gamma
=
0
;
p_vout
->
b_grayscale
=
0
;
p_vout
->
b_info
=
0
;
p_vout
->
b_interface
=
0
;
p_vout
->
b_scale
=
1
;
p_vout
->
i_changes
=
0
;
p_vout
->
f_gamma
=
0
;
p_vout
->
b_grayscale
=
0
;
p_vout
->
b_info
=
0
;
p_vout
->
b_interface
=
0
;
p_vout
->
b_scale
=
1
;
p_vout
->
b_fullscreen
=
main_GetIntVariable
(
VOUT_FULLSCREEN_VAR
,
VOUT_FULLSCREEN_DEFAULT
);
p_vout
->
render_time
=
10
;
p_vout
->
render_time
=
10
;
/* Create thread and set locks */
vlc_mutex_init
(
&
p_vout
->
picture_lock
);
...
...
@@ -242,6 +242,8 @@ void vout_DestroyThread( vout_thread_t *p_vout, int *pi_status )
*****************************************************************************/
static
int
InitThread
(
vout_thread_t
*
p_vout
)
{
int
i_index
;
/* Update status */
*
p_vout
->
pi_status
=
THREAD_START
;
...
...
@@ -258,7 +260,7 @@ static int InitThread( vout_thread_t *p_vout )
return
(
1
);
}
if
(
!
p_vout
->
i_directbuffers
)
if
(
!
I_OUTPUTPICTURES
)
{
intf_ErrMsg
(
"vout error: plugin was unable to allocate at least "
"one direct buffer"
);
...
...
@@ -266,12 +268,39 @@ static int InitThread( vout_thread_t *p_vout )
return
(
1
);
}
intf_WarnMsg
(
1
,
"vout info: got %i direct buffer(s)"
,
p_vout
->
i_directbuffers
);
/* Check whether we managed to create direct buffers similar to
* the render buffers, ie same size, chroma and aspect ratio */
if
(
(
p_vout
->
output
.
i_width
==
p_vout
->
render
.
i_width
)
&&
(
p_vout
->
output
.
i_height
==
p_vout
->
render
.
i_height
)
&&
(
p_vout
->
output
.
i_chroma
==
p_vout
->
render
.
i_chroma
)
&&
(
p_vout
->
output
.
i_aspect
==
p_vout
->
render
.
i_aspect
)
)
{
p_vout
->
b_direct
=
1
;
/* Map the first render buffers to the first direct buffers, but
* leave the first direct buffer for memcpy operations */
i_index
=
1
;
}
else
{
p_vout
->
b_direct
=
0
;
/* Append render buffers after the direct buffers */
i_index
=
I_RENDERPICTURES
;
}
for
(
;
i_index
<
VOUT_MAX_PICTURES
;
i_index
++
)
{
PP_RENDERPICTURE
[
I_RENDERPICTURES
]
=
&
p_vout
->
p_picture
[
i_index
];
I_RENDERPICTURES
++
;
}
intf_WarnMsg
(
1
,
"vout info: got %i direct buffer(s)"
,
I_OUTPUTPICTURES
);
/* Mark thread as running and return */
p_vout
->
b_active
=
1
;
*
p_vout
->
pi_status
=
THREAD_READY
;
p_vout
->
b_active
=
1
;
*
p_vout
->
pi_status
=
THREAD_READY
;
intf_DbgMsg
(
"thread ready"
);
return
(
0
);
...
...
@@ -323,17 +352,15 @@ static void RunThread( vout_thread_t *p_vout)
while
(
(
!
p_vout
->
b_die
)
&&
(
!
p_vout
->
b_error
)
)
{
/* Initialize loop variables */
p_picture
=
NULL
;
p_directbuffer
=
NULL
;
display_date
=
0
;
current_date
=
mdate
();
display_date
=
0
;
current_date
=
mdate
();
#ifdef STATS
p_vout
->
c_loops
++
;
if
(
!
(
p_vout
->
c_loops
%
VOUT_STATS_NB_LOOPS
)
)
{
intf_Msg
(
"vout stats: picture heap: %d/%d"
,
p_vout
->
i_pictures
,
VOUT_MAX_PICTURES
);
I_RENDERPICTURES
,
p_vout
->
i_heap_size
);
}
#endif
...
...
@@ -341,13 +368,17 @@ static void RunThread( vout_thread_t *p_vout)
* Find the picture to display - this operation does not need lock,
* since only READY_PICTUREs are handled
*/
for
(
i_index
=
0
;
i_index
<
VOUT_MAX_PICTURES
;
i_index
++
)
p_picture
=
NULL
;
for
(
i_index
=
0
;
i_index
<
I_RENDERPICTURES
;
i_index
++
)
{
if
(
(
p_vout
->
p_picture
[
i_index
].
i_status
==
READY_PICTURE
)
&&
(
(
p_picture
==
NULL
)
||
(
p_vout
->
p_picture
[
i_index
].
date
<
display_date
)
)
)
if
(
(
PP_RENDERPICTURE
[
i_index
]
->
i_status
==
READY_PICTURE
)
&&
(
(
p_picture
==
NULL
)
||
(
PP_RENDERPICTURE
[
i_index
]
->
date
<
display_date
)
)
)
{
p_picture
=
&
p_vout
->
p_picture
[
i_index
];
p_picture
=
PP_RENDERPICTURE
[
i_index
];
display_date
=
p_picture
->
date
;
}
}
...
...
@@ -373,7 +404,7 @@ static void RunThread( vout_thread_t *p_vout)
{
/* Destroy the picture without displaying it */
p_picture
->
i_status
=
DESTROYED_PICTURE
;
p_vout
->
i_
pictures
--
;
p_vout
->
i_
heap_size
--
;
}
intf_WarnMsg
(
1
,
"vout warning: late picture skipped (%p)"
,
p_picture
);
...
...
@@ -450,7 +481,7 @@ static void RunThread( vout_thread_t *p_vout)
else
{
p_picture
->
i_status
=
DESTROYED_PICTURE
;
p_vout
->
i_
pictures
--
;
p_vout
->
i_
heap_size
--
;
}
vlc_mutex_unlock
(
&
p_vout
->
picture_lock
);
}
...
...
@@ -527,11 +558,9 @@ static void EndThread( vout_thread_t *p_vout )
#endif
/* Destroy all remaining pictures */
for
(
i_index
=
p_vout
->
i_directbuffers
;
i_index
<
VOUT_MAX_PICTURES
;
i_index
++
)
for
(
i_index
=
0
;
i_index
<
VOUT_MAX_PICTURES
;
i_index
++
)
{
if
(
p_vout
->
p_picture
[
i_index
].
i_status
!=
FREE
_PICTURE
)
if
(
p_vout
->
p_picture
[
i_index
].
i_type
==
MEMORY
_PICTURE
)
{
free
(
p_vout
->
p_picture
[
i_index
].
planes
[
0
].
p_data
);
}
...
...
src/video_output/vout_pictures.c
View file @
d8e44fce
...
...
@@ -2,7 +2,7 @@
* vout_pictures.c : picture management functions
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: vout_pictures.c,v 1.
1 2001/12/09 17:01:3
7 sam Exp $
* $Id: vout_pictures.c,v 1.
2 2001/12/13 12:47:1
7 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -43,7 +43,7 @@
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static
void
NewPicture
(
picture_t
*
,
int
,
int
,
int
);
static
void
NewPicture
(
vout_thread_t
*
,
picture_t
*
);
/*****************************************************************************
* vout_DisplayPicture: display a picture
...
...
@@ -121,14 +121,11 @@ void vout_DatePicture( vout_thread_t *p_vout,
* already allocated zone of memory in the picture data fields. It needs locking
* since several pictures can be created by several producers threads.
*****************************************************************************/
picture_t
*
vout_CreatePicture
(
vout_thread_t
*
p_vout
,
int
i_width
,
int
i_height
,
int
i_chroma
,
int
i_aspect_ratio
)
picture_t
*
vout_CreatePicture
(
vout_thread_t
*
p_vout
)
{
int
i_picture
;
/* picture index */
picture_t
*
p_picture
;
picture_t
*
p_free_picture
=
NULL
;
/* first free picture */
picture_t
*
p_destroyed_picture
=
NULL
;
/* first destroyed picture */
/* Get lock */
vlc_mutex_lock
(
&
p_vout
->
picture_lock
);
...
...
@@ -137,54 +134,33 @@ picture_t *vout_CreatePicture( vout_thread_t *p_vout,
* Look for an empty place. XXX: we start at 1 because the first
* directbuffer is reserved for memcpy()ed pictures.
*/
for
(
i_picture
=
1
;
i_picture
<
VOUT_MAX_
PICTURES
;
i_picture
++
)
for
(
i_picture
=
0
;
i_picture
<
I_RENDER
PICTURES
;
i_picture
++
)
{
p_picture
=
p_vout
->
p_picture
+
i_picture
;
p_picture
=
PP_RENDERPICTURE
[
i_picture
]
;
if
(
p_picture
->
i_status
==
DESTROYED_PICTURE
)
switch
(
p_picture
->
i_status
)
{
/* Picture is marked for destruction, but is still allocated.
* Note that if width and type are the same for two pictures,
* chroma_width should also be the same */
if
(
(
p_picture
->
i_chroma
==
i_chroma
)
&&
(
p_picture
->
i_height
==
i_height
)
&&
(
p_picture
->
i_width
==
i_width
)
)
{
/* Memory size do match : memory will not be reallocated,
* and function can end immediately - this is the best
* possible case, since no memory allocation needs to be
* done */
case
DESTROYED_PICTURE
:
/* Memory will not be reallocated, and function can end
* immediately - this is the best possible case, since no
* memory allocation needs to be done */
p_picture
->
i_status
=
RESERVED_PICTURE
;
p_vout
->
i_
pictures
++
;
p_vout
->
i_
heap_size
++
;
vlc_mutex_unlock
(
&
p_vout
->
picture_lock
);
return
(
p_picture
);
}
else
if
(
(
p_destroyed_picture
==
NULL
)
&&
!
p_picture
->
b_directbuffer
)
{
/* Memory size do not match, but picture index will be kept in
* case no other place are left */
p_destroyed_picture
=
p_picture
;
}
}
else
if
(
(
p_free_picture
==
NULL
)
&&
(
p_picture
->
i_status
==
FREE_PICTURE
)
)
{
/* Picture is empty and ready for allocation */
p_free_picture
=
p_picture
;
}
}
/* If no free picture is available, use a destroyed picture */
if
(
(
p_free_picture
==
NULL
)
&&
(
p_destroyed_picture
!=
NULL
)
)
{
/* No free picture or matching destroyed picture has been found, but
* a destroyed picture is still avalaible */
free
(
p_destroyed_picture
->
planes
[
0
].
p_data
);
p_destroyed_picture
->
i_planes
=
0
;
p_free_picture
=
p_destroyed_picture
;
case
FREE_PICTURE
:
if
(
p_free_picture
==
NULL
)
{
/* Picture is empty and ready for allocation */
p_free_picture
=
p_picture
;
}
break
;
default:
break
;
}
}
/*
...
...
@@ -192,26 +168,22 @@ picture_t *vout_CreatePicture( vout_thread_t *p_vout,
*/
if
(
p_free_picture
!=
NULL
)
{
NewPicture
(
p_
free_picture
,
i_chroma
,
i_width
,
i_height
);
NewPicture
(
p_
vout
,
p_free_picture
);
if
(
p_free_picture
->
i_planes
!=
0
)
if
(
p_free_picture
->
i_planes
)
{
/* Copy picture information, set some default values */
p_free_picture
->
i_width
=
i_width
;
p_free_picture
->
i_height
=
i_height
;
p_free_picture
->
i_chroma
=
i_chroma
;
p_free_picture
->
i_aspect_ratio
=
i_aspect_ratio
;
p_free_picture
->
i_status
=
RESERVED_PICTURE
;
p_free_picture
->
i_status
=
RESERVED_PICTURE
;
p_free_picture
->
i_type
=
MEMORY_PICTURE
;
p_free_picture
->
i_matrix_coefficients
=
1
;
p_free_picture
->
i_refcount
=
0
;
p_vout
->
i_
pictures
++
;
p_free_picture
->
i_refcount
=
0
;
p_vout
->
i_
heap_size
++
;
}
else
{
/* Memory allocation failed : set picture as empty */
p_free_picture
->
i_chroma
=
EMPTY_PICTURE
;
p_free_picture
->
i_status
=
FREE_PICTURE
;
p_free_picture
=
NULL
;
p_free_picture
->
i_status
=
FREE_PICTURE
;
p_free_picture
=
NULL
;
intf_ErrMsg
(
"vout error: picture allocation failed"
);
}
...
...
@@ -254,7 +226,7 @@ void vout_DestroyPicture( vout_thread_t *p_vout, picture_t *p_picture )
#endif
p_picture
->
i_status
=
DESTROYED_PICTURE
;
p_vout
->
i_
pictures
--
;
p_vout
->
i_
heap_size
--
;
/* destroy the lock that had been initialized in CreatePicture */
vlc_mutex_destroy
(
&
(
p_picture
->
lock_deccount
)
);
...
...
@@ -302,7 +274,7 @@ void vout_UnlinkPicture( vout_thread_t *p_vout, picture_t *p_picture )
(
p_picture
->
i_status
==
DISPLAYED_PICTURE
)
)
{
p_picture
->
i_status
=
DESTROYED_PICTURE
;
p_vout
->
i_
pictures
--
;
p_vout
->
i_
heap_size
--
;
}
#ifdef TRACE_VOUT
...
...
@@ -331,7 +303,7 @@ picture_t * vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_picture,
return
NULL
;
}
if
(
p_picture
->
b_directbuffer
)
if
(
p_picture
->
i_type
==
DIRECT_PICTURE
)
{
if
(
p_picture
->
i_refcount
)
{
...
...
@@ -346,14 +318,14 @@ picture_t * vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_picture,
for
(
i_index
=
0
;
i_index
<
p_picture
->
i_planes
;
i_index
++
)
{
p_main
->
fast_memcpy
(
p_vout
->
p_picture
[
0
].
planes
[
i_index
].
p_data
,
PP_OUTPUTPICTURE
[
0
]
->
planes
[
i_index
].
p_data
,
p_picture
->
planes
[
i_index
].
p_data
,
p_picture
->
planes
[
i_index
].
i_bytes
);
}
vout_RenderSubPictures
(
&
p_vout
->
p_picture
[
0
],
p_subpic
);
vout_RenderSubPictures
(
p_vout
,
PP_OUTPUTPICTURE
[
0
],
p_subpic
);
return
&
p_vout
->
p_picture
[
0
];
return
PP_OUTPUTPICTURE
[
0
];
}
/* No subtitles, picture is in a directbuffer so
...
...
@@ -365,30 +337,28 @@ picture_t * vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_picture,
/* Picture is in a direct buffer but isn't used by the
* decoder. We can safely render subtitles on it and
* display it. */
vout_RenderSubPictures
(
p_picture
,
p_subpic
);
vout_RenderSubPictures
(
p_
vout
,
p_
picture
,
p_subpic
);
return
p_picture
;
}
/* Not a direct buffer. We either need to copy it to a direct buffer,
* or render it if the chroma isn't the same. */
if
(
(
p_picture
->
i_chroma
==
p_vout
->
p_picture
[
0
].
i_chroma
)
&&
(
p_picture
->
i_height
==
p_vout
->
p_picture
[
0
].
i_height
)
&&
(
p_picture
->
i_width
==
p_vout
->
p_picture
[
0
].
i_width
)
)
if
(
p_vout
->
b_direct
)
{
/* Picture is not in a direct buffer, but is exactly the
* same size as the direct buffers. A memcpy() is enough,
* then render the subtitles. */
for
(
i_index
=
0
;
i_index
<
p_picture
->
i_planes
;
i_index
++
)
{
p_main
->
fast_memcpy
(
p_vout
->
p_picture
[
0
].
planes
[
i_index
].
p_data
,
p_main
->
fast_memcpy
(
PP_OUTPUTPICTURE
[
0
]
->
planes
[
i_index
].
p_data
,
p_picture
->
planes
[
i_index
].
p_data
,
p_picture
->
planes
[
i_index
].
i_bytes
);
}
vout_RenderSubPictures
(
&
p_vout
->
p_picture
[
0
],
p_subpic
);
vout_RenderSubPictures
(
p_vout
,
PP_OUTPUTPICTURE
[
0
],
p_subpic
);
return
&
p_vout
->
p_picture
[
0
];
return
PP_OUTPUTPICTURE
[
0
];
}
/* Picture is not in a direct buffer, and needs to be converted to
...
...
@@ -400,11 +370,79 @@ picture_t * vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_picture,
/* XXX: render to direct buffer */
vout_RenderSubPictures
(
p_picture
,
p_subpic
);
vout_RenderSubPictures
(
p_
vout
,
p_
picture
,
p_subpic
);
return
&
p_vout
->
p_picture
[
0
];
}
/*****************************************************************************
* vout_PlacePicture: calculate image window coordinates
*****************************************************************************
* This function will be accessed by plugins. It calculates the relative
* position of the output window and the image window.
*****************************************************************************/
void
vout_PlacePicture
(
vout_thread_t
*
p_vout
,
int
i_width
,
int
i_height
,
int
*
pi_x
,
int
*
pi_y
,
int
*
pi_width
,
int
*
pi_height
)
{
int
i_ratio
;
if
(
p_vout
->
b_scale
)
{
*
pi_width
=
i_width
;
*
pi_height
=
i_height
;
}
else
{
*
pi_width
=
MIN
(
i_width
,
p_vout
->
render
.
i_width
);
*
pi_height
=
MIN
(
i_height
,
p_vout
->
render
.
i_height
);
}
switch
(
p_vout
->
render
.
i_aspect
)
{
case
AR_3_4_PICTURE
:
i_ratio
=
900
*
4
/
3
;
break
;
case
AR_16_9_PICTURE
:
i_ratio
=
900
*
16
/
9
;
break
;
case
AR_221_1_PICTURE
:
i_ratio
=
900
*
221
/
100
;
break
;
case
AR_SQUARE_PICTURE
:
default:
i_ratio
=
900
*
p_vout
->
render
.
i_width
/
p_vout
->
render
.
i_height
;
break
;
}
if
(
900
*
*
pi_width
/
*
pi_height
<
i_ratio
)
{
*
pi_width
=
*
pi_height
*
i_ratio
/
900
;
}
else
{
*
pi_height
=
*
pi_width
*
900
/
i_ratio
;
}
if
(
*
pi_width
>
i_width
)
{
*
pi_width
=
i_width
;
*
pi_height
=
900
*
*
pi_width
/
i_ratio
;
}
if
(
*
pi_height
>
i_height
)
{
*
pi_height
=
i_height
;
*
pi_width
=
*
pi_height
*
i_ratio
/
900
;
}
*
pi_x
=
(
i_width
-
*
pi_width
)
/
2
;
*
pi_y
=
(
i_height
-
*
pi_height
)
/
2
;
}
/* Following functions are local */
/*****************************************************************************
...
...
@@ -414,39 +452,40 @@ picture_t * vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_picture,
* used exactly like a video buffer. The video output thread then manages
* how it gets displayed.
*****************************************************************************/
static
void
NewPicture
(
picture_t
*
p_picture
,
int
i_chroma
,
int
i_width
,
int
i_height
)
static
void
NewPicture
(
vout_thread_t
*
p_vout
,
picture_t
*
p_picture
)
{
int
i_data_size
=
0
;
p_picture
->
i_size
=
i_width
*
i_height
;
p_picture
->
i_size
=
p_vout
->
render
.
i_width
*
p_vout
->
render
.
i_height
;
/* Calculate coordinates */
switch
(
i_chroma
)
switch
(
p_vout
->
render
.
i_chroma
)
{
case
YUV_420_PICTURE
:
/* YUV 420: 1,1/4,1/4 samples per pixel */
p_picture
->
i_chroma_size
=
p_picture
->
i_size
/
4
;
p_picture
->
i_chroma_width
=
i_width
/
2
;
p_picture
->
i_chroma_width
=
p_vout
->
render
.
i_width
/
2
;
break
;
case
YUV_422_PICTURE
:
/* YUV 422: 1,1/2,1/2 samples per pixel */
p_picture
->
i_chroma_size
=
p_picture
->
i_size
/
2
;
p_picture
->
i_chroma_width
=
i_width
/
2
;
p_picture
->
i_chroma_width
=
p_vout
->
render
.
i_width
/
2
;
break
;
case
YUV_444_PICTURE
:
/* YUV 444: 1,1,1 samples per pixel */
p_picture
->
i_chroma_size
=
p_picture
->
i_size
;
p_picture
->
i_chroma_width
=
i_width
;
p_picture
->
i_chroma_width
=
p_vout
->
render
.
i_width
;
break
;
default:
intf_ErrMsg
(
"error: unknown chroma type %d"
,
i_chroma
);
intf_ErrMsg
(
"vout error: unknown chroma type %d"
,
p_vout
->
render
.
i_chroma
);
p_picture
->
i_planes
=
0
;
return
;
}
/* Allocate memory */
switch
(
i_chroma
)
switch
(
p_vout
->
render
.
i_chroma
)
{
case
YUV_420_PICTURE
:
/* YUV 420: 1,1/4,1/4 samples per pixel */
case
YUV_422_PICTURE
:
/* YUV 422: 1,1/2,1/2 samples per pixel */
...
...
src/video_output/vout_subpictures.c
View file @
d8e44fce
...
...
@@ -2,7 +2,7 @@
* vout_subpictures.c : subpicture management functions
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: vout_subpictures.c,v 1.
1 2001/12/09 17:01:3
7 sam Exp $
* $Id: vout_subpictures.c,v 1.
2 2001/12/13 12:47:1
7 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -43,8 +43,10 @@
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static
void
vout_RenderRGBSPU
(
picture_t
*
p_pic
,
const
subpicture_t
*
p_spu
);
static
void
vout_RenderYUVSPU
(
picture_t
*
p_pic
,
const
subpicture_t
*
p_spu
);
static
void
vout_RenderRGBSPU
(
const
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
,
const
subpicture_t
*
p_spu
);
static
void
vout_RenderYUVSPU
(
const
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
,
const
subpicture_t
*
p_spu
);
/* FIXME: fake palette - the real one has to be sought in the .IFO */
static
int
p_palette
[
4
]
=
{
0x0000
,
0x0000
,
0xffff
,
0x8888
};
...
...
@@ -67,7 +69,7 @@ void vout_DisplaySubPicture( vout_thread_t *p_vout, subpicture_t *p_subpic )
/* Check if status is valid */
if
(
p_subpic
->
i_status
!=
RESERVED_SUBPICTURE
)
{
intf_ErrMsg
(
"error: subpicture %p has invalid status %d"
,
p_subpic
,
intf_ErrMsg
(
"error: subpicture %p has invalid status
#
%d"
,
p_subpic
,
p_subpic
->
i_status
);
}
#endif
...
...
@@ -219,7 +221,8 @@ void vout_DestroySubPicture( vout_thread_t *p_vout, subpicture_t *p_subpic )
{
#ifdef DEBUG
/* Check if status is valid */
if
(
p_subpic
->
i_status
!=
RESERVED_SUBPICTURE
)
if
(
(
p_subpic
->
i_status
!=
RESERVED_SUBPICTURE
)
&&
(
p_subpic
->
i_status
!=
READY_SUBPICTURE
)
)
{
intf_ErrMsg
(
"error: subpicture %p has invalid status %d"
,
p_subpic
,
p_subpic
->
i_status
);
...
...
@@ -238,7 +241,8 @@ void vout_DestroySubPicture( vout_thread_t *p_vout, subpicture_t *p_subpic )
*****************************************************************************
* This function renders a sub picture unit.
*****************************************************************************/
void
vout_RenderSubPictures
(
picture_t
*
p_pic
,
subpicture_t
*
p_subpic
)
void
vout_RenderSubPictures
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
,
subpicture_t
*
p_subpic
)
{
#if 0
p_vout_font_t p_font; /* text font */
...
...
@@ -250,8 +254,8 @@ void vout_RenderSubPictures( picture_t *p_pic, subpicture_t *p_subpic )
switch
(
p_subpic
->
i_type
)
{
case
DVD_SUBPICTURE
:
/* DVD subpicture unit */
vout_RenderRGBSPU
(
p_pic
,
p_subpic
);
vout_RenderYUVSPU
(
p_pic
,
p_subpic
);
vout_RenderRGBSPU
(
p_
vout
,
p_
pic
,
p_subpic
);
vout_RenderYUVSPU
(
p_
vout
,
p_
pic
,
p_subpic
);
break
;
#if 0
...
...
@@ -415,7 +419,8 @@ subpicture_t *vout_SortSubPictures( vout_thread_t *p_vout,
* RLE buffer again and again. Most sanity checks are done in spu_decoder.c
* so that this routine can be as fast as possible.
*****************************************************************************/
static
void
vout_RenderRGBSPU
(
picture_t
*
p_pic
,
const
subpicture_t
*
p_spu
)
static
void
vout_RenderRGBSPU
(
const
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
,
const
subpicture_t
*
p_spu
)
{
#if 0
int i_len, i_color;
...
...
@@ -522,7 +527,8 @@ static void vout_RenderRGBSPU( picture_t *p_pic, const subpicture_t *p_spu )
* RLE buffer again and again. Most sanity checks are done in spu_decoder.c
* so that this routine can be as fast as possible.
*****************************************************************************/
static
void
vout_RenderYUVSPU
(
picture_t
*
p_pic
,
const
subpicture_t
*
p_spu
)
static
void
vout_RenderYUVSPU
(
const
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
,
const
subpicture_t
*
p_spu
)
{
int
i_len
,
i_color
;
u16
*
p_source
=
(
u16
*
)
p_spu
->
p_data
;
...
...
@@ -530,10 +536,10 @@ static void vout_RenderYUVSPU( picture_t *p_pic, const subpicture_t *p_spu )
int
i_x
,
i_y
;
u8
*
p_dest
=
p_pic
->
planes
[
Y_PLANE
].
p_data
+
p_spu
->
i_x
+
p_spu
->
i_width
+
p_pic
->
i_width
*
(
p_spu
->
i_y
+
p_spu
->
i_height
);
+
p_vout
->
output
.
i_width
*
(
p_spu
->
i_y
+
p_spu
->
i_height
);
/* Draw until we reach the bottom of the subtitle */
i_y
=
p_spu
->
i_height
*
p_
pic
->
i_width
;
i_y
=
p_spu
->
i_height
*
p_
vout
->
output
.
i_width
;
while
(
i_y
)
{
...
...
@@ -556,7 +562,7 @@ static void vout_RenderYUVSPU( picture_t *p_pic, const subpicture_t *p_spu )
i_x
-=
*
p_source
++
>>
2
;
}
i_y
-=
p_
pic
->
i_width
;
i_y
-=
p_
vout
->
output
.
i_width
;
}
}
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