Commit 2d90188b authored by Sam Hocevar's avatar Sam Hocevar

  * Initialize SDL before opening the SDL audio output.
  * Prevent two SDL video outputs or audio outputs to be spawned at the
    same time to avoid ugly crashes.
  * The SDL plugin now says whether we are using software or hardware YUV
    in its window title.
  * We now stop at the first ':' when looking for a module name, to easily
    pass information to the modules. Possible example: --vout sdl:software,
    implementation of such an option is left as an exercise.
  * Merged filter_bob and filter_bob422 into filter_bob. Use --filter bob
    to deinterlace 422 into 420 as well.
  * Factorized code common to most filters and the video output, optimized
    a few filters by aligning data and reading 64 bits at a time.
  * Two new absolutely useless, CPU-eating, resource-wasting, but fun
    filters: enjoy `transform', which performs flips and 90� rotations, and
    `distort', which performs animated image effects (currently only a naive
    sine wave is implemented). Usage examples:
       --filter transform:hflip
       --filter transform:vflip
       --filter transform:90
       --filter transform:180
       --filter transform:270
       --filter distort:wave
parent 8acfd9b4
......@@ -65,8 +65,9 @@ PLUGINS_TARGETS := ac3_adec/ac3_adec \
esd/esd \
fb/fb \
filter/filter_bob \
filter/filter_bob422 \
filter/filter_transform \
filter/filter_invert \
filter/filter_distort \
filter/filter_wall \
ggi/ggi \
glide/glide \
......
......@@ -77,6 +77,7 @@ LIB_DVD_PLUGIN = @LIB_DVD_PLUGIN@
LIB_DVDREAD = @LIB_DVDREAD@
LIB_DVDREAD_PLUGIN = @LIB_DVDREAD_PLUGIN@
LIB_ESD = @LIB_ESD@
LIB_FILTER_DISTORT = @LIB_FILTER_DISTORT@
LIB_GGI = @LIB_GGI@
LIB_GLIDE = @LIB_GLIDE@
LIB_GNOME = @LIB_GNOME@
......
......@@ -4430,12 +4430,13 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
LIB_IMDCT="${LIB_IMDCT} -lm"
LIB_FILTER_DISTORT="${LIB_FILTER_DISTORT} -lm"
else
echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
echo "configure:4439: checking for pow in -lm" >&5
echo "configure:4440: checking for pow in -lm" >&5
ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -4443,7 +4444,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4447 "configure"
#line 4448 "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
......@@ -4454,7 +4455,7 @@ int main() {
pow()
; return 0; }
EOF
if { (eval echo configure:4458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4459: \"$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
......@@ -4481,7 +4482,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:4485: checking for pthread_attr_init in -lpthread" >&5
echo "configure:4486: 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
......@@ -4489,7 +4490,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4493 "configure"
#line 4494 "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
......@@ -4500,7 +4501,7 @@ int main() {
pthread_attr_init()
; return 0; }
EOF
if { (eval echo configure:4504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4505: \"$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
......@@ -4523,7 +4524,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:4527: checking for pthread_attr_init in -lpthreads" >&5
echo "configure:4528: 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
......@@ -4531,7 +4532,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthreads $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4535 "configure"
#line 4536 "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
......@@ -4542,7 +4543,7 @@ int main() {
pthread_attr_init()
; return 0; }
EOF
if { (eval echo configure:4546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4547: \"$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
......@@ -4565,7 +4566,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:4569: checking for pthread_attr_init in -lc_r" >&5
echo "configure:4570: 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
......@@ -4573,7 +4574,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lc_r $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4577 "configure"
#line 4578 "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
......@@ -4584,7 +4585,7 @@ int main() {
pthread_attr_init()
; return 0; }
EOF
if { (eval echo configure:4588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4589: \"$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
......@@ -4607,12 +4608,12 @@ fi
fi
if test "x${THREAD_LIB}" = xerror; then
echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6
echo "configure:4611: checking for pthread_attr_init" >&5
echo "configure:4612: 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 4616 "configure"
#line 4617 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char pthread_attr_init(); below. */
......@@ -4635,7 +4636,7 @@ pthread_attr_init();
; return 0; }
EOF
if { (eval echo configure:4639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4640: \"$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
......@@ -4658,7 +4659,7 @@ fi
fi
echo $ac_n "checking for cthread_fork in -lthreads""... $ac_c" 1>&6
echo "configure:4662: checking for cthread_fork in -lthreads" >&5
echo "configure:4663: 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
......@@ -4666,7 +4667,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lthreads $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4670 "configure"
#line 4671 "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
......@@ -4677,7 +4678,7 @@ int main() {
cthread_fork()
; return 0; }
EOF
if { (eval echo configure:4681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4682: \"$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
......@@ -4699,7 +4700,7 @@ fi
cat > conftest.$ac_ext <<EOF
#line 4703 "configure"
#line 4704 "configure"
#include "confdefs.h"
#include <pthread.h>
EOF
......@@ -4715,7 +4716,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
#line 4719 "configure"
#line 4720 "configure"
#include "confdefs.h"
#include <strings.h>
EOF
......@@ -4735,17 +4736,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:4739: checking for $ac_hdr" >&5
echo "configure:4740: 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 4744 "configure"
#line 4745 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4750: \"$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*
......@@ -4775,17 +4776,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:4779: checking for $ac_hdr" >&5
echo "configure:4780: 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 4784 "configure"
#line 4785 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4790: \"$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*
......@@ -4815,17 +4816,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:4819: checking for $ac_hdr" >&5
echo "configure:4820: 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 4824 "configure"
#line 4825 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4830: \"$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*
......@@ -4855,17 +4856,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:4859: checking for $ac_hdr" >&5
echo "configure:4860: 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 4864 "configure"
#line 4865 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4870: \"$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*
......@@ -4895,17 +4896,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:4899: checking for $ac_hdr" >&5
echo "configure:4900: 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 4904 "configure"
#line 4905 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4910: \"$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*
......@@ -4935,17 +4936,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:4939: checking for $ac_hdr" >&5
echo "configure:4940: 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 4944 "configure"
#line 4945 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4950: \"$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*
......@@ -4976,17 +4977,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:4980: checking for $ac_hdr" >&5
echo "configure:4981: 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 4985 "configure"
#line 4986 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4991: \"$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*
......@@ -5014,20 +5015,20 @@ done
echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
echo "configure:5018: checking for ntohl in sys/param.h" >&5
echo "configure:5019: 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 5024 "configure"
#line 5025 "configure"
#include "confdefs.h"
#include <sys/param.h>
int main() {
void foo() { int meuh; ntohl(meuh); }
; return 0; }
EOF
if { (eval echo configure:5031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_ntohl_sys_param_h=yes
else
......@@ -5048,20 +5049,20 @@ EOF
fi
echo $ac_n "checking if \$CC accepts -finline-limit""... $ac_c" 1>&6
echo "configure:5052: checking if \$CC accepts -finline-limit" >&5
echo "configure:5053: 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 5058 "configure"
#line 5059 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:5065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline_limit=yes
else
......@@ -5079,20 +5080,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:5083: checking if \$CC accepts -bundle -undefined error" >&5
echo "configure:5084: 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 5089 "configure"
#line 5090 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:5096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_ld_darwin=yes
else
......@@ -5110,20 +5111,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:5114: checking if \$CC accepts -shared" >&5
echo "configure:5115: 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 5120 "configure"
#line 5121 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:5127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_ld_plugins=yes
else
......@@ -5142,7 +5143,7 @@ fi
if test x"${SOFLAGS}" = x; then
echo $ac_n "checking for soname setting""... $ac_c" 1>&6
echo "configure:5146: checking for soname setting" >&5
echo "configure:5147: 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
......@@ -5151,14 +5152,14 @@ else
try_SOFLAGS="-Wl,-soname -Wl,"
LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
cat > conftest.$ac_ext <<EOF
#line 5155 "configure"
#line 5156 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:5162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:5163: \"$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
......@@ -5170,14 +5171,14 @@ else
try_SOFLAGS="-Wl,-h -Wl,"
LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
cat > conftest.$ac_ext <<EOF
#line 5174 "configure"
#line 5175 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:5181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:5182: \"$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
......@@ -5206,7 +5207,7 @@ have problems using libdvdcss.
fi
echo $ac_n "checking __attribute__ ((aligned ())) support""... $ac_c" 1>&6
echo "configure:5210: checking __attribute__ ((aligned ())) support" >&5
echo "configure:5211: 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
......@@ -5214,14 +5215,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 5218 "configure"
#line 5219 "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:5225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5226: \"$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
......@@ -5244,19 +5245,19 @@ CFLAGS="${save_CFLAGS}"
LDFLAGS="${save_LDFLAGS}"
echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
echo "configure:5248: checking for boolean_t in sys/types.h" >&5
echo "configure:5249: 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 5253 "configure"
#line 5254 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
boolean_t foo;
; return 0; }
EOF
if { (eval echo configure:5260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_boolean_t_sys_types_h=yes
else
......@@ -5277,19 +5278,19 @@ EOF
fi
echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
echo "configure:5281: checking for boolean_t in pthread.h" >&5
echo "configure:5282: 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 5286 "configure"
#line 5287 "configure"
#include "confdefs.h"
#include <pthread.h>
int main() {
boolean_t foo;
; return 0; }
EOF
if { (eval echo configure:5293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_boolean_t_pthread_h=yes
else
......@@ -5310,19 +5311,19 @@ EOF
fi
echo $ac_n "checking for boolean_t in cthreads.h""... $ac_c" 1>&6
echo "configure:5314: checking for boolean_t in cthreads.h" >&5
echo "configure:5315: 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 5319 "configure"
#line 5320 "configure"
#include "confdefs.h"
#include <cthreads.h>
int main() {
boolean_t foo;
; return 0; }
EOF
if { (eval echo configure:5326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_boolean_t_cthreads_h=yes
else
......@@ -5343,12 +5344,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:5347: checking for working const" >&5
echo "configure:5348: 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 5352 "configure"
#line 5353 "configure"
#include "confdefs.h"
int main() {
......@@ -5397,7 +5398,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
if { (eval echo configure:5401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
......@@ -5418,12 +5419,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:5422: checking for size_t" >&5
echo "configure:5423: 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 5427 "configure"
#line 5428 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
......@@ -5451,12 +5452,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:5455: checking whether time.h and sys/time.h may both be included" >&5
echo "configure:5456: 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 5460 "configure"
#line 5461 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
......@@ -5465,7 +5466,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
if { (eval echo configure:5469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
......@@ -5490,7 +5491,7 @@ fi
ARCH=${target_cpu}
BUILTINS="${BUILTINS} mpeg_es mpeg_ps mpeg_ts memcpy idct idctclassic motion imdct downmix mpeg_adec lpcm_adec ac3_adec mpeg_vdec"
PLUGINS="${PLUGINS} ac3_spdif spudec chroma_yv12_rgb8 filter_bob filter_invert filter_wall filter_bob422"
PLUGINS="${PLUGINS} ac3_spdif spudec chroma_yv12_rgb8 filter_bob filter_invert filter_wall filter_transform filter_distort"
MMX_MODULES="memcpymmx idctmmx motionmmx"
MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
......@@ -5499,19 +5500,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:5503: checking if \$CC groks MMX inline assembly" >&5
echo "configure:5504: 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 5508 "configure"
#line 5509 "configure"
#include "confdefs.h"
int main() {
void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));
; return 0; }
EOF
if { (eval echo configure:5515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mmx_inline=yes
else
......@@ -5529,19 +5530,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:5533: checking if \$CC groks MMX EXT inline assembly" >&5
echo "configure:5534: 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 5538 "configure"
#line 5539 "configure"
#include "confdefs.h"
int main() {
void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));
; return 0; }
EOF
if { (eval echo configure:5545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mmxext_inline=yes
else
......@@ -5559,19 +5560,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:5563: checking if \$CC groks 3D Now! inline assembly" >&5
echo "configure:5564: 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 5568 "configure"
#line 5569 "configure"
#include "confdefs.h"
int main() {
void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));
; return 0; }
EOF
if { (eval echo configure:5575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_3dnow_inline=yes
else
......@@ -5593,19 +5594,19 @@ EOF
fi
echo $ac_n "checking if \$CC groks SSE inline assembly""... $ac_c" 1>&6
echo "configure:5597: checking if \$CC groks SSE inline assembly" >&5
echo "configure:5598: 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 5602 "configure"
#line 5603 "configure"
#include "confdefs.h"
int main() {
void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));
; return 0; }
EOF
if { (eval echo configure:5609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sse_inline=yes
else
......@@ -5627,19 +5628,19 @@ EOF
fi
echo $ac_n "checking if \$CC groks Altivec inline assembly""... $ac_c" 1>&6
echo "configure:5631: checking if \$CC groks Altivec inline assembly" >&5
echo "configure:5632: 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 5636 "configure"
#line 5637 "configure"
#include "confdefs.h"
int main() {
asm volatile("vperm 0,1,2,3");
; return 0; }
EOF
if { (eval echo configure:5643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_altivec_inline=yes
else
......@@ -5649,14 +5650,14 @@ else
save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -Wa,-m7400"
cat > conftest.$ac_ext <<EOF
#line 5653 "configure"
#line 5654 "configure"
#include "confdefs.h"
int main() {
asm volatile("vperm 0,1,2,3");
; return 0; }
EOF
if { (eval echo configure:5660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_altivec_inline="-Wa,-m7400"
else
......@@ -5685,7 +5686,7 @@ EOF
fi
echo $ac_n "checking if \$CC groks Altivec C extensions""... $ac_c" 1>&6
echo "configure:5689: checking if \$CC groks Altivec C extensions" >&5
echo "configure:5690: 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
......@@ -5693,14 +5694,14 @@ else
CFLAGS="$CFLAGS -faltivec"
# Darwin test
cat > conftest.$ac_ext <<EOF
#line 5697 "configure"
#line 5698 "configure"
#include "confdefs.h"
int main() {
vec_mtvscr((vector unsigned int)(0));
; return 0; }
EOF
if { (eval echo configure:5704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_altivec=-faltivec
else
......@@ -5711,14 +5712,14 @@ else
# Linux/PPC test
CFLAGS="$save_CFLAGS $CFLAGS_ALTIVEC -fvec"
cat > conftest.$ac_ext <<EOF
#line 5715 "configure"
#line 5716 "configure"
#include "confdefs.h"
int main() {
vec_mtvscr((vector unsigned int)(0));
; return 0; }
EOF
if { (eval echo configure:5722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_altivec="-fvec"
else
......@@ -5746,21 +5747,21 @@ EOF
fi
echo $ac_n "checking if linker needs -framework vecLib""... $ac_c" 1>&6
echo "configure:5750: checking if linker needs -framework vecLib" >&5
echo "configure:5751: 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 5757 "configure"
#line 5758 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:5764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:5765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_ld_altivec=yes
else
......@@ -5782,7 +5783,7 @@ fi
case ${target_os} in
linux*)
SYS=linux
;;
;;
bsdi*)
SYS=bsdi
;;
......@@ -5806,7 +5807,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:5810: checking for $ac_word" >&5
echo "configure:5811: 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
......@@ -5838,7 +5839,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:5842: checking for $ac_word" >&5
echo "configure:5843: 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
......@@ -5881,17 +5882,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:5885: checking for $ac_hdr" >&5
echo "configure:5886: 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 5890 "configure"
#line 5891 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:5896: \"$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*
......@@ -5924,17 +5925,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:5928: checking for $ac_hdr" >&5
echo "configure:5929: 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 5933 "configure"
#line 5934 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:5939: \"$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*
......@@ -5960,17 +5961,17 @@ EOF
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5964: checking for $ac_hdr" >&5
echo "configure:5965: 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 5969 "configure"
#line 5970 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:5975: \"$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*
......@@ -6000,7 +6001,7 @@ done
LINUX_DVD_STRUCT=0
OPENBSD_DVD_STRUCT=0
cat > conftest.$ac_ext <<EOF
#line 6004 "configure"
#line 6005 "configure"
#include "confdefs.h"
#include <sys/cdio.h>
EOF
......@@ -6013,7 +6014,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
EOF
cat > conftest.$ac_ext <<EOF
#line 6017 "configure"
#line 6018 "configure"
#include "confdefs.h"
#include <sys/cdio.h>
EOF
......@@ -6033,7 +6034,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
#line 6037 "configure"
#line 6038 "configure"
#include "confdefs.h"
#include <sys/dvdio.h>
EOF
......@@ -6046,7 +6047,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
EOF
cat > conftest.$ac_ext <<EOF
#line 6050 "configure"
#line 6051 "configure"
#include "confdefs.h"
#include <sys/dvdio.h>
EOF
......@@ -6066,7 +6067,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
#line 6070 "configure"
#line 6071 "configure"
#include "confdefs.h"
#include <linux/cdrom.h>
EOF
......@@ -6085,7 +6086,7 @@ rm -f conftest*
NEED_BSDI_LIBDVD=0
cat > conftest.$ac_ext <<EOF
#line 6089 "configure"
#line 6090 "configure"
#include "confdefs.h"
#include <dvd.h>
EOF
......@@ -6107,17 +6108,17 @@ else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6111: checking for $ac_hdr" >&5
echo "configure:6112: 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 6116 "configure"
#line 6117 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6122: \"$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*
......@@ -6157,17 +6158,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:6161: checking for sys/scsi/scsi_types.h" >&5
echo "configure:6162: 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 6166 "configure"
#line 6167 "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:6171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6172: \"$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*
......@@ -6186,17 +6187,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:6190: checking for sys/scsi/impl/uscsi.h" >&5
echo "configure:6191: 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 6195 "configure"
#line 6196 "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:6200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6201: \"$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*
......@@ -6229,17 +6230,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:6233: checking for sys/scsi.h" >&5
echo "configure:6234: 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 6238 "configure"
#line 6239 "configure"
#include "confdefs.h"
#include <sys/scsi.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6244: \"$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*
......@@ -6257,7 +6258,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
cat > conftest.$ac_ext <<EOF
#line 6261 "configure"
#line 6262 "configure"
#include "confdefs.h"
#include <sys/scsi.h>
EOF
......@@ -6403,7 +6404,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:6407: checking for pth_init in -lpth" >&5
echo "configure:6408: 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
......@@ -6411,7 +6412,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpth $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6415 "configure"
#line 6416 "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
......@@ -6422,7 +6423,7 @@ int main() {
pth_init()
; return 0; }
EOF
if { (eval echo configure:6426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:6427: \"$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
......@@ -6450,7 +6451,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
#line 6454 "configure"
#line 6455 "configure"
#include "confdefs.h"
#include <pth.h>
EOF
......@@ -6571,7 +6572,7 @@ fi
if test x$enable_vcd != xno
then
cat > conftest.$ac_ext <<EOF
#line 6575 "configure"
#line 6576 "configure"
#include "confdefs.h"
#include <linux/cdrom.h>
EOF
......@@ -6645,17 +6646,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:6649: checking for $ac_hdr" >&5
echo "configure:6650: 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 6654 "configure"
#line 6655 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6660: \"$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*
......@@ -6685,7 +6686,7 @@ fi
done
echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
echo "configure:6689: checking for mad_bit_init in -lmad" >&5
echo "configure:6690: 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
......@@ -6693,7 +6694,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lmad $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6697 "configure"
#line 6698 "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
......@@ -6704,7 +6705,7 @@ int main() {
mad_bit_init()
; return 0; }
EOF
if { (eval echo configure:6708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:6709: \"$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
......@@ -6774,7 +6775,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:6778: checking for $ac_word" >&5
echo "configure:6779: 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
......@@ -6825,7 +6826,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:6829: checking for $ac_word" >&5
echo "configure:6830: 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
......@@ -6882,17 +6883,17 @@ else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6886: checking for $ac_hdr" >&5
echo "configure:6887: 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 6891 "configure"
#line 6892 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6897: \"$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*
......@@ -6936,17 +6937,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6940: checking for $ac_hdr" >&5
echo "configure:6941: 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 6945 "configure"
#line 6946 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6951: \"$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*
......@@ -7024,7 +7025,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:7028: checking for $ac_word" >&5
echo "configure:7029: 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
......@@ -7064,7 +7065,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:7068: checking for $ac_word" >&5
echo "configure:7069: 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
......@@ -7105,7 +7106,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:7109: checking for $ac_word" >&5
echo "configure:7110: 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
......@@ -7151,17 +7152,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7155: checking for $ac_hdr" >&5
echo "configure:7156: 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 7160 "configure"
#line 7161 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7166: \"$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*
......@@ -7231,17 +7232,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7235: checking for $ac_hdr" >&5
echo "configure:7236: 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 7240 "configure"
#line 7241 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7246: \"$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*
......@@ -7270,7 +7271,7 @@ done
else
echo $ac_n "checking for directX headers in ${withval}""... $ac_c" 1>&6
echo "configure:7274: checking for directX headers in ${withval}" >&5
echo "configure:7275: checking for directX headers in ${withval}" >&5
if test -f ${withval}/include/directx.h
then
PLUGINS="${PLUGINS} directx"
......@@ -7353,7 +7354,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:7357: checking for $ac_word" >&5
echo "configure:7358: 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
......@@ -7398,17 +7399,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7402: checking for $ac_hdr" >&5
echo "configure:7403: 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 7407 "configure"
#line 7408 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7413: \"$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*
......@@ -7468,7 +7469,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:7472: checking for $ac_word" >&5
echo "configure:7473: 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
......@@ -7514,17 +7515,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7518: checking for $ac_hdr" >&5
echo "configure:7519: 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 7523 "configure"
#line 7524 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7529: \"$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*
......@@ -7580,17 +7581,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:7584: checking for $ac_hdr" >&5
echo "configure:7585: 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 7589 "configure"
#line 7590 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7595: \"$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*
......@@ -7643,17 +7644,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:7647: checking for $ac_hdr" >&5
echo "configure:7648: 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 7652 "configure"
#line 7653 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7658: \"$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*
......@@ -7693,17 +7694,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:7697: checking for alsa/asoundlib.h" >&5
echo "configure:7698: 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 7702 "configure"
#line 7703 "configure"
#include "confdefs.h"
#include <alsa/asoundlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7708: \"$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*
......@@ -7720,7 +7721,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:7724: checking for main in -lasound" >&5
echo "configure:7725: 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
......@@ -7728,14 +7729,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lasound $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7732 "configure"
#line 7733 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:7739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:7740: \"$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
......@@ -7868,6 +7869,7 @@ fi
trap '' 1 2 15
......@@ -8092,6 +8094,7 @@ s%@LIB_DVD_PLUGIN@%$LIB_DVD_PLUGIN%g
s%@LIB_DVDREAD@%$LIB_DVDREAD%g
s%@LIB_DVDREAD_PLUGIN@%$LIB_DVDREAD_PLUGIN%g
s%@LIB_ESD@%$LIB_ESD%g
s%@LIB_FILTER_DISTORT@%$LIB_FILTER_DISTORT%g
s%@LIB_GGI@%$LIB_GGI%g
s%@LIB_GLIDE@%$LIB_GLIDE%g
s%@LIB_GNOME@%$LIB_GNOME%g
......
......@@ -144,7 +144,9 @@ AC_CHECK_FUNC(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
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,cos,
LIB_IMDCT="${LIB_IMDCT} -lm"
LIB_FILTER_DISTORT="${LIB_FILTER_DISTORT} -lm")
AC_CHECK_LIB(m,pow,
LIB_IMDCT="${LIB_IMDCT} -lm"
LIB_IMDCT3DN="${LIB_IMDCT3DN} -lm"
......@@ -310,7 +312,7 @@ dnl
dnl default modules
dnl
BUILTINS="${BUILTINS} mpeg_es mpeg_ps mpeg_ts memcpy idct idctclassic motion imdct downmix mpeg_adec lpcm_adec ac3_adec mpeg_vdec"
PLUGINS="${PLUGINS} ac3_spdif spudec chroma_yv12_rgb8 filter_bob filter_invert filter_wall filter_bob422"
PLUGINS="${PLUGINS} ac3_spdif spudec chroma_yv12_rgb8 filter_bob filter_invert filter_wall filter_transform filter_distort"
dnl
dnl Accelerated modules
......@@ -411,7 +413,7 @@ dnl
case ${target_os} in
linux*)
SYS=linux
;;
;;
bsdi*)
SYS=bsdi
;;
......@@ -1269,6 +1271,7 @@ AC_SUBST(LIB_DVD_PLUGIN)
AC_SUBST(LIB_DVDREAD)
AC_SUBST(LIB_DVDREAD_PLUGIN)
AC_SUBST(LIB_ESD)
AC_SUBST(LIB_FILTER_DISTORT)
AC_SUBST(LIB_GGI)
AC_SUBST(LIB_GLIDE)
AC_SUBST(LIB_GNOME)
......
vlc (0.2.92-1) unstable; urgency=low
vlc (0.2.92-UNSTABLE) unstable; urgency=low
* New upstream release.
* Development branch.
-- Christophe Massiot <massiot@via.ecp.fr> Fri, 7 Dec 2001 20:18:56 +0100
......
......@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: common.h,v 1.59 2001/12/16 16:18:36 sam Exp $
* $Id: common.h,v 1.60 2001/12/19 03:50:22 sam Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -547,6 +547,7 @@ typedef struct module_symbols_s
struct picture_s * ( * vout_CreatePicture )
( struct vout_thread_s *,
boolean_t, boolean_t, boolean_t );
void ( * vout_AllocatePicture )( struct picture_s *, int, int, int );
void ( * vout_DisplayPicture ) ( struct vout_thread_s *,
struct picture_s * );
void ( * vout_DestroyPicture ) ( struct vout_thread_s *,
......
......@@ -92,6 +92,7 @@
(p_symbols)->vout_DestroySubPicture = vout_DestroySubPicture; \
(p_symbols)->vout_DisplaySubPicture = vout_DisplaySubPicture; \
(p_symbols)->vout_CreatePicture = vout_CreatePicture; \
(p_symbols)->vout_AllocatePicture = vout_AllocatePicture; \
(p_symbols)->vout_DisplayPicture = vout_DisplayPicture; \
(p_symbols)->vout_DestroyPicture = vout_DestroyPicture; \
(p_symbols)->vout_DatePicture = vout_DatePicture; \
......@@ -203,6 +204,7 @@
# define vout_DestroySubPicture p_symbols->vout_DestroySubPicture
# define vout_DisplaySubPicture p_symbols->vout_DisplaySubPicture
# define vout_CreatePicture p_symbols->vout_CreatePicture
# define vout_AllocatePicture p_symbols->vout_AllocatePicture
# define vout_DisplayPicture p_symbols->vout_DisplayPicture
# define vout_DestroyPicture p_symbols->vout_DestroyPicture
# define vout_DatePicture p_symbols->vout_DatePicture
......
......@@ -5,7 +5,7 @@
* thread, and destroy a previously oppenned video output thread.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video_output.h,v 1.66 2001/12/16 16:18:36 sam Exp $
* $Id: video_output.h,v 1.67 2001/12/19 03:50:22 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -195,6 +195,7 @@ void vout_FreeFifo ( vout_fifo_t * );
picture_t * vout_CreatePicture ( vout_thread_t *,
boolean_t, boolean_t, boolean_t );
void vout_AllocatePicture( picture_t *, int, int, int );
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 );
......
......@@ -2,7 +2,7 @@
* aout_alsa.c : Alsa functions library
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: aout_alsa.c,v 1.22 2001/12/07 18:33:07 sam Exp $
* $Id: aout_alsa.c,v 1.23 2001/12/19 03:50:22 sam Exp $
*
* Authors: Henri Fallon <henri@videolan.org> - Original Author
* Jeffrey Baker <jwbaker@acm.org> - Port to ALSA 1.0 API
......@@ -86,11 +86,9 @@ static int aout_Probe( probedata_t *p_data )
int i_open_return, i_close_return;
aout_sys_t local_sys;
printf("aout_probe\n");
/* Open device */
i_open_return = snd_pcm_open( &(local_sys.p_alsa_handle), "default",
SND_PCM_STREAM_PLAYBACK, 0 );
printf("grmbl\n");
if( i_open_return )
{
intf_WarnMsg( 2, "aout info: could not probe ALSA device (%s)",
......
......@@ -8,17 +8,19 @@
#
PLUGIN_BOB = bob.o
PLUGIN_BOB422 = bob422.o
PLUGIN_TRANSFORM = transform.o
PLUGIN_INVERT = invert.o
PLUGIN_DISTORT = distort.o
PLUGIN_WALL = wall.o
BUILTIN_BOB = $(PLUGIN_BOB:%.o=BUILTIN_%.o)
BUILTIN_BOB422 = $(PLUGIN_BOB422:%.o=BUILTIN_%.o)
BUILTIN_TRANSFORM = $(PLUGIN_TRANSFORM:%.o=BUILTIN_%.o)
BUILTIN_INVERT = $(PLUGIN_INVERT:%.o=BUILTIN_%.o)
BUILTIN_DISTORT = $(PLUGIN_DISTORT:%.o=BUILTIN_%.o)
BUILTIN_WALL = $(PLUGIN_WALL:%.o=BUILTIN_%.o)
PLUGIN_C = $(PLUGIN_BOB) $(PLUGIN_BOB422) $(PLUGIN_INVERT) $(PLUGIN_WALL)
BUILTIN_C = $(BUILTIN_BOB) $(BUILTIN_BOB422) $(BUILTIN_INVERT) $(BUILTIN_WALL)
PLUGIN_C = $(PLUGIN_BOB) $(PLUGIN_TRANSFORM) $(PLUGIN_INVERT) $(PLUGIN_DISTORT) $(PLUGIN_WALL)
BUILTIN_C = $(BUILTIN_BOB) $(BUILTIN_TRANSFORM) $(BUILTIN_INVERT) $(BUILTIN_DISTORT) $(BUILTIN_WALL)
ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
#
......@@ -38,10 +40,10 @@ include ../../Makefile.modules
ar r $@ $^
$(RANLIB) $@
../filter_bob422.so: $(PLUGIN_BOB422)
../filter_transform.so: $(PLUGIN_TRANSFORM)
$(CC) -o $@ $^ $(PLCFLAGS)
../filter_bob422.a: $(BUILTIN_BOB422)
../filter_transform.a: $(BUILTIN_TRANSFORM)
ar r $@ $^
$(RANLIB) $@
......@@ -52,6 +54,13 @@ include ../../Makefile.modules
ar r $@ $^
$(RANLIB) $@
../filter_distort.so: $(PLUGIN_DISTORT)
$(CC) -o $@ $^ $(PLCFLAGS) $(LIB_FILTER_DISTORT)
../filter_distort.a: $(BUILTIN_DISTORT)
ar r $@ $^
$(RANLIB) $@
../filter_wall.so: $(PLUGIN_WALL)
$(CC) -o $@ $^ $(PLCFLAGS)
......
......@@ -2,7 +2,7 @@
* bob.c : BOB deinterlacer plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: bob.c,v 1.2 2001/12/16 18:00:18 sam Exp $
* $Id: bob.c,v 1.3 2001/12/19 03:50:22 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -42,11 +42,11 @@
#include "video.h"
#include "video_output.h"
#include "filter_common.h"
#include "modules.h"
#include "modules_export.h"
#define BOB_MAX_DIRECTBUFFERS 8
/*****************************************************************************
* Capabilities defined in the other files.
*****************************************************************************/
......@@ -96,8 +96,6 @@ 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 BobNewPicture( 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.
......@@ -162,6 +160,7 @@ static int vout_Init( vout_thread_t *p_vout )
switch( p_vout->render.i_chroma )
{
case YUV_420_PICTURE:
case YUV_422_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;
......@@ -178,11 +177,26 @@ static int vout_Init( vout_thread_t *p_vout )
main_PutPszVariable( VOUT_FILTER_VAR, "" );
intf_WarnMsg( 1, "filter: spawning the real video output" );
p_vout->p_sys->p_vout =
vout_CreateThread( NULL,
switch( p_vout->render.i_chroma )
{
case YUV_420_PICTURE:
p_vout->p_sys->p_vout =
vout_CreateThread( NULL,
p_vout->output.i_width, p_vout->output.i_height / 2,
p_vout->output.i_chroma, p_vout->output.i_aspect );
break;
case YUV_422_PICTURE:
p_vout->p_sys->p_vout =
vout_CreateThread( NULL,
p_vout->output.i_width, p_vout->output.i_height,
YUV_420_PICTURE, p_vout->output.i_aspect );
break;
default:
break;
}
/* Everything failed */
if( p_vout->p_sys->p_vout == NULL )
......@@ -194,39 +208,7 @@ static int vout_Init( vout_thread_t *p_vout )
main_PutPszVariable( VOUT_FILTER_VAR, psz_filter );
/* Try to initialize BOB_MAX_DIRECTBUFFERS direct buffers */
while( I_OUTPUTPICTURES < BOB_MAX_DIRECTBUFFERS )
{
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( BobNewPicture( p_vout, p_pic ) )
{
break;
}
p_pic->i_status = DESTROYED_PICTURE;
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;
PP_OUTPUTPICTURE[ I_OUTPUTPICTURES ] = p_pic;
I_OUTPUTPICTURES++;
}
ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES );
return( 0 );
}
......@@ -275,7 +257,7 @@ static int vout_Manage( vout_thread_t *p_vout )
* This function send the currently rendered image to BOB image, waits until
* it is displayed and switch the two rendering buffers, preparing next frame.
*****************************************************************************/
static void vout_Display( vout_thread_t *p_vout, picture_t *p_inpic )
static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
{
picture_t *p_outpic;
int i_index, i_field;
......@@ -299,23 +281,62 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_inpic )
mdate() + (mtime_t)(50000 + i_field * 20000) );
/* Copy image and skip lines */
for( i_index = 0 ; i_index < p_inpic->i_planes ; i_index++ )
for( i_index = 0 ; i_index < p_pic->i_planes ; i_index++ )
{
pixel_data_t *p_in, *p_end, *p_out;
pixel_data_t *p_in, *p_out_end, *p_out;
int i_increment;
p_in = p_inpic->planes[ i_index ].p_data
+ i_field * p_inpic->planes[ i_index ].i_line_bytes;
p_in = p_pic->planes[ i_index ].p_data
+ i_field * p_pic->planes[ i_index ].i_line_bytes;
p_out = p_outpic->planes[ i_index ].p_data;
p_end = p_out + p_outpic->planes[ i_index ].i_bytes;
p_out_end = p_out + p_outpic->planes[ i_index ].i_bytes;
for( ; p_out < p_end ; )
switch( p_vout->render.i_chroma )
{
p_main->fast_memcpy( p_out, p_in,
p_inpic->planes[ i_index ].i_line_bytes );
p_out += p_inpic->planes[ i_index ].i_line_bytes;
p_in += 2 * p_inpic->planes[ i_index ].i_line_bytes;
case YUV_420_PICTURE:
for( ; p_out < p_out_end ; )
{
p_main->fast_memcpy( p_out, p_in,
p_pic->planes[ i_index ].i_line_bytes );
p_out += p_pic->planes[ i_index ].i_line_bytes;
p_in += 2 * p_pic->planes[ i_index ].i_line_bytes;
}
break;
case YUV_422_PICTURE:
i_increment = 2 * p_pic->planes[ i_index ].i_line_bytes;
if( i_index == Y_PLANE )
{
for( ; p_out < p_out_end ; )
{
p_main->fast_memcpy( p_out, p_in,
p_pic->planes[ i_index ].i_line_bytes );
p_out += p_pic->planes[ i_index ].i_line_bytes;
p_main->fast_memcpy( p_out, p_in,
p_pic->planes[ i_index ].i_line_bytes );
p_out += p_pic->planes[ i_index ].i_line_bytes;
p_in += i_increment;
}
}
else
{
for( ; p_out < p_out_end ; )
{
p_main->fast_memcpy( p_out, p_in,
p_pic->planes[ i_index ].i_line_bytes );
p_out += p_pic->planes[ i_index ].i_line_bytes;
p_in += i_increment;
}
}
break;
default:
break;
}
}
......@@ -323,65 +344,3 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_inpic )
}
}
/*****************************************************************************
* BobNewPicture: allocate a picture
*****************************************************************************
* Returns 0 on success, -1 otherwise
*****************************************************************************/
static int BobNewPicture( 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_height * ( i_width / 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;
p_pic->planes[ Y_PLANE ].i_line_bytes = i_width * sizeof(pixel_data_t);
/* 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 / 2;
p_pic->planes[ U_PLANE ].i_line_bytes = p_pic->i_chroma_width
* sizeof(pixel_data_t);
/* 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 / 2;
p_pic->planes[ V_PLANE ].i_line_bytes = p_pic->i_chroma_width
* sizeof(pixel_data_t);
/* We allocated 3 planes */
p_pic->i_planes = 3;
return( 0 );
break;
/* Unknown chroma, do nothing */
default:
return( 0 );
break;
}
}
/*****************************************************************************
* bob422.c : 422 to 420 video plugin for vlc
* distort.c : Misc video effects plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: bob422.c,v 1.1 2001/12/17 05:33:56 sam Exp $
* $Id: distort.c,v 1.1 2001/12/19 03:50:22 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -21,7 +21,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#define MODULE_NAME filter_bob422
#define MODULE_NAME filter_distort
#include "modules_inner.h"
/*****************************************************************************
......@@ -33,6 +33,8 @@
#include <stdlib.h> /* malloc(), free() */
#include <string.h>
#include <math.h> /* sin(), cos() */
#include "common.h" /* boolean_t, byte_t */
#include "intf_msg.h"
#include "threads.h"
......@@ -42,10 +44,12 @@
#include "video.h"
#include "video_output.h"
#include "filter_common.h"
#include "modules.h"
#include "modules_export.h"
#define BOB422_MAX_DIRECTBUFFERS 8
#define DISTORT_MODE_WAVE 1
/*****************************************************************************
* Capabilities defined in the other files.
......@@ -56,14 +60,14 @@ static void vout_getfunctions( function_list_t * p_function_list );
* Build configuration tree.
*****************************************************************************/
MODULE_CONFIG_START
ADD_WINDOW( "Configuration for bob422 module" )
ADD_WINDOW( "Configuration for distort module" )
ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
MODULE_CONFIG_STOP
MODULE_INIT_START
p_module->i_capabilities = MODULE_CAPABILITY_NULL
| MODULE_CAPABILITY_VOUT;
p_module->psz_longname = "4:2:2 BOB deinterlacing module";
p_module->psz_longname = "miscellaneous video effects module";
MODULE_INIT_STOP
MODULE_ACTIVATE_START
......@@ -74,15 +78,20 @@ MODULE_DEACTIVATE_START
MODULE_DEACTIVATE_STOP
/*****************************************************************************
* vout_sys_t: Bob422 video output method descriptor
* vout_sys_t: Distort video output method descriptor
*****************************************************************************
* This structure is part of the video output thread descriptor.
* It describes the Bob422 specific properties of an output thread.
* It describes the Distort specific properties of an output thread.
*****************************************************************************/
typedef struct vout_sys_s
{
int i_mode;
struct vout_thread_s *p_vout;
/* For the wave mode */
double f_angle;
mtime_t last_date;
} vout_sys_t;
/*****************************************************************************
......@@ -96,8 +105,6 @@ 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 Bob422NewPicture( 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.
......@@ -119,7 +126,7 @@ static void vout_getfunctions( function_list_t * p_function_list )
*****************************************************************************/
static int vout_Probe( probedata_t *p_data )
{
if( TestMethod( VOUT_FILTER_VAR, "bob422" ) )
if( TestMethod( VOUT_FILTER_VAR, "distort" ) )
{
return( 999 );
}
......@@ -129,12 +136,14 @@ static int vout_Probe( probedata_t *p_data )
}
/*****************************************************************************
* vout_Create: allocates Bob422 video thread output method
* vout_Create: allocates Distort video thread output method
*****************************************************************************
* This function allocates and initializes a Bob422 vout method.
* This function allocates and initializes a Distort vout method.
*****************************************************************************/
static int vout_Create( vout_thread_t *p_vout )
{
char *psz_method;
/* Allocate structure */
p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
if( p_vout->p_sys == NULL )
......@@ -143,11 +152,30 @@ static int vout_Create( vout_thread_t *p_vout )
return( 1 );
}
/* Look what method was requested */
psz_method = main_GetPszVariable( VOUT_FILTER_VAR, "" );
while( *psz_method && *psz_method != ':' )
{
psz_method++;
}
if( !strcmp( psz_method, ":wave" ) )
{
p_vout->p_sys->i_mode = DISTORT_MODE_WAVE;
}
else
{
intf_ErrMsg( "filter error: no valid distort mode provided, "
"using distort:wave" );
p_vout->p_sys->i_mode = DISTORT_MODE_WAVE;
}
return( 0 );
}
/*****************************************************************************
* vout_Init: initialize Bob422 video thread output method
* vout_Init: initialize Distort video thread output method
*****************************************************************************/
static int vout_Init( vout_thread_t *p_vout )
{
......@@ -157,6 +185,21 @@ static int vout_Init( vout_thread_t *p_vout )
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 ); /* unknown chroma */
break;
}
/* Try to open the real video output */
psz_filter = main_GetPszVariable( VOUT_FILTER_VAR, "" );
main_PutPszVariable( VOUT_FILTER_VAR, "" );
......@@ -165,8 +208,8 @@ static int vout_Init( vout_thread_t *p_vout )
p_vout->p_sys->p_vout =
vout_CreateThread( NULL,
p_vout->render.i_width, p_vout->render.i_height / 2,
YUV_420_PICTURE, p_vout->render.i_aspect );
p_vout->render.i_width, p_vout->render.i_height,
p_vout->render.i_chroma, p_vout->render.i_aspect );
/* Everything failed */
if( p_vout->p_sys->p_vout == NULL )
......@@ -178,60 +221,16 @@ static int vout_Init( vout_thread_t *p_vout )
main_PutPszVariable( VOUT_FILTER_VAR, psz_filter );
/* Initialize the output structure */
switch( p_vout->render.i_chroma )
{
case YUV_422_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;
ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES );
default:
p_vout->output.i_chroma = EMPTY_PICTURE; /* unknown chroma */
break;
}
/* Try to initialize BOB422_MAX_DIRECTBUFFERS direct buffers */
while( I_OUTPUTPICTURES < BOB422_MAX_DIRECTBUFFERS )
{
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( Bob422NewPicture( p_vout, p_pic ) )
{
break;
}
p_pic->i_status = DESTROYED_PICTURE;
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;
PP_OUTPUTPICTURE[ I_OUTPUTPICTURES ] = p_pic;
I_OUTPUTPICTURES++;
}
p_vout->p_sys->f_angle = 0.0;
p_vout->p_sys->last_date = 0;
return( 0 );
}
/*****************************************************************************
* vout_End: terminate Bob422 video thread output method
* vout_End: terminate Distort video thread output method
*****************************************************************************/
static void vout_End( vout_thread_t *p_vout )
{
......@@ -246,9 +245,9 @@ static void vout_End( vout_thread_t *p_vout )
}
/*****************************************************************************
* vout_Destroy: destroy Bob422 video thread output method
* vout_Destroy: destroy Distort video thread output method
*****************************************************************************
* Terminate an output method created by Bob422CreateOutputMethod
* Terminate an output method created by DistortCreateOutputMethod
*****************************************************************************/
static void vout_Destroy( vout_thread_t *p_vout )
{
......@@ -258,7 +257,7 @@ static void vout_Destroy( vout_thread_t *p_vout )
}
/*****************************************************************************
* vout_Manage: handle Bob422 events
* vout_Manage: handle Distort events
*****************************************************************************
* This function should be called regularly by video output thread. It manages
* console events. It returns a non null value on error.
......@@ -271,116 +270,92 @@ static int vout_Manage( vout_thread_t *p_vout )
/*****************************************************************************
* vout_Display: displays previously rendered output
*****************************************************************************
* This function send the currently rendered image to Bob422 image, waits
* This function send the currently rendered image to Distort image, waits
* until it is displayed and switch the two rendering buffers, preparing next
* frame.
*****************************************************************************/
static void vout_Display( vout_thread_t *p_vout, picture_t *p_inpic )
static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
{
picture_t *p_outpic;
int i_index, i_field;
for( i_field = 0 ; i_field < 2 ; i_field++ )
int i_index;
double f_angle;
mtime_t new_date = mdate();
/* This is a new frame. Get a structure from the video_output. */
while( ( p_outpic = vout_CreatePicture( p_vout->p_sys->p_vout, 0, 0, 0 ) )
== NULL )
{
/* Get a structure from the video_output. */
while( ( p_outpic = vout_CreatePicture( p_vout->p_sys->p_vout,
0, 0, 0 ) )
== NULL )
if( p_vout->b_die || p_vout->b_error )
{
if( p_vout->b_die || p_vout->b_error )
{
return;
}
msleep( VOUT_OUTMEM_SLEEP );
}
/* XXX: completely arbitrary values ! */
vout_DatePicture( p_vout->p_sys->p_vout, p_outpic,
mdate() + (mtime_t)(60000 + i_field * 25000) );
/* Copy image and skip lines */
for( i_index = 0 ; i_index < p_inpic->i_planes ; i_index++ )
{
pixel_data_t *p_in, *p_end, *p_out;
int i_increment = ( ( i_index == Y_PLANE ) ? 2 : 4 )
* p_inpic->planes[ i_index ].i_line_bytes;
p_in = p_inpic->planes[ i_index ].p_data
+ i_field * p_inpic->planes[ i_index ].i_line_bytes;
p_out = p_outpic->planes[ i_index ].p_data;
p_end = p_out + p_outpic->planes[ i_index ].i_bytes;
for( ; p_out < p_end ; )
{
p_main->fast_memcpy( p_out, p_in,
p_inpic->planes[ i_index ].i_line_bytes );
p_out += p_inpic->planes[ i_index ].i_line_bytes;
p_in += i_increment;
}
return;
}
msleep( VOUT_OUTMEM_SLEEP );
}
vout_DisplayPicture( p_vout->p_sys->p_vout, p_outpic );
}
vout_DisplayPicture( p_vout->p_sys->p_vout, p_outpic );
}
/*****************************************************************************
* Bob422NewPicture: allocate a picture
*****************************************************************************
* Returns 0 on success, -1 otherwise
*****************************************************************************/
static int Bob422NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
{
int i_luma_bytes, i_chroma_bytes;
vout_DatePicture( p_vout->p_sys->p_vout, p_outpic, new_date + 50000 );
vout_LinkPicture( p_vout->p_sys->p_vout, p_outpic );
int i_width = p_vout->output.i_width;
int i_height = p_vout->output.i_height;
/* XXX: we should check for p_vout->p_sys->i_mode, but only WAVE is
* implemented for the moment, so we don't care. Keep it in mind though. */
p_vout->p_sys->f_angle += (new_date - p_vout->p_sys->last_date) / 200000.0;
p_vout->p_sys->last_date = new_date;
f_angle = p_vout->p_sys->f_angle;
switch( p_vout->output.i_chroma )
for( i_index = 0 ; i_index < p_pic->i_planes ; i_index++ )
{
/* We know this chroma, allocate a buffer which will be used
* directly by the decoder */
case YUV_422_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_height * ( i_width / 2 );
int i_line, i_num_lines, i_offset;
u8 black_pixel;
pixel_data_t *p_in, *p_out;
/* 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);
p_in = p_pic->planes[ i_index ].p_data;
p_out = p_outpic->planes[ i_index ].p_data;
/* 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;
p_pic->planes[ Y_PLANE ].i_line_bytes = i_width * sizeof(pixel_data_t);
i_num_lines = p_pic->planes[ i_index ].i_bytes
/ p_pic->planes[ i_index ].i_line_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;
p_pic->planes[ U_PLANE ].i_line_bytes = p_pic->i_chroma_width * sizeof(pixel_data_t);
black_pixel = ( i_index == Y_PLANE ) ? 0x00 : 0x80;
/* 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;
p_pic->planes[ V_PLANE ].i_line_bytes = p_pic->i_chroma_width * sizeof(pixel_data_t);
/* Ok, we do 3 times the sin() calculation for each line. So what ? */
for( i_line = 0 ; i_line < i_num_lines ; i_line++ )
{
/* Calculate today's offset, don't go above 1/20th of the screen */
i_offset = (double)(p_pic->planes[ i_index ].i_line_bytes)
* sin( f_angle + 10.0 * (double)i_line
/ (double)i_num_lines )
/ 20.0;
/* We allocated 3 planes */
p_pic->i_planes = 3;
if( i_offset )
{
if( i_offset < 0 )
{
p_main->fast_memcpy( p_out, p_in - i_offset,
p_pic->planes[ i_index ].i_line_bytes + i_offset );
p_in += p_pic->planes[ i_index ].i_line_bytes;
p_out += p_outpic->planes[ i_index ].i_line_bytes;
memset( p_out + i_offset, black_pixel, -i_offset );
}
else
{
p_main->fast_memcpy( p_out + i_offset, p_in,
p_pic->planes[ i_index ].i_line_bytes - i_offset );
memset( p_out, black_pixel, i_offset );
p_in += p_pic->planes[ i_index ].i_line_bytes;
p_out += p_outpic->planes[ i_index ].i_line_bytes;
}
}
else
{
p_main->fast_memcpy( p_out, p_in,
p_pic->planes[ i_index ].i_line_bytes );
p_in += p_pic->planes[ i_index ].i_line_bytes;
p_out += p_outpic->planes[ i_index ].i_line_bytes;
}
return( 0 );
break;
}
}
/* Unknown chroma, do nothing */
default:
vout_UnlinkPicture( p_vout->p_sys->p_vout, p_outpic );
return( 0 );
break;
}
vout_DisplayPicture( p_vout->p_sys->p_vout, p_outpic );
}
/*****************************************************************************
* filter_common.h: Common filter functions
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: filter_common.h,v 1.1 2001/12/19 03:50:22 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#define ALLOCATE_DIRECTBUFFERS( i_max ) \
/* Try to initialize i_max direct buffers */ \
while( I_OUTPUTPICTURES < ( i_max ) ) \
{ \
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; \
} \
} \
\
if( p_pic == NULL ) \
{ \
break; \
} \
\
/* Allocate the picture */ \
vout_AllocatePicture( p_pic, \
p_vout->output.i_width, \
p_vout->output.i_height, \
p_vout->output.i_chroma ); \
\
if( !p_pic->i_planes ) \
{ \
break; \
} \
\
p_pic->i_status = DESTROYED_PICTURE; \
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; \
\
PP_OUTPUTPICTURE[ I_OUTPUTPICTURES ] = p_pic; \
\
I_OUTPUTPICTURES++; \
} \
......@@ -2,7 +2,7 @@
* invert.c : Invert video plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: invert.c,v 1.1 2001/12/16 16:18:36 sam Exp $
* $Id: invert.c,v 1.2 2001/12/19 03:50:22 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -42,11 +42,11 @@
#include "video.h"
#include "video_output.h"
#include "filter_common.h"
#include "modules.h"
#include "modules_export.h"
#define INVERT_MAX_DIRECTBUFFERS 8
/*****************************************************************************
* Capabilities defined in the other files.
*****************************************************************************/
......@@ -96,8 +96,6 @@ 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 InvertNewPicture( 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.
......@@ -157,6 +155,21 @@ static int vout_Init( vout_thread_t *p_vout )
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 ); /* unknown chroma */
break;
}
/* Try to open the real video output */
psz_filter = main_GetPszVariable( VOUT_FILTER_VAR, "" );
main_PutPszVariable( VOUT_FILTER_VAR, "" );
......@@ -178,54 +191,7 @@ static int vout_Init( vout_thread_t *p_vout )
main_PutPszVariable( VOUT_FILTER_VAR, psz_filter );
/* 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:
p_vout->output.i_chroma = EMPTY_PICTURE; /* unknown chroma */
break;
}
/* Try to initialize INVERT_MAX_DIRECTBUFFERS direct buffers */
while( I_OUTPUTPICTURES < INVERT_MAX_DIRECTBUFFERS )
{
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( InvertNewPicture( p_vout, p_pic ) )
{
break;
}
p_pic->i_status = DESTROYED_PICTURE;
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;
PP_OUTPUTPICTURE[ I_OUTPUTPICTURES ] = p_pic;
I_OUTPUTPICTURES++;
}
ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES );
return( 0 );
}
......@@ -296,13 +262,31 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
for( i_index = 0 ; i_index < p_pic->i_planes ; i_index++ )
{
pixel_data_t *p_in = p_pic->planes[ i_index ].p_data;
pixel_data_t *p_end = p_in + p_pic->planes[ i_index ].i_bytes;
pixel_data_t *p_in, *p_in_end, *p_out;
p_in = p_pic->planes[ i_index ].p_data;
p_in_end = p_in + p_pic->planes[ i_index ].i_bytes - 64;
pixel_data_t *p_out = p_outpic->planes[ i_index ].p_data;
p_out = p_outpic->planes[ i_index ].p_data;
for( ; p_in < p_end ; )
for( ; p_in < p_in_end ; )
{
/* Do 64 pixels at a time */
*((u64*)p_out)++ = ~( *((u64*)p_in)++ );
*((u64*)p_out)++ = ~( *((u64*)p_in)++ );
*((u64*)p_out)++ = ~( *((u64*)p_in)++ );
*((u64*)p_out)++ = ~( *((u64*)p_in)++ );
*((u64*)p_out)++ = ~( *((u64*)p_in)++ );
*((u64*)p_out)++ = ~( *((u64*)p_in)++ );
*((u64*)p_out)++ = ~( *((u64*)p_in)++ );
*((u64*)p_out)++ = ~( *((u64*)p_in)++ );
}
p_in_end += 64;
for( ; p_in < p_in_end ; )
{
/* Do 1 pixel at a time */
*p_out++ = ~( *p_in++ );
}
}
......@@ -312,60 +296,3 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
vout_DisplayPicture( p_vout->p_sys->p_vout, p_outpic );
}
/*****************************************************************************
* InvertNewPicture: allocate a picture
*****************************************************************************
* Returns 0 on success, -1 otherwise
*****************************************************************************/
static int InvertNewPicture( 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_height * ( i_width / 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;
p_pic->planes[ Y_PLANE ].i_line_bytes = i_width * sizeof(pixel_data_t);
/* 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 / 2;
p_pic->planes[ U_PLANE ].i_line_bytes = p_pic->i_chroma_width * sizeof(pixel_data_t);
/* 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 / 2;
p_pic->planes[ V_PLANE ].i_line_bytes = p_pic->i_chroma_width * sizeof(pixel_data_t);
/* We allocated 3 planes */
p_pic->i_planes = 3;
return( 0 );
break;
/* Unknown chroma, do nothing */
default:
return( 0 );
break;
}
}
/*****************************************************************************
* transform.c : transform image plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: transform.c,v 1.1 2001/12/19 03:50:22 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#define MODULE_NAME filter_transform
#include "modules_inner.h"
/*****************************************************************************
* Preamble
*****************************************************************************/
#include "defs.h"
#include <errno.h>
#include <stdlib.h> /* malloc(), free() */
#include <string.h>
#include "common.h" /* boolean_t, byte_t */
#include "intf_msg.h"
#include "threads.h"
#include "mtime.h"
#include "tests.h"
#include "video.h"
#include "video_output.h"
#include "filter_common.h"
#include "modules.h"
#include "modules_export.h"
#define TRANSFORM_MODE_HFLIP 1
#define TRANSFORM_MODE_VFLIP 2
#define TRANSFORM_MODE_90 3
#define TRANSFORM_MODE_180 4
#define TRANSFORM_MODE_270 5
/*****************************************************************************
* Capabilities defined in the other files.
*****************************************************************************/
static void vout_getfunctions( function_list_t * p_function_list );
/*****************************************************************************
* Build configuration tree.
*****************************************************************************/
MODULE_CONFIG_START
ADD_WINDOW( "Configuration for transform module" )
ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
MODULE_CONFIG_STOP
MODULE_INIT_START
p_module->i_capabilities = MODULE_CAPABILITY_NULL
| MODULE_CAPABILITY_VOUT;
p_module->psz_longname = "image transformation module";
MODULE_INIT_STOP
MODULE_ACTIVATE_START
vout_getfunctions( &p_module->p_functions->vout );
MODULE_ACTIVATE_STOP
MODULE_DEACTIVATE_START
MODULE_DEACTIVATE_STOP
/*****************************************************************************
* vout_sys_t: Transform video output method descriptor
*****************************************************************************
* This structure is part of the video output thread descriptor.
* It describes the Transform specific properties of an output thread.
*****************************************************************************/
typedef struct vout_sys_s
{
int i_mode;
boolean_t b_rotation;
struct vout_thread_s *p_vout;
} vout_sys_t;
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static int vout_Probe ( probedata_t *p_data );
static int vout_Create ( struct vout_thread_s * );
static int vout_Init ( struct vout_thread_s * );
static void vout_End ( struct vout_thread_s * );
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 * );
/*****************************************************************************
* Functions exported as capabilities. They are declared as static so that
* we don't pollute the namespace too much.
*****************************************************************************/
static void vout_getfunctions( function_list_t * p_function_list )
{
p_function_list->pf_probe = vout_Probe;
p_function_list->functions.vout.pf_create = vout_Create;
p_function_list->functions.vout.pf_init = vout_Init;
p_function_list->functions.vout.pf_end = vout_End;
p_function_list->functions.vout.pf_destroy = vout_Destroy;
p_function_list->functions.vout.pf_manage = vout_Manage;
p_function_list->functions.vout.pf_display = vout_Display;
p_function_list->functions.vout.pf_setpalette = NULL;
}
/*****************************************************************************
* intf_Probe: return a score
*****************************************************************************/
static int vout_Probe( probedata_t *p_data )
{
if( TestMethod( VOUT_FILTER_VAR, "transform" ) )
{
return( 999 );
}
/* If we weren't asked to filter, don't filter. */
return( 0 );
}
/*****************************************************************************
* vout_Create: allocates Transform video thread output method
*****************************************************************************
* This function allocates and initializes a Transform vout method.
*****************************************************************************/
static int vout_Create( vout_thread_t *p_vout )
{
char *psz_method;
/* Allocate structure */
p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
if( p_vout->p_sys == NULL )
{
intf_ErrMsg( "error: %s", strerror(ENOMEM) );
return( 1 );
}
/* Look what method was requested */
psz_method = main_GetPszVariable( VOUT_FILTER_VAR, "" );
while( *psz_method && *psz_method != ':' )
{
psz_method++;
}
if( !strcmp( psz_method, ":hflip" ) )
{
p_vout->p_sys->i_mode = TRANSFORM_MODE_HFLIP;
p_vout->p_sys->b_rotation = 0;
}
else if( !strcmp( psz_method, ":vflip" ) )
{
p_vout->p_sys->i_mode = TRANSFORM_MODE_VFLIP;
p_vout->p_sys->b_rotation = 0;
}
else if( !strcmp( psz_method, ":90" ) )
{
p_vout->p_sys->i_mode = TRANSFORM_MODE_90;
p_vout->p_sys->b_rotation = 1;
}
else if( !strcmp( psz_method, ":180" ) )
{
p_vout->p_sys->i_mode = TRANSFORM_MODE_180;
p_vout->p_sys->b_rotation = 0;
}
else if( !strcmp( psz_method, ":270" ) )
{
p_vout->p_sys->i_mode = TRANSFORM_MODE_270;
p_vout->p_sys->b_rotation = 1;
}
else
{
intf_ErrMsg( "filter error: no valid transform mode provided, "
"using transform:90" );
p_vout->p_sys->i_mode = TRANSFORM_MODE_90;
p_vout->p_sys->b_rotation = 1;
}
return( 0 );
}
/*****************************************************************************
* vout_Init: initialize Transform video thread output method
*****************************************************************************/
static int vout_Init( vout_thread_t *p_vout )
{
int i_index;
char *psz_filter;
picture_t *p_pic;
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 ); /* unknown chroma */
break;
}
/* Try to open the real video output */
psz_filter = main_GetPszVariable( VOUT_FILTER_VAR, "" );
main_PutPszVariable( VOUT_FILTER_VAR, "" );
intf_WarnMsg( 1, "filter: spawning the real video output" );
if( p_vout->p_sys->b_rotation )
{
p_vout->p_sys->p_vout =
vout_CreateThread( NULL,
p_vout->render.i_height, p_vout->render.i_width,
p_vout->render.i_chroma,
(u64)VOUT_ASPECT_FACTOR * (u64)VOUT_ASPECT_FACTOR
/ (u64)p_vout->render.i_aspect );
}
else
{
p_vout->p_sys->p_vout =
vout_CreateThread( NULL,
p_vout->render.i_width, p_vout->render.i_height,
p_vout->render.i_chroma, p_vout->render.i_aspect );
}
/* Everything failed */
if( p_vout->p_sys->p_vout == NULL )
{
intf_ErrMsg( "filter error: can't open vout, aborting" );
return( 0 );
}
main_PutPszVariable( VOUT_FILTER_VAR, psz_filter );
ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES );
return( 0 );
}
/*****************************************************************************
* vout_End: terminate Transform video thread output method
*****************************************************************************/
static void vout_End( vout_thread_t *p_vout )
{
int i_index;
/* Free the fake output buffers we allocated */
for( i_index = I_OUTPUTPICTURES ; i_index ; )
{
i_index--;
free( PP_OUTPUTPICTURE[ i_index ]->planes[ 0 ].p_data );
}
}
/*****************************************************************************
* vout_Destroy: destroy Transform video thread output method
*****************************************************************************
* Terminate an output method created by TransformCreateOutputMethod
*****************************************************************************/
static void vout_Destroy( vout_thread_t *p_vout )
{
vout_DestroyThread( p_vout->p_sys->p_vout, NULL );
free( p_vout->p_sys );
}
/*****************************************************************************
* vout_Manage: handle Transform events
*****************************************************************************
* This function should be called regularly by video output thread. It manages
* console events. It returns a non null value on error.
*****************************************************************************/
static int vout_Manage( vout_thread_t *p_vout )
{
return( 0 );
}
/*****************************************************************************
* vout_Display: displays previously rendered output
*****************************************************************************
* This function send the currently rendered image to Transform image, waits
* until it is displayed and switch the two rendering buffers, preparing next
* frame.
*****************************************************************************/
static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
{
picture_t *p_outpic;
int i_index;
/* This is a new frame. Get a structure from the video_output. */
while( ( p_outpic = vout_CreatePicture( p_vout->p_sys->p_vout, 0, 0, 0 ) )
== NULL )
{
if( p_vout->b_die || p_vout->b_error )
{
return;
}
msleep( VOUT_OUTMEM_SLEEP );
}
vout_DatePicture( p_vout->p_sys->p_vout, p_outpic, mdate() + 50000 );
vout_LinkPicture( p_vout->p_sys->p_vout, p_outpic );
switch( p_vout->p_sys->i_mode )
{
case TRANSFORM_MODE_90:
for( i_index = 0 ; i_index < p_pic->i_planes ; i_index++ )
{
int i_line_bytes = p_pic->planes[ i_index ].i_line_bytes;
pixel_data_t *p_in = p_pic->planes[ i_index ].p_data;
pixel_data_t *p_out = p_outpic->planes[ i_index ].p_data;
pixel_data_t *p_out_end = p_out
+ p_outpic->planes[ i_index ].i_bytes;
for( ; p_out < p_out_end ; )
{
pixel_data_t *p_line_end;
p_line_end = p_in + p_pic->planes[ i_index ].i_bytes;
for( ; p_in < p_line_end ; )
{
p_line_end -= i_line_bytes;
*(--p_out_end) = *p_line_end;
}
p_in++;
}
}
break;
case TRANSFORM_MODE_180:
for( i_index = 0 ; i_index < p_pic->i_planes ; i_index++ )
{
pixel_data_t *p_in = p_pic->planes[ i_index ].p_data;
pixel_data_t *p_in_end = p_in + p_pic->planes[ i_index ].i_bytes;
pixel_data_t *p_out = p_outpic->planes[ i_index ].p_data;
for( ; p_in < p_in_end ; )
{
*p_out++ = *(--p_in_end);
}
}
break;
case TRANSFORM_MODE_270:
for( i_index = 0 ; i_index < p_pic->i_planes ; i_index++ )
{
int i_line_bytes = p_pic->planes[ i_index ].i_line_bytes;
pixel_data_t *p_in = p_pic->planes[ i_index ].p_data;
pixel_data_t *p_out = p_outpic->planes[ i_index ].p_data;
pixel_data_t *p_out_end = p_out
+ p_outpic->planes[ i_index ].i_bytes;
for( ; p_out < p_out_end ; )
{
pixel_data_t *p_in_end;
p_in_end = p_in + p_pic->planes[ i_index ].i_bytes;
for( ; p_in < p_in_end ; )
{
p_in_end -= i_line_bytes;
*p_out++ = *p_in_end;
}
p_in++;
}
}
break;
case TRANSFORM_MODE_VFLIP:
for( i_index = 0 ; i_index < p_pic->i_planes ; i_index++ )
{
pixel_data_t *p_in = p_pic->planes[ i_index ].p_data;
pixel_data_t *p_in_end = p_in + p_pic->planes[ i_index ].i_bytes;
pixel_data_t *p_out = p_outpic->planes[ i_index ].p_data;
for( ; p_in < p_in_end ; )
{
p_in_end -= p_pic->planes[ i_index ].i_line_bytes;
p_main->fast_memcpy( p_out, p_in_end,
p_pic->planes[ i_index ].i_line_bytes );
p_out += p_pic->planes[ i_index ].i_line_bytes;
}
}
break;
case TRANSFORM_MODE_HFLIP:
for( i_index = 0 ; i_index < p_pic->i_planes ; i_index++ )
{
pixel_data_t *p_in = p_pic->planes[ i_index ].p_data;
pixel_data_t *p_in_end = p_in + p_pic->planes[ i_index ].i_bytes;
pixel_data_t *p_out = p_outpic->planes[ i_index ].p_data;
for( ; p_in < p_in_end ; )
{
pixel_data_t *p_line_end = p_in
+ p_pic->planes[ i_index ].i_line_bytes;
for( ; p_in < p_line_end ; )
{
*p_out++ = *(--p_line_end);
}
p_in += p_pic->planes[ i_index ].i_line_bytes;
}
}
break;
default:
break;
}
vout_UnlinkPicture( p_vout->p_sys->p_vout, p_outpic );
vout_DisplayPicture( p_vout->p_sys->p_vout, p_outpic );
}
......@@ -2,7 +2,7 @@
* wall.c : Wall video plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: wall.c,v 1.1 2001/12/17 03:38:21 sam Exp $
* $Id: wall.c,v 1.2 2001/12/19 03:50:22 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -42,11 +42,11 @@
#include "video.h"
#include "video_output.h"
#include "filter_common.h"
#include "modules.h"
#include "modules_export.h"
#define WALL_MAX_DIRECTBUFFERS 8
/*****************************************************************************
* Capabilities defined in the other files.
*****************************************************************************/
......@@ -97,8 +97,6 @@ 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 WallNewPicture ( 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.
......@@ -158,6 +156,21 @@ static int vout_Init( vout_thread_t *p_vout )
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 ); /* unknown chroma */
break;
}
/* Try to open the real video output */
psz_filter = main_GetPszVariable( VOUT_FILTER_VAR, "" );
main_PutPszVariable( VOUT_FILTER_VAR, "" );
......@@ -193,54 +206,7 @@ static int vout_Init( vout_thread_t *p_vout )
main_PutPszVariable( VOUT_FILTER_VAR, psz_filter );
/* 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:
p_vout->output.i_chroma = EMPTY_PICTURE; /* unknown chroma */
break;
}
/* Try to initialize WALL_MAX_DIRECTBUFFERS direct buffers */
while( I_OUTPUTPICTURES < WALL_MAX_DIRECTBUFFERS )
{
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( WallNewPicture( p_vout, p_pic ) )
{
break;
}
p_pic->i_status = DESTROYED_PICTURE;
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;
PP_OUTPUTPICTURE[ I_OUTPUTPICTURES ] = p_pic;
I_OUTPUTPICTURES++;
}
ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES );
return( 0 );
}
......@@ -345,60 +311,3 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
vout_DisplayPicture( p_vout->p_sys->p_vout_bottom, p_outpic_bottom );
}
/*****************************************************************************
* WallNewPicture: allocate a picture
*****************************************************************************
* Returns 0 on success, -1 otherwise
*****************************************************************************/
static int WallNewPicture( 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_height * ( i_width / 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;
p_pic->planes[ Y_PLANE ].i_line_bytes = i_width * sizeof(pixel_data_t);
/* 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 / 2;
p_pic->planes[ U_PLANE ].i_line_bytes = p_pic->i_chroma_width * sizeof(pixel_data_t);
/* 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 / 2;
p_pic->planes[ V_PLANE ].i_line_bytes = p_pic->i_chroma_width * sizeof(pixel_data_t);
/* We allocated 3 planes */
p_pic->i_planes = 3;
return( 0 );
break;
/* Unknown chroma, do nothing */
default:
return( 0 );
break;
}
}
......@@ -2,7 +2,7 @@
* input_ps.c: PS demux and packet management
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: input_ps.c,v 1.4 2001/12/12 13:48:09 massiot Exp $
* $Id: input_ps.c,v 1.5 2001/12/19 03:50:22 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr>
......@@ -214,6 +214,7 @@ static void PSInit( input_thread_t * p_input )
data_packet_t * pp_packets[INPUT_READ_ONCE];
i_result = PSRead( p_input, pp_packets );
if( i_result == 1 )
{
/* EOF */
......@@ -222,7 +223,7 @@ static void PSInit( input_thread_t * p_input )
vlc_mutex_unlock( &p_input->stream.stream_lock );
break;
}
if( i_result == -1 )
else if( i_result == -1 )
{
p_input->b_error = 1;
break;
......
......@@ -2,7 +2,7 @@
* aout_sdl.c : audio sdl functions library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: aout_sdl.c,v 1.20 2001/12/07 18:33:08 sam Exp $
* $Id: aout_sdl.c,v 1.21 2001/12/19 03:50:22 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -107,7 +107,14 @@ static int aout_Probe( probedata_t *p_data )
{
#if 0
SDL_AudioSpec desired, obtained;
#endif
if( SDL_WasInit( SDL_INIT_AUDIO ) != 0 )
{
return( 0 );
}
#if 0
/* Start AudioSDL */
if( SDL_Init(SDL_INIT_AUDIO | SDL_INIT_NOPARACHUTE) != 0 )
{
......@@ -154,7 +161,7 @@ static int aout_Open( aout_thread_t *p_aout )
SDL_AudioSpec desired;
int i_channels = p_aout->b_stereo ? 2 : 1;
/* Allocate structure */
/* Allocate structure */
p_aout->p_sys = malloc( sizeof( aout_sys_t ) );
if( p_aout->p_sys == NULL )
......@@ -163,6 +170,24 @@ static int aout_Open( aout_thread_t *p_aout )
return( 1 );
}
/* Initialize library */
if( SDL_Init( SDL_INIT_AUDIO
#ifndef WIN32
/* Win32 SDL implementation doesn't support SDL_INIT_EVENTTHREAD yet*/
| SDL_INIT_EVENTTHREAD
#endif
#ifdef DEBUG
/* In debug mode you may want vlc to dump a core instead of staying
* stuck */
| SDL_INIT_NOPARACHUTE
#endif
) < 0 )
{
intf_ErrMsg( "aout error: can't initialize SDL (%s)", SDL_GetError() );
free( p_aout->p_sys );
return( 1 );
}
p_aout->p_sys->i_audio_end = 0;
p_aout->p_sys->audio_buf = malloc( OVERFLOWLIMIT );
......@@ -192,6 +217,8 @@ static int aout_Open( aout_thread_t *p_aout )
if( SDL_OpenAudio( &desired, NULL ) < 0 )
{
intf_ErrMsg( "aout error: SDL_OpenAudio failed (%s)", SDL_GetError() );
SDL_QuitSubSystem( SDL_INIT_AUDIO );
free( p_aout->p_sys );
return( -1 );
}
......@@ -295,6 +322,8 @@ static void aout_Close( aout_thread_t *p_aout )
SDL_CloseAudio();
SDL_QuitSubSystem( SDL_INIT_AUDIO );
free( p_aout->p_sys ); /* Close the Output. */
}
......
......@@ -2,7 +2,7 @@
* vout_sdl.c: SDL video output display method
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: vout_sdl.c,v 1.70 2001/12/16 16:18:36 sam Exp $
* $Id: vout_sdl.c,v 1.71 2001/12/19 03:50:22 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Pierre Baillet <oct@zoy.org>
......@@ -68,6 +68,7 @@
typedef struct vout_sys_s
{
SDL_Surface * p_display; /* display device */
SDL_Overlay * p_overlay; /* An overlay we keep to grab the XVideo port */
int i_width;
int i_height;
......@@ -129,6 +130,11 @@ void _M( vout_getfunctions )( function_list_t * p_function_list )
*****************************************************************************/
static int vout_Probe( probedata_t *p_data )
{
if( SDL_WasInit( SDL_INIT_VIDEO ) != 0 )
{
return( 0 );
}
if( TestMethod( VOUT_METHOD_VAR, "sdl" ) )
{
return( 999 );
......@@ -190,15 +196,21 @@ static int vout_Create( vout_thread_t *p_vout )
* VOUT_ASPECT_FACTOR / p_vout->render.i_aspect;
}
if( p_vout->p_sys->i_width <= 400 && p_vout->p_sys->i_height <= 300 )
if( p_vout->p_sys->i_width <= 300 && p_vout->p_sys->i_height <= 200 )
{
p_vout->p_sys->i_width <<= 1;
p_vout->p_sys->i_height <<= 1;
}
else if( p_vout->p_sys->i_width <= 400 && p_vout->p_sys->i_height <= 300 )
{
p_vout->p_sys->i_width *= 2;
p_vout->p_sys->i_height *= 2;
p_vout->p_sys->i_width += p_vout->p_sys->i_width >> 1;
p_vout->p_sys->i_height += p_vout->p_sys->i_height >> 1;
}
if( SDLOpenDisplay( p_vout ) )
{
intf_ErrMsg( "vout error: can't set up SDL (%s)", SDL_GetError() );
SDL_QuitSubSystem( SDL_INIT_VIDEO );
free( p_vout->p_sys );
return( 1 );
}
......@@ -247,8 +259,8 @@ static int vout_Init( vout_thread_t *p_vout )
}
}
/* Allocate the picture */
if( SDLNewPicture( p_vout, p_pic ) )
/* Allocate the picture if we found one */
if( p_pic == NULL || SDLNewPicture( p_vout, p_pic ) )
{
break;
}
......@@ -506,8 +518,29 @@ static int SDLOpenDisplay( vout_thread_t *p_vout )
SDL_LockSurface( p_vout->p_sys->p_display );
SDL_WM_SetCaption( VOUT_TITLE " (SDL output)",
VOUT_TITLE " (SDL output)" );
p_vout->p_sys->p_overlay =
SDL_CreateYUVOverlay( 32, 32, SDL_YV12_OVERLAY,
p_vout->p_sys->p_display );
if( p_vout->p_sys->p_overlay == NULL )
{
intf_ErrMsg( "vout error: cannot set overlay" );
SDL_UnlockSurface( p_vout->p_sys->p_display );
SDL_FreeSurface( p_vout->p_sys->p_display );
return( 1 );
}
if( p_vout->p_sys->p_overlay->hw_overlay )
{
SDL_WM_SetCaption( VOUT_TITLE " (hardware SDL output)",
VOUT_TITLE " (hardware SDL output)" );
}
else
{
SDL_WM_SetCaption( VOUT_TITLE " (software SDL output)",
VOUT_TITLE " (software SDL output)" );
}
SDL_EventState( SDL_KEYUP, SDL_IGNORE ); /* ignore keys up */
return( 0 );
......@@ -521,6 +554,7 @@ static int SDLOpenDisplay( vout_thread_t *p_vout )
*****************************************************************************/
static void SDLCloseDisplay( vout_thread_t *p_vout )
{
SDL_FreeYUVOverlay( p_vout->p_sys->p_overlay );
SDL_UnlockSurface ( p_vout->p_sys->p_display );
SDL_FreeSurface( p_vout->p_sys->p_display );
}
......
......@@ -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.4 2001/12/16 16:18:36 sam Exp $
* $Id: vout_common.c,v 1.5 2001/12/19 03:50:22 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -470,10 +470,16 @@ int _M( XCommonCreateWindow ) ( vout_thread_t *p_vout )
* VOUT_ASPECT_FACTOR / p_vout->render.i_aspect;
}
if( p_vout->p_sys->i_width <= 400 && p_vout->p_sys->i_height <= 300 )
if( p_vout->p_sys->i_width <= 300 && p_vout->p_sys->i_height <= 200 )
{
p_vout->p_sys->i_width *= 2;
p_vout->p_sys->i_height *= 2;
p_vout->p_sys->i_width <<= 1;
p_vout->p_sys->i_height <<= 1;
}
else if( p_vout->p_sys->i_width <= 400
&& p_vout->p_sys->i_height <= 300 )
{
p_vout->p_sys->i_width += p_vout->p_sys->i_width >> 1;
p_vout->p_sys->i_height += p_vout->p_sys->i_height >> 1;
}
}
......
......@@ -3,7 +3,7 @@
* Functions are prototyped in tests.h.
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: tests.c,v 1.9 2001/12/07 18:33:08 sam Exp $
* $Id: tests.c,v 1.10 2001/12/19 03:50:22 sam Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
*
......@@ -46,7 +46,21 @@ int TestProgram( char * psz_program )
*****************************************************************************/
int TestMethod( char * psz_var, char * psz_method )
{
return( !strcmp( psz_method, main_GetPszVariable( psz_var, "" ) ) );
int i_len = strlen( psz_method );
int i_index = 0;
char *psz_requested = main_GetPszVariable( psz_var, "" );
while( psz_requested[i_index] && psz_requested[i_index] != ':' )
{
i_index++;
}
if( i_index != i_len )
{
return 0;
}
return !strncmp( psz_method, psz_requested, i_len );
}
/*****************************************************************************
......
......@@ -2,7 +2,7 @@
* vout_pictures.c : picture management functions
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: vout_pictures.c,v 1.4 2001/12/16 16:18:36 sam Exp $
* $Id: vout_pictures.c,v 1.5 2001/12/19 03:50:22 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -40,11 +40,6 @@
#include "video.h"
#include "video_output.h"
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static void NewPicture ( vout_thread_t *, picture_t * );
/*****************************************************************************
* vout_DisplayPicture: display a picture
*****************************************************************************
......@@ -185,12 +180,16 @@ picture_t *vout_CreatePicture( vout_thread_t *p_vout,
*/
if( p_free_picture != NULL )
{
NewPicture( p_vout, p_free_picture );
vout_AllocatePicture( p_free_picture,
p_vout->render.i_width, p_vout->render.i_height,
p_vout->render.i_chroma );
if( p_free_picture->i_planes )
{
/* Copy picture information, set some default values */
p_free_picture->i_status = RESERVED_PICTURE;
p_free_picture->i_type = MEMORY_PICTURE;
p_free_picture->i_refcount = 0;
p_free_picture->b_progressive = b_progressive;
......@@ -447,51 +446,46 @@ void vout_PlacePicture( vout_thread_t *p_vout, int i_width, int i_height,
*pi_y = ( i_height - *pi_height ) / 2;
}
/* Following functions are local */
/*****************************************************************************
* NewPicture: allocate a new picture in the heap.
* vout_AllocatePicture: allocate a new picture in the heap.
*****************************************************************************
* This function allocates a fake direct buffer in memory, which can be
* used exactly like a video buffer. The video output thread then manages
* how it gets displayed.
*****************************************************************************/
static void NewPicture( vout_thread_t *p_vout, picture_t *p_picture )
void vout_AllocatePicture( picture_t *p_picture,
int i_width, int i_height, int i_chroma )
{
int i_data_size = 0;
p_picture->i_size = p_vout->render.i_width
* p_vout->render.i_height;
p_picture->i_size = i_width * i_height;
/* Calculate coordinates */
switch( p_vout->render.i_chroma )
switch( 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 = p_vout->render.i_width / 2;
p_picture->i_chroma_width = 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 = p_vout->render.i_width / 2;
p_picture->i_chroma_width = 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 = p_vout->render.i_width;
p_picture->i_chroma_width = i_width;
break;
default:
intf_ErrMsg( "vout error: unknown chroma type %d",
p_vout->render.i_chroma );
intf_ErrMsg( "vout error: unknown chroma type %d", i_chroma );
p_picture->i_planes = 0;
return;
}
p_picture->i_type = MEMORY_PICTURE;
/* Allocate memory */
switch( p_vout->render.i_chroma )
switch( 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 */
......@@ -503,7 +497,7 @@ static void NewPicture( vout_thread_t *p_vout, picture_t *p_picture )
p_picture->planes[ Y_PLANE ].i_bytes =
p_picture->i_size * sizeof(pixel_data_t);
p_picture->planes[ Y_PLANE ].i_line_bytes =
p_vout->render.i_width * sizeof(pixel_data_t);
i_width * sizeof(pixel_data_t);
p_picture->planes[ Y_PLANE ].p_data =
memalign( 16, i_data_size * sizeof(pixel_data_t) * 4 );
/* The U plane */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment