Commit dbbbbc3a authored by Sam Hocevar's avatar Sam Hocevar

* ./configure.in: fixed inet_pton detection.

  * ./plugins/filter/deinterlace.c: the blend mode is now a lot smoother, but
    also a bit slower, so I also kept the old version, optimized it, and
    called it "mean".
parent 9915a8b1
......@@ -6337,15 +6337,58 @@ if eval "test \"`echo '$ac_cv_func_'inet_pton`\" = yes"; then
PLUGINS="${PLUGINS} ipv6"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for inet_pton in -lresolv""... $ac_c" 1>&6
echo "configure:6343: checking for inet_pton in -lresolv" >&5
ac_lib_var=`echo resolv'_'inet_pton | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6351 "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
builtin and then its argument prototype would still apply. */
char inet_pton();
int main() {
inet_pton()
; return 0; }
EOF
if { (eval echo configure:6362: \"$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
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
PLUGINS="${PLUGINS} ipv6"
ipv6_LDFLAGS="${ipv6_LDFLAGS} -lresolv"
else
echo "$ac_t""no" 1>&6
fi
fi
fi
if test "x$SYS" = "xmingw32"
then
echo $ac_n "checking for getaddrinfo in ws2tcpip.h""... $ac_c" 1>&6
echo "configure:6347: checking for getaddrinfo in ws2tcpip.h" >&5
echo "configure:6390: checking for getaddrinfo in ws2tcpip.h" >&5
cat > conftest.$ac_ext <<EOF
#line 6349 "configure"
#line 6392 "configure"
#include "confdefs.h"
#include <ws2tcpip.h>
EOF
......@@ -6416,7 +6459,7 @@ fi
{ echo "configure: error: ${with_mad_tree} directory doesn't exist" 1>&2; exit 1; }
fi
echo $ac_n "checking for mad.h in ${real_mad_tree}/libmad""... $ac_c" 1>&6
echo "configure:6420: checking for mad.h in ${real_mad_tree}/libmad" >&5
echo "configure:6463: checking for mad.h in ${real_mad_tree}/libmad" >&5
if test -f ${real_mad_tree}/libmad/mad.h
then
echo "$ac_t""yes" 1>&6
......@@ -6425,7 +6468,7 @@ echo "configure:6420: checking for mad.h in ${real_mad_tree}/libmad" >&5
save_LDFLAGS=$LDFLAGS
LDFLAGS=$mad_LDFLAGS
echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
echo "configure:6429: checking for mad_bit_init in -lmad" >&5
echo "configure:6472: 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
......@@ -6433,7 +6476,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lmad $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6437 "configure"
#line 6480 "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
......@@ -6444,7 +6487,7 @@ int main() {
mad_bit_init()
; return 0; }
EOF
if { (eval echo configure:6448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:6491: \"$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
......@@ -6481,17 +6524,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6485: checking for $ac_hdr" >&5
echo "configure:6528: 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 6490 "configure"
#line 6533 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6538: \"$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*
......@@ -6519,7 +6562,7 @@ fi
done
echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
echo "configure:6523: checking for mad_bit_init in -lmad" >&5
echo "configure:6566: 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
......@@ -6527,7 +6570,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lmad $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6531 "configure"
#line 6574 "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
......@@ -6538,7 +6581,7 @@ int main() {
mad_bit_init()
; return 0; }
EOF
if { (eval echo configure:6542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:6585: \"$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
......@@ -6593,7 +6636,7 @@ fi
if test "x$with_ffmpeg_tree" != "x"
then
echo $ac_n "checking for libavcodec.a in ${with_ffmpeg_tree}""... $ac_c" 1>&6
echo "configure:6597: checking for libavcodec.a in ${with_ffmpeg_tree}" >&5
echo "configure:6640: checking for libavcodec.a in ${with_ffmpeg_tree}" >&5
real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
if test "x$real_ffmpeg_tree" = x
then
......@@ -6616,7 +6659,7 @@ echo "configure:6597: checking for libavcodec.a in ${with_ffmpeg_tree}" >&5
CFLAGS="$CFLAGS $ffmpeg_CFLAGS"
LDFLAGS="$LDFLAGS $ffmpeg_LDFLAGS -lm"
echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6
echo "configure:6620: checking for avcodec_init in -lavcodec" >&5
echo "configure:6663: checking for avcodec_init in -lavcodec" >&5
ac_lib_var=`echo avcodec'_'avcodec_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
......@@ -6624,7 +6667,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lavcodec $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6628 "configure"
#line 6671 "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
......@@ -6635,7 +6678,7 @@ int main() {
avcodec_init()
; return 0; }
EOF
if { (eval echo configure:6639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:6682: \"$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
......@@ -6692,7 +6735,7 @@ fi
{ echo "configure: error: ${with_a52_tree} directory doesn't exist" 1>&2; exit 1; }
fi
echo $ac_n "checking for a52.h in ${real_a52_tree}/include""... $ac_c" 1>&6
echo "configure:6696: checking for a52.h in ${real_a52_tree}/include" >&5
echo "configure:6739: checking for a52.h in ${real_a52_tree}/include" >&5
if test -f ${real_a52_tree}/include/a52.h
then
echo "$ac_t""yes" 1>&6
......@@ -6701,7 +6744,7 @@ echo "configure:6696: checking for a52.h in ${real_a52_tree}/include" >&5
save_LDFLAGS=$LDFLAGS
LDFLAGS="$a52_LDFLAGS $LDFLAGS"
echo $ac_n "checking for a52_free in -la52""... $ac_c" 1>&6
echo "configure:6705: checking for a52_free in -la52" >&5
echo "configure:6748: checking for a52_free in -la52" >&5
ac_lib_var=`echo a52'_'a52_free | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -6709,7 +6752,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-la52 -lm $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6713 "configure"
#line 6756 "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
......@@ -6720,7 +6763,7 @@ int main() {
a52_free()
; return 0; }
EOF
if { (eval echo configure:6724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:6767: \"$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
......@@ -6761,17 +6804,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6765: checking for $ac_hdr" >&5
echo "configure:6808: 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 6770 "configure"
#line 6813 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6818: \"$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*
......@@ -6793,7 +6836,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
EOF
echo $ac_n "checking for a52_free in -la52""... $ac_c" 1>&6
echo "configure:6797: checking for a52_free in -la52" >&5
echo "configure:6840: checking for a52_free in -la52" >&5
ac_lib_var=`echo a52'_'a52_free | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -6801,7 +6844,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-la52 -lm $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6805 "configure"
#line 6848 "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
......@@ -6812,7 +6855,7 @@ int main() {
a52_free()
; return 0; }
EOF
if { (eval echo configure:6816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:6859: \"$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
......@@ -6857,17 +6900,17 @@ then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6861: checking for $ac_hdr" >&5
echo "configure:6904: 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 6866 "configure"
#line 6909 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6914: \"$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*
......@@ -6925,17 +6968,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:6929: checking for $ac_hdr" >&5
echo "configure:6972: 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 6934 "configure"
#line 6977 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6982: \"$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*
......@@ -6987,17 +7030,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:6991: checking for $ac_hdr" >&5
echo "configure:7034: 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 6996 "configure"
#line 7039 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -7020,7 +7063,7 @@ EOF
CFLAGS="$save_CFLAGS -L$x_libraries -lX11 -lXext"
echo $ac_n "checking for XvSetPortAttribute in -lXv_pic""... $ac_c" 1>&6
echo "configure:7024: checking for XvSetPortAttribute in -lXv_pic" >&5
echo "configure:7067: checking for XvSetPortAttribute in -lXv_pic" >&5
ac_lib_var=`echo Xv_pic'_'XvSetPortAttribute | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -7028,7 +7071,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lXv_pic $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7032 "configure"
#line 7075 "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
......@@ -7039,7 +7082,7 @@ int main() {
XvSetPortAttribute()
; return 0; }
EOF
if { (eval echo configure:7043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:7086: \"$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
......@@ -7096,7 +7139,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:7100: checking for $ac_word" >&5
echo "configure:7143: 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
......@@ -7136,7 +7179,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:7140: checking for $ac_word" >&5
echo "configure:7183: 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
......@@ -7177,7 +7220,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:7181: checking for $ac_word" >&5
echo "configure:7224: 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
......@@ -7222,17 +7265,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7226: checking for $ac_hdr" >&5
echo "configure:7269: 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 7231 "configure"
#line 7274 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7279: \"$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*
......@@ -7302,17 +7345,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7306: checking for $ac_hdr" >&5
echo "configure:7349: 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 7311 "configure"
#line 7354 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7359: \"$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*
......@@ -7341,7 +7384,7 @@ done
else
echo $ac_n "checking for directX headers in ${with_directx}""... $ac_c" 1>&6
echo "configure:7345: checking for directX headers in ${with_directx}" >&5
echo "configure:7388: checking for directX headers in ${with_directx}" >&5
if test -f ${with_directx}/ddraw.h
then
PLUGINS="${PLUGINS} directx"
......@@ -7368,17 +7411,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7372: checking for $ac_hdr" >&5
echo "configure:7415: 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 7377 "configure"
#line 7420 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7425: \"$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*
......@@ -7473,17 +7516,17 @@ if test x$enable_aa = xyes
then
ac_safe=`echo "aalib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for aalib.h""... $ac_c" 1>&6
echo "configure:7477: checking for aalib.h" >&5
echo "configure:7520: checking for aalib.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 7482 "configure"
#line 7525 "configure"
#include "confdefs.h"
#include <aalib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7530: \"$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*
......@@ -7534,17 +7577,17 @@ then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7538: checking for $ac_hdr" >&5
echo "configure:7581: 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 7543 "configure"
#line 7586 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7591: \"$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*
......@@ -7567,7 +7610,7 @@ EOF
PLUGINS="${PLUGINS} dsp"
echo $ac_n "checking for main in -lossaudio""... $ac_c" 1>&6
echo "configure:7571: checking for main in -lossaudio" >&5
echo "configure:7614: checking for main in -lossaudio" >&5
ac_lib_var=`echo ossaudio'_'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
......@@ -7575,14 +7618,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lossaudio $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7579 "configure"
#line 7622 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:7586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:7629: \"$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
......@@ -7618,7 +7661,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:7622: checking for $ac_word" >&5
echo "configure:7665: 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
......@@ -7669,7 +7712,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:7673: checking for $ac_word" >&5
echo "configure:7716: 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
......@@ -7719,17 +7762,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:7723: checking for alsa/asoundlib.h" >&5
echo "configure:7766: 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 7728 "configure"
#line 7771 "configure"
#include "confdefs.h"
#include <alsa/asoundlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7776: \"$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*
......@@ -7746,7 +7789,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:7750: checking for main in -lasound" >&5
echo "configure:7793: 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
......@@ -7754,14 +7797,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lasound $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7758 "configure"
#line 7801 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:7765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:7808: \"$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
......@@ -7838,7 +7881,7 @@ fi
# Extract the first word of "gtk12-config", so it can be a program name with args.
set dummy gtk12-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:7842: checking for $ac_word" >&5
echo "configure:7885: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GTK12_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -7877,7 +7920,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:7881: checking for $ac_word" >&5
echo "configure:7924: 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
......@@ -7926,17 +7969,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7930: checking for $ac_hdr" >&5
echo "configure:7973: 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 7935 "configure"
#line 7978 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7983: \"$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*
......@@ -7982,7 +8025,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:7986: checking for $ac_word" >&5
echo "configure:8029: 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
......@@ -8026,17 +8069,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:8030: checking for $ac_hdr" >&5
echo "configure:8073: 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 8035 "configure"
#line 8078 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:8083: \"$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*
......@@ -8123,17 +8166,17 @@ else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:8127: checking for $ac_hdr" >&5
echo "configure:8170: 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 8132 "configure"
#line 8175 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:8180: \"$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*
......@@ -8176,17 +8219,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:8180: checking for $ac_hdr" >&5
echo "configure:8223: 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 8185 "configure"
#line 8228 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:8233: \"$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*
......@@ -8257,17 +8300,17 @@ if test x$enable_xosd = xyes
then
ac_safe=`echo "xosd.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for xosd.h""... $ac_c" 1>&6
echo "configure:8261: checking for xosd.h" >&5
echo "configure:8304: checking for xosd.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 8266 "configure"
#line 8309 "configure"
#include "confdefs.h"
#include <xosd.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:8314: \"$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*
......@@ -8306,17 +8349,17 @@ if test x$enable_lirc = xyes
then
ac_safe=`echo "lirc/lirc_client.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for lirc/lirc_client.h""... $ac_c" 1>&6
echo "configure:8310: checking for lirc/lirc_client.h" >&5
echo "configure:8353: checking for lirc/lirc_client.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 8315 "configure"
#line 8358 "configure"
#include "confdefs.h"
#include <lirc/lirc_client.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:8363: \"$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*
......@@ -8333,7 +8376,7 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for lirc_init in -llirc_client""... $ac_c" 1>&6
echo "configure:8337: checking for lirc_init in -llirc_client" >&5
echo "configure:8380: checking for lirc_init in -llirc_client" >&5
ac_lib_var=`echo lirc_client'_'lirc_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
......@@ -8341,7 +8384,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-llirc_client $LIBS"
cat > conftest.$ac_ext <<EOF
#line 8345 "configure"
#line 8388 "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
......@@ -8352,7 +8395,7 @@ int main() {
lirc_init()
; return 0; }
EOF
if { (eval echo configure:8356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:8399: \"$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
......@@ -8407,7 +8450,7 @@ fi
;;
*)
echo $ac_n "checking whether the byte order is big-endian""... $ac_c" 1>&6
echo "configure:8411: checking whether the byte order is big-endian" >&5
echo "configure:8454: checking whether the byte order is big-endian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -8489,7 +8532,7 @@ if test "${enable_pth+set}" = set; then
enableval="$enable_pth"
if test "x$enable_pth" = "xyes"; then
echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
echo "configure:8493: checking for pth_init in -lpth" >&5
echo "configure:8536: 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
......@@ -8497,7 +8540,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpth $LIBS"
cat > conftest.$ac_ext <<EOF
#line 8501 "configure"
#line 8544 "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
......@@ -8508,7 +8551,7 @@ int main() {
pth_init()
; return 0; }
EOF
if { (eval echo configure:8512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:8555: \"$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
......@@ -8536,7 +8579,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
#line 8540 "configure"
#line 8583 "configure"
#include "confdefs.h"
#include <pth.h>
EOF
......@@ -8562,7 +8605,7 @@ if test "${enable_st+set}" = set; then
enableval="$enable_st"
if test "x$enable_st" = "xyes"; then
echo $ac_n "checking for st_init in -lst""... $ac_c" 1>&6
echo "configure:8566: checking for st_init in -lst" >&5
echo "configure:8609: checking for st_init in -lst" >&5
ac_lib_var=`echo st'_'st_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
......@@ -8570,7 +8613,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lst $LIBS"
cat > conftest.$ac_ext <<EOF
#line 8574 "configure"
#line 8617 "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
......@@ -8581,7 +8624,7 @@ int main() {
st_init()
; return 0; }
EOF
if { (eval echo configure:8585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:8628: \"$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
......@@ -8609,7 +8652,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
#line 8613 "configure"
#line 8656 "configure"
#include "confdefs.h"
#include <st.h>
EOF
......
......@@ -819,7 +819,11 @@ dnl
if test x$SYS != xnto && test "x$SYS" != "xmingw32"
then
CFLAGS="$save_CFLAGS"
AC_CHECK_FUNC(inet_pton,[PLUGINS="${PLUGINS} ipv6"])
AC_CHECK_FUNC(inet_pton,[PLUGINS="${PLUGINS} ipv6"],[
AC_CHECK_LIB(resolv,inet_pton,
[PLUGINS="${PLUGINS} ipv6"
ipv6_LDFLAGS="${ipv6_LDFLAGS} -lresolv"])
])
fi
if test "x$SYS" = "xmingw32"
then
......
......@@ -2,7 +2,7 @@
* deinterlace.c : deinterlacer plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: deinterlace.c,v 1.15 2002/06/09 16:52:58 sam Exp $
* $Id: deinterlace.c,v 1.16 2002/06/10 00:41:08 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -34,9 +34,10 @@
#include "filter_common.h"
#define DEINTERLACE_DISCARD 1
#define DEINTERLACE_BLEND 2
#define DEINTERLACE_BOB 3
#define DEINTERLACE_LINEAR 4
#define DEINTERLACE_MEAN 2
#define DEINTERLACE_BLEND 3
#define DEINTERLACE_BOB 4
#define DEINTERLACE_LINEAR 5
/*****************************************************************************
* Capabilities defined in the other files.
......@@ -44,11 +45,11 @@
static void vout_getfunctions( function_list_t * p_function_list );
static void RenderBob ( vout_thread_t *, picture_t *, picture_t *, int );
static void RenderMean ( vout_thread_t *, picture_t *, picture_t * );
static void RenderBlend ( vout_thread_t *, picture_t *, picture_t * );
static void RenderLinear ( vout_thread_t *, picture_t *, picture_t *, int );
static void MergeLinear ( void *, const void *, const void *, size_t );
static void MergeBlend ( void *, void *, const void *, const void *, size_t );
static void Merge ( void *, const void *, const void *, size_t );
/*****************************************************************************
* Build configuration tree.
......@@ -56,7 +57,7 @@ static void MergeBlend ( void *, void *, const void *, const void *, size_t );
MODULE_CONFIG_START
ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL )
ADD_STRING ( "deinterlace-mode", "discard", NULL, N_("Deinterlace mode"),
N_("one of \"discard\", \"blend\", \"bob\" or \"linear\"") )
N_("one of \"discard\", \"blend\", \"mean\", \"bob\" or \"linear\"") )
MODULE_CONFIG_STOP
MODULE_INIT_START
......@@ -153,6 +154,10 @@ static int vout_Create( vout_thread_t *p_vout )
{
p_vout->p_sys->i_mode = DEINTERLACE_DISCARD;
}
else if( !strcmp( psz_method, "mean" ) )
{
p_vout->p_sys->i_mode = DEINTERLACE_MEAN;
}
else if( !strcmp( psz_method, "blend" )
|| !strcmp( psz_method, "average" )
|| !strcmp( psz_method, "combine-fields" ) )
......@@ -225,8 +230,9 @@ static int vout_Init( vout_thread_t *p_vout )
case FOURCC_YV12:
switch( p_vout->p_sys->i_mode )
{
case DEINTERLACE_DISCARD:
case DEINTERLACE_BOB:
case DEINTERLACE_MEAN:
case DEINTERLACE_DISCARD:
p_vout->p_sys->p_vout =
vout_CreateThread( p_vout,
p_vout->output.i_width, p_vout->output.i_height / 2,
......@@ -383,6 +389,11 @@ static void vout_Render ( vout_thread_t *p_vout, picture_t *p_pic )
vout_DisplayPicture( p_vout->p_sys->p_vout, pp_outpic[1] );
break;
case DEINTERLACE_MEAN:
RenderMean( p_vout, pp_outpic[0], p_pic );
vout_DisplayPicture( p_vout->p_sys->p_vout, pp_outpic[0] );
break;
case DEINTERLACE_BLEND:
RenderBlend( p_vout, pp_outpic[0], p_pic );
vout_DisplayPicture( p_vout->p_sys->p_vout, pp_outpic[0] );
......@@ -509,8 +520,7 @@ static void RenderLinear( vout_thread_t *p_vout,
p_out += p_pic->p[i_plane].i_pitch;
MergeLinear( p_out, p_in,
p_in + 2 * p_pic->p[i_plane].i_pitch,
Merge( p_out, p_in, p_in + 2 * p_pic->p[i_plane].i_pitch,
p_pic->p[i_plane].i_pitch );
p_in += 2 * p_pic->p[i_plane].i_pitch;
......@@ -528,7 +538,7 @@ static void RenderLinear( vout_thread_t *p_vout,
}
}
static void RenderBlend( vout_thread_t *p_vout,
static void RenderMean( vout_thread_t *p_vout,
picture_t *p_outpic, picture_t *p_pic )
{
int i_plane;
......@@ -544,19 +554,52 @@ static void RenderBlend( vout_thread_t *p_vout,
p_out_end = p_out + p_outpic->p[i_plane].i_pitch
* p_outpic->p[i_plane].i_lines;
/* All lines: mean value */
for( ; p_out < p_out_end ; )
{
MergeBlend( p_out, p_out + p_outpic->p[i_plane].i_pitch,
p_in, p_in + p_pic->p[i_plane].i_pitch,
Merge( p_out, p_in, p_in + p_pic->p[i_plane].i_pitch,
p_pic->p[i_plane].i_pitch );
p_out += 2 * p_pic->p[i_plane].i_pitch;
p_out += p_pic->p[i_plane].i_pitch;
p_in += 2 * p_pic->p[i_plane].i_pitch;
}
}
}
static void MergeLinear( void *p_dest, const void *p_s1,
static void RenderBlend( vout_thread_t *p_vout,
picture_t *p_outpic, picture_t *p_pic )
{
int i_plane;
/* Copy image and skip lines */
for( i_plane = 0 ; i_plane < p_pic->i_planes ; i_plane++ )
{
u8 *p_in, *p_out_end, *p_out;
p_in = p_pic->p[i_plane].p_pixels;
p_out = p_outpic->p[i_plane].p_pixels;
p_out_end = p_out + p_outpic->p[i_plane].i_pitch
* p_outpic->p[i_plane].i_lines;
/* First line: simple copy */
p_vout->p_vlc->pf_memcpy( p_out, p_in,
p_pic->p[i_plane].i_pitch );
p_out += p_pic->p[i_plane].i_pitch;
/* Remaining lines: mean value */
for( ; p_out < p_out_end ; )
{
Merge( p_out, p_in, p_in + p_pic->p[i_plane].i_pitch,
p_pic->p[i_plane].i_pitch );
p_out += p_pic->p[i_plane].i_pitch;
p_in += p_pic->p[i_plane].i_pitch;
}
}
}
static void Merge( void *p_dest, const void *p_s1,
const void *p_s2, size_t i_bytes )
{
u8* p_end = (u8*)p_dest + i_bytes - 8;
......@@ -581,38 +624,3 @@ static void MergeLinear( void *p_dest, const void *p_s1,
}
}
static void MergeBlend( void *p_dest1, void *p_dest2,
const void *p_s1, const void *p_s2, size_t i_bytes )
{
u8* p_end1 = (u8*)p_dest1 + i_bytes - 8;
u8 i;
while( (u8*)p_dest1 < p_end1 )
{
i = ( (u16)(*(u8*)p_s1++) + (u16)(*(u8*)p_s2++) ) >> 1;
*(u8*)p_dest1++ = *(u8*)p_dest2++ = i;
i = ( (u16)(*(u8*)p_s1++) + (u16)(*(u8*)p_s2++) ) >> 1;
*(u8*)p_dest1++ = *(u8*)p_dest2++ = i;
i = ( (u16)(*(u8*)p_s1++) + (u16)(*(u8*)p_s2++) ) >> 1;
*(u8*)p_dest1++ = *(u8*)p_dest2++ = i;
i = ( (u16)(*(u8*)p_s1++) + (u16)(*(u8*)p_s2++) ) >> 1;
*(u8*)p_dest1++ = *(u8*)p_dest2++ = i;
i = ( (u16)(*(u8*)p_s1++) + (u16)(*(u8*)p_s2++) ) >> 1;
*(u8*)p_dest1++ = *(u8*)p_dest2++ = i;
i = ( (u16)(*(u8*)p_s1++) + (u16)(*(u8*)p_s2++) ) >> 1;
*(u8*)p_dest1++ = *(u8*)p_dest2++ = i;
i = ( (u16)(*(u8*)p_s1++) + (u16)(*(u8*)p_s2++) ) >> 1;
*(u8*)p_dest1++ = *(u8*)p_dest2++ = i;
i = ( (u16)(*(u8*)p_s1++) + (u16)(*(u8*)p_s2++) ) >> 1;
*(u8*)p_dest1++ = *(u8*)p_dest2++ = i;
}
p_end1 += 8;
while( (u8*)p_dest1 < p_end1 )
{
i = ( (u16)(*(u8*)p_s1++) + (u16)(*(u8*)p_s2++) ) >> 1;
*(u8*)p_dest1++ = *(u8*)p_dest2++ = i;
}
}
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