summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/man/en/mplayer.159
-rw-r--r--cfg-mplayer.h2
-rw-r--r--codec-cfg.c5
-rwxr-xr-xconfigure39
-rw-r--r--cpudetect.c5
-rw-r--r--etc/codecs.conf13
-rw-r--r--etc/mplayer.desktop25
-rw-r--r--libmpcodecs/img_format.h22
-rw-r--r--libmpcodecs/vf_delogo.c251
-rw-r--r--libmpcodecs/vf_dint.c12
-rw-r--r--libmpcodecs/vf_divtc.c6
-rw-r--r--libmpcodecs/vf_ilpack.c685
-rw-r--r--libmpcodecs/vf_stereo3d.c36
-rw-r--r--libmpdemux/asf.h2
-rw-r--r--libmpdemux/asfheader.c2
-rw-r--r--libmpdemux/demux_lavf.c16
-rw-r--r--libmpdemux/demux_rtp.cpp27
-rw-r--r--libmpdemux/demux_vqf.c4
-rw-r--r--libmpdemux/demuxer.h2
-rw-r--r--libvo/csputils.c6
-rw-r--r--libvo/csputils.h1
-rw-r--r--libvo/gl_common.c4
-rw-r--r--libvo/gl_common.h14
-rw-r--r--libvo/mga_template.c2
-rw-r--r--libvo/vo_direct3d.c5
-rw-r--r--libvo/vo_directx.c508
-rw-r--r--libvo/vo_gl.c23
-rw-r--r--libvo/vo_gl2.c19
-rw-r--r--libvo/vo_jpeg.c4
-rw-r--r--libvo/vo_mpegpes.c2
-rw-r--r--libvo/vo_xv.c9
-rw-r--r--libvo/w32_common.c8
-rw-r--r--libvo/wskeys.h1
-rw-r--r--libvo/x11_common.c8
-rw-r--r--loader/module.c10
-rw-r--r--m_option.c1
-rw-r--r--mplayer.c84
-rw-r--r--playtree.c11
-rw-r--r--playtree.h10
-rw-r--r--playtreeparser.c12
-rw-r--r--stream/cache2.c20
-rw-r--r--stream/network.c4
-rw-r--r--stream/stream.c37
-rw-r--r--stream/stream.h3
-rw-r--r--stream/stream_cdda.c3
-rw-r--r--stream/stream_cue.c52
-rw-r--r--stream/stream_dvd.c10
-rw-r--r--stream/stream_dvdnav.c18
-rw-r--r--stream/stream_pvr.c2
-rw-r--r--stream/tvi_dshow.c25
-rw-r--r--stream/tvi_v4l.c13
-rw-r--r--stream/tvi_v4l2.c13
-rw-r--r--sub/vobsub.c75
53 files changed, 1072 insertions, 1158 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1
index afb12a8027..bbbea0e7c2 100644
--- a/DOCS/man/en/mplayer.1
+++ b/DOCS/man/en/mplayer.1
@@ -3850,21 +3850,22 @@ Do not do any conversion.
Select the scaling function to use for luminance scaling.
Only valid for yuv modes 2, 3, 4 and 6.
.RSss
-0: Use simple linear filtering (default).
-.br
-1: Use bicubic B-spline filtering (better quality).
+.IPs 0
+Use simple linear filtering (default).
+.IPs 1
+Use bicubic B-spline filtering (better quality).
Needs one additional texture unit.
Older cards will not be able to handle this for chroma at least in fullscreen mode.
-.br
-2: Use cubic filtering in horizontal, linear filtering in vertical direction.
+.IPs 2
+Use cubic filtering in horizontal, linear filtering in vertical direction.
Works on a few more cards than method 1.
-.br
-3: Same as 1 but does not use a lookup texture.
+.IPs 3
+Same as 1 but does not use a lookup texture.
Might be faster on some cards.
-.br
-4: Use experimental unsharp masking with 3x3 support and a default strength of 0.5 (see filter-strength).
-.br
-5: Use experimental unsharp masking with 5x5 support and a default strength of 0.5 (see filter-strength).
+.IPs 4
+Use experimental unsharp masking with 3x3 support and a default strength of 0.5 (see filter-strength).
+.IPs 5
+Use experimental unsharp masking with 5x5 support and a default strength of 0.5 (see filter-strength).
.RE
.IPs cscale=<n>
Select the scaling function to use for chrominance scaling.
@@ -3873,16 +3874,17 @@ For details see lscale.
Set the effect strength for the lscale/cscale filters that support it.
.IPs stereo=<value>
Select a method for stereo display.
-You may have to use -aspect to fix the aspect value.
+You may have to use \-aspect to fix the aspect value.
Experimental, do not expect too much from it.
.RSss
-0: Normal 2D display
-.br
-1: left-right split input to full-color red-cyan stereo.
-.br
-2: left-right split input to full-color red-cyan stereo.
-.br
-3: left-right split input to quadbuffered stereo.
+.IPs 0
+normal 2D display
+.IPs 1
+Convert side by side input to full-color red-cyan stereo.
+.IPs 2
+Convert side by side input to full-color green-magenta stereo.
+.IPs 3
+Convert side by side input to quadbuffered stereo.
Only supported by very few OpenGL cards.
.RE
.RE
@@ -7236,6 +7238,10 @@ width and height of the cleared rectangle
Thickness of the fuzzy edge of the rectangle (added to w and h).
When set to \-1, a green rectangle is drawn on the screen to
simplify finding the right x,y,w,h parameters.
+.IPs file=<file>
+You can specify a text file to load the coordinates from.
+Each line must have a timestamp (in seconds, and in ascending order) and the
+"x:y:w:h:t" coordinates (t can be omitted).
.RE
.PD 1
.
@@ -7380,6 +7386,14 @@ right eye)
anaglyph yellow/blue colored (yellow filter on left eye, blue filter on right
eye)
.RE
+.B irl or interleave_rows_left_first
+.RS
+Interleaved rows (left eye has top row, right eye starts on next row)
+.RE
+.B irr or interleave_rows_right_first
+.RS
+Interleaved rows (right eye has top row, left eye starts on next row)
+.RE
.B ml or mono_left
.RS
mono output (left eye only)
@@ -7389,6 +7403,13 @@ mono output (left eye only)
mono output (right eye only)
.RE
.RE
+.I NOTE:
+To use either of the interleaved-rows output formats to display
+full-screen on a row-interleaved 3D display, you will need to scale the
+video to the correct height first using the "scale" filter, if it is not
+already the right height. Typically, that is 1080 rows (so use e.g.
+"-vf scale=1440:1080,stereo3d=sbsl:irl" for a 720p side-by-side encoded
+movie).
.RE
.PD 1
.
diff --git a/cfg-mplayer.h b/cfg-mplayer.h
index 0ada04916a..2bc9ccbf10 100644
--- a/cfg-mplayer.h
+++ b/cfg-mplayer.h
@@ -619,7 +619,7 @@ const m_option_t common_opts[] = {
{"sws", &sws_flags, CONF_TYPE_INT, 0, 0, 2, NULL},
{"ssf", (void *) scaler_filter_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
OPT_MAKE_FLAGS("zoom", softzoom, 0),
- OPT_FLOATRANGE("aspect", movie_aspect, 0, 0.2, 3.0),
+ OPT_FLOATRANGE("aspect", movie_aspect, 0, 0.1, 10.0),
OPT_FLAG_CONSTANTS("noaspect", movie_aspect, 0, 0, 0),
OPT_FLOATRANGE("xy", screen_size_xy, 0, 0.001, 4096),
diff --git a/codec-cfg.c b/codec-cfg.c
index 98b3088516..5237d7fadd 100644
--- a/codec-cfg.c
+++ b/codec-cfg.c
@@ -54,6 +54,7 @@
#endif
+#include <libavutil/avutil.h>
#include "libmpcodecs/img_format.h"
#include "codec-cfg.h"
@@ -96,12 +97,12 @@ static int add_to_fourcc(char *s, char *alias, unsigned int *fourcc,
goto err_out_too_many;
do {
- tmp = mmioFOURCC(s[0], s[1], s[2], s[3]);
+ tmp = MKTAG(s[0], s[1], s[2], s[3]);
for (j = 0; j < i; j++)
if (tmp == fourcc[j])
goto err_out_duplicated;
fourcc[i] = tmp;
- map[i] = alias ? mmioFOURCC(alias[0], alias[1], alias[2], alias[3]) : tmp;
+ map[i] = alias ? MKTAG(alias[0], alias[1], alias[2], alias[3]) : tmp;
s += 4;
i++;
} while ((*(s++) == ',') && --freeslots);
diff --git a/configure b/configure
index 3b011a9a5f..8fb2698e70 100755
--- a/configure
+++ b/configure
@@ -1427,8 +1427,7 @@ else
echores "$cc_version"
break
fi
- cc_name_tmp=$($_cc -v 2>&1 | head -n 1 | cut -d ' ' -f 1)
- if test "$cc_name_tmp" = "clang"; then
+ if $_cc -v 2>&1 | grep -q "clang"; then
echocheck "$_cc version"
cc_vendor=clang
cc_version=$($_cc -dumpversion 2>&1)
@@ -1449,6 +1448,10 @@ else
fi # icc
test "$cc_fail" = yes && die "unsupported compiler version"
+echocheck "working compiler"
+cflag_check "" || die "Compiler is not functioning correctly. Check your installation and custom CFLAGS $CFLAGS ."
+echo "yes"
+
if test -z "$_target" && x86 ; then
cat > $TMPC << EOF
int main(void) {
@@ -1462,10 +1465,6 @@ fi
echo "Detected operating system: $system_name"
echo "Detected host architecture: $host_arch"
-echocheck "host cc"
-test "$_host_cc" || _host_cc=$_cc
-echores $_host_cc
-
echocheck "cross compilation"
if test $_cross_compile = auto ; then
_cross_compile=yes
@@ -1477,8 +1476,13 @@ if test $_cross_compile = yes; then
tmp_run() {
return 0
}
+ test "$_host_cc" || _host_cc=cc
fi
+echocheck "host cc"
+test "$_host_cc" || _host_cc=$_cc
+echores $_host_cc
+
# ---
# now that we know what compiler should be used for compilation, try to find
@@ -1533,14 +1537,13 @@ if x86 ; then
pparam=$(echo $exts | sed -e s/k6_mtrr/mtrr/ -e s/cyrix_arr/mtrr/ -e s/centaur_mcr/mtrr/ \
-e s/xmm/sse/ -e s/kni/sse/)
+ # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
+ pparam=$(echo $pparam | sed -e 's/sse/sse mmxext/')
for ext in $pparam ; do
eval test \"\$_$ext\" = auto 2>/dev/null && eval _$ext=kernel_check
done
- # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
- test $_sse = kernel_check && _mmxext=kernel_check
-
echocheck "CPU vendor"
echores "$pvendor ($pfamily:$pmodel:$pstepping)"
@@ -2555,11 +2558,6 @@ echores "$xform_asm"
fi
if arm ; then
- echocheck "ARM pld instruction"
- pld=no
- inline_asm_check '"pld [r0]"' && pld=yes
- echores "$pld"
-
echocheck "ARMv5TE (Enhanced DSP Extensions)"
if test $_armv5te = "auto" ; then
_armv5te=no
@@ -2605,7 +2603,7 @@ if arm ; then
echores "$_iwmmxt"
fi
-cpuexts_all='ALTIVEC MMX MMX2 AMD3DNOW AMD3DNOWEXT SSE SSE2 SSSE3 FAST_CMOV CMOV FAST_CLZ PLD ARMV5TE ARMV6 ARMV6T2 ARMVFP NEON IWMMXT MMI VIS MVI'
+cpuexts_all='ALTIVEC MMX MMX2 AMD3DNOW AMD3DNOWEXT SSE SSE2 SSSE3 FAST_CMOV CMOV FAST_CLZ ARMV5TE ARMV6 ARMV6T2 ARMVFP NEON IWMMXT MMI VIS MVI'
test "$_altivec" = yes && cpuexts="ALTIVEC $cpuexts"
test "$_mmx" = yes && cpuexts="MMX $cpuexts"
test "$_mmxext" = yes && cpuexts="MMX2 $cpuexts"
@@ -2617,7 +2615,6 @@ test "$_ssse3" = yes && cpuexts="SSSE3 $cpuexts"
test "$_cmov" = yes && cpuexts="CMOV $cpuexts"
test "$_fast_cmov" = yes && cpuexts="FAST_CMOV $cpuexts"
test "$_fast_clz" = yes && cpuexts="FAST_CLZ $cpuexts"
-test "$pld" = yes && cpuexts="PLD $cpuexts"
test "$_armv5te" = yes && cpuexts="ARMV5TE $cpuexts"
test "$_armv6" = yes && cpuexts="ARMV6 $cpuexts"
test "$_armv6t2" = yes && cpuexts="ARMV6T2 $cpuexts"
@@ -3500,12 +3497,15 @@ echores "$_gettimeofday"
echocheck "glob()"
_glob=no
statement_check glob.h 'glob("filename", 0, 0, 0)' && _glob=yes
+need_glob=no
if test "$_glob" = yes ; then
def_glob='#define HAVE_GLOB 1'
- need_glob=no
else
def_glob='#undef HAVE_GLOB'
- need_glob=yes
+ # HACK! need_glob currently enables compilation of a
+ # win32-specific glob()-replacement.
+ # Other OS neither need it nor can they use it (mf:// is disabled for them).
+ win32 && need_glob=yes
fi
echores "$_glob"
@@ -3546,7 +3546,7 @@ fi #if sunos
echocheck "sys/sysinfo.h"
_sys_sysinfo=no
-statement_check sys/sysinfo.h 'struct sysinfo s_info; sysinfo(&s_info)' && _sys_sysinfo=yes
+statement_check sys/sysinfo.h 'struct sysinfo s_info; s_info.mem_unit=0; sysinfo(&s_info)' && _sys_sysinfo=yes
if test "$_sys_sysinfo" = yes ; then
def_sys_sysinfo_h='#define HAVE_SYS_SYSINFO_H 1'
else
@@ -5342,6 +5342,7 @@ if test "$_libcdio" = yes && test "$_cdparanoia" = no ; then
def_libcdio='#define CONFIG_LIBCDIO 1'
def_havelibcdio='yes'
else
+ _libcdio=no
if test "$_cdparanoia" = yes ; then
res_comment="using cdparanoia"
fi
diff --git a/cpudetect.c b/cpudetect.c
index 343d2ac25b..160ec955ea 100644
--- a/cpudetect.c
+++ b/cpudetect.c
@@ -52,6 +52,7 @@ CpuCaps gCpuCaps;
* team for SSE support detection and more cpu detect code.
*/
+#if CONFIG_RUNTIME_CPUDETECT
/* I believe this code works. However, it has only been used on a PII and PIII */
#if defined(__linux__) && defined(_POSIX_SOURCE) && !ARCH_X86_64
@@ -221,6 +222,7 @@ static void check_os_katmai_support( void )
gCpuCaps.hasSSE=0;
#endif /* __linux__ */
}
+#endif
// return TRUE if cpuid supported
@@ -352,6 +354,7 @@ void GetCpuCaps( CpuCaps *caps)
gCpuCaps.has3DNowExt);
#endif
+#if CONFIG_RUNTIME_CPUDETECT
/* FIXME: Does SSE2 need more OS support, too? */
if (caps->hasSSE)
check_os_katmai_support();
@@ -361,7 +364,7 @@ void GetCpuCaps( CpuCaps *caps)
// caps->hasMMX2 = 0;
// caps->hasMMX = 0;
-#if !CONFIG_RUNTIME_CPUDETECT
+#else
#if !HAVE_MMX
if(caps->hasMMX) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"MMX supported but disabled\n");
caps->hasMMX=0;
diff --git a/etc/codecs.conf b/etc/codecs.conf
index 528950723f..e4c2e56bc6 100644
--- a/etc/codecs.conf
+++ b/etc/codecs.conf
@@ -2445,6 +2445,15 @@ videocodec bwmpeg
dll "bw10.dll" ;requires vtaccess.dll
out YV12,YUY2,I420
+videocodec csmscreen
+ info "csmscreen AVI lossless video codec"
+ comment "requires Esdll.dll"
+ status working
+ fourcc CSM0
+ driver vfw
+ dll "csmx.dll" ; b6cfb690fe5997da0f07506c8982334f *CSMX.dll
+ out BGR32,BGR24,BGR16 flip
+
videocodec matchware
info "matchware screen capture codec"
status working
@@ -3278,6 +3287,7 @@ videocodec raw444P
format 0x0 0x50343434
format 0x20776172 0x50343434
fourcc 444p,444P
+ fourcc YV24 444P
out 444P
videocodec raw422P
@@ -3289,6 +3299,7 @@ videocodec raw422P
fourcc 422p,422P
fourcc P422 422P
fourcc Y42B 422P
+ fourcc YV16 422P
out 422P
videocodec rawyv12
@@ -3403,6 +3414,7 @@ videocodec ffraw444P
format 0x0
format 0x20776172
fourcc 444p,444P
+ fourcc YV24
driver ffmpeg
dll rawvideo
@@ -3414,6 +3426,7 @@ videocodec ffraw422P
fourcc 422p,422P
fourcc P422,p422
fourcc Y42B,y42b
+ fourcc YV16,yv16
driver ffmpeg
dll rawvideo
diff --git a/etc/mplayer.desktop b/etc/mplayer.desktop
index 77b653e933..c7c9648524 100644
--- a/etc/mplayer.desktop
+++ b/etc/mplayer.desktop
@@ -1,15 +1,24 @@
[Desktop Entry]
Type=Application
-Name=MPlayer Media Player
-Name[ca]=Reproductor multimèdia MPlayer
-GenericName=Multimedia player
+Name=MPlayer
+GenericName=Media Player
+GenericName[ca]=Reproductor multimèdia
+GenericName[de]=Medienwiedergabe
+GenericName[fr]=Lecteur multimédia
+GenericName[it]=Lettore multimediale
+GenericName[ja]=メディアプレーヤー
+X-GNOME-FullName=MPlayer Media Player
+X-GNOME-FullName[ca]=MPlayer Reproductor multimèdia
+X-GNOME-FullName[de]=MPlayer Medienwiedergabe
+X-GNOME-FullName[fr]=MPlayer Lecteur multimédia
+X-GNOME-FullName[it]=MPlayer Lettore multimediale
+X-GNOME-FullName[ja]=MPlayer メディアプレーヤー
Comment=Play movies and songs
Comment[ca]=Reproduïu vídeos i cançons
-Comment[de]=Filme und Musik abspielen
-Comment[es]=Reproduzca vídeos y canciones
-Comment[fr]=Lecteur multimédia
-Comment[it]=Lettore multimediale
-Comment[zh]=多媒体播放器
+Comment[de]=Filme und Musik wiedergeben
+Comment[fr]=Lit les films et musiques
+Comment[it]=Riproduce filmati e musica
+Comment[ja]=動画や音声のファイルを再生します
Icon=mplayer
TryExec=gmplayer
Exec=gmplayer %F
diff --git a/libmpcodecs/img_format.h b/libmpcodecs/img_format.h
index 2fc9775ee1..60adc5c038 100644
--- a/libmpcodecs/img_format.h
+++ b/libmpcodecs/img_format.h
@@ -164,26 +164,26 @@
/* Packed YUV Formats */
-#define IMGFMT_IUYV 0x56595549
-#define IMGFMT_IY41 0x31435949
+#define IMGFMT_IUYV 0x56595549 // Interlaced UYVY
+#define IMGFMT_IY41 0x31435949 // Interlaced Y41P
#define IMGFMT_IYU1 0x31555949
#define IMGFMT_IYU2 0x32555949
#define IMGFMT_UYVY 0x59565955
-#define IMGFMT_UYNV 0x564E5955
-#define IMGFMT_cyuv 0x76757963
-#define IMGFMT_Y422 0x32323459
+#define IMGFMT_UYNV 0x564E5955 // Exactly same as UYVY
+#define IMGFMT_cyuv 0x76757963 // upside-down UYVY
+#define IMGFMT_Y422 0x32323459 // Exactly same as UYVY
#define IMGFMT_YUY2 0x32595559
-#define IMGFMT_YUNV 0x564E5559
+#define IMGFMT_YUNV 0x564E5559 // Exactly same as YUY2
#define IMGFMT_YVYU 0x55595659
#define IMGFMT_Y41P 0x50313459
#define IMGFMT_Y211 0x31313259
-#define IMGFMT_Y41T 0x54313459
-#define IMGFMT_Y42T 0x54323459
-#define IMGFMT_V422 0x32323456
+#define IMGFMT_Y41T 0x54313459 // Y41P, Y lsb = transparency
+#define IMGFMT_Y42T 0x54323459 // UYVY, Y lsb = transparency
+#define IMGFMT_V422 0x32323456 // upside-down UYVY?
#define IMGFMT_V655 0x35353656
#define IMGFMT_CLJR 0x524A4C43
-#define IMGFMT_YUVP 0x50565559
-#define IMGFMT_UYVP 0x50565955
+#define IMGFMT_YUVP 0x50565559 // 10-bit YUYV
+#define IMGFMT_UYVP 0x50565955 // 10-bit UYVY
/* Compressed Formats */
#define IMGFMT_MPEGPES (('M'<<24)|('P'<<16)|('E'<<8)|('S'))
diff --git a/libmpcodecs/vf_delogo.c b/libmpcodecs/vf_delogo.c
index 342c88ee59..8fcc869c91 100644
--- a/libmpcodecs/vf_delogo.c
+++ b/libmpcodecs/vf_delogo.c
@@ -24,6 +24,8 @@
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
+#include <limits.h>
+#include <errno.h>
#include <math.h>
#include "mp_msg.h"
@@ -41,16 +43,65 @@
static struct vf_priv_s {
unsigned int outfmt;
int xoff, yoff, lw, lh, band, show;
+ const char *file;
+ struct timed_rectangle {
+ int ts, x, y, w, h, b;
+ } *timed_rect;
+ int n_timed_rect;
+ int cur_timed_rect;
} const vf_priv_dflt = {
0,
- 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0,
+ NULL, NULL, 0, 0,
};
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
+/**
+ * Adjust the coordinates to suit the band width
+ * Also print a notice in verbose mode
+ */
+static void fix_band(struct vf_priv_s *p)
+{
+ p->show = 0;
+ if (p->band < 0) {
+ p->band = 4;
+ p->show = 1;
+ }
+ p->lw += p->band*2;
+ p->lh += p->band*2;
+ p->xoff -= p->band;
+ p->yoff -= p->band;
+ mp_msg(MSGT_VFILTER, MSGL_V, "delogo: %d x %d, %d x %d, band = %d\n",
+ p->xoff, p->yoff, p->lw, p->lh, p->band);
+}
+
+static void update_sub(struct vf_priv_s *p, double pts)
+{
+ int ipts = pts * 1000;
+ int tr = p->cur_timed_rect;
+ while (tr < p->n_timed_rect - 1 && ipts >= p->timed_rect[tr + 1].ts)
+ tr++;
+ while (tr >= 0 && ipts < p->timed_rect[tr].ts)
+ tr--;
+ if (tr == p->cur_timed_rect)
+ return;
+ p->cur_timed_rect = tr;
+ if (tr >= 0) {
+ p->xoff = p->timed_rect[tr].x;
+ p->yoff = p->timed_rect[tr].y;
+ p->lw = p->timed_rect[tr].w;
+ p->lh = p->timed_rect[tr].h;
+ p->band = p->timed_rect[tr].b;
+ } else {
+ p->xoff = p->yoff = p->lw = p->lh = p->band = 0;
+ }
+ fix_band(p);
+}
+
static void delogo(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int width, int height,
- int logo_x, int logo_y, int logo_w, int logo_h, int band, int show, int direct) {
+ int logo_x, int logo_y, int logo_w, int logo_h, int band, int show, int direct) {
int y, x;
int interp, dist;
uint8_t *xdst, *xsrc;
@@ -80,46 +131,46 @@ static void delogo(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int
for(y = logo_y1+1; y < logo_y2-1; y++)
{
- for (x = logo_x1+1, xdst = dst+logo_x1+1, xsrc = src+logo_x1+1; x < logo_x2-1; x++, xdst++, xsrc++) {
- interp = ((topleft[srcStride*(y-logo_y-yclipt)]
- + topleft[srcStride*(y-logo_y-1-yclipt)]
- + topleft[srcStride*(y-logo_y+1-yclipt)])*(logo_w-(x-logo_x))/logo_w
- + (topright[srcStride*(y-logo_y-yclipt)]
- + topright[srcStride*(y-logo_y-1-yclipt)]
- + topright[srcStride*(y-logo_y+1-yclipt)])*(x-logo_x)/logo_w
- + (topleft[x-logo_x-xclipl]
- + topleft[x-logo_x-1-xclipl]
- + topleft[x-logo_x+1-xclipl])*(logo_h-(y-logo_y))/logo_h
- + (botleft[x-logo_x-xclipl]
- + botleft[x-logo_x-1-xclipl]
- + botleft[x-logo_x+1-xclipl])*(y-logo_y)/logo_h
- )/6;
-/* interp = (topleft[srcStride*(y-logo_y)]*(logo_w-(x-logo_x))/logo_w
- + topright[srcStride*(y-logo_y)]*(x-logo_x)/logo_w
- + topleft[x-logo_x]*(logo_h-(y-logo_y))/logo_h
- + botleft[x-logo_x]*(y-logo_y)/logo_h
- )/2;*/
- if (y >= logo_y+band && y < logo_y+logo_h-band && x >= logo_x+band && x < logo_x+logo_w-band) {
- *xdst = interp;
- } else {
- dist = 0;
- if (x < logo_x+band) dist = MAX(dist, logo_x-x+band);
- else if (x >= logo_x+logo_w-band) dist = MAX(dist, x-(logo_x+logo_w-1-band));
- if (y < logo_y+band) dist = MAX(dist, logo_y-y+band);
- else if (y >= logo_y+logo_h-band) dist = MAX(dist, y-(logo_y+logo_h-1-band));
- *xdst = (*xsrc*dist + interp*(band-dist))/band;
- if (show && (dist == band-1)) *xdst = 0;
- }
- }
-
- dst+= dstStride;
- src+= srcStride;
+ for (x = logo_x1+1, xdst = dst+logo_x1+1, xsrc = src+logo_x1+1; x < logo_x2-1; x++, xdst++, xsrc++) {
+ interp = ((topleft[srcStride*(y-logo_y-yclipt)]
+ + topleft[srcStride*(y-logo_y-1-yclipt)]
+ + topleft[srcStride*(y-logo_y+1-yclipt)])*(logo_w-(x-logo_x))/logo_w
+ + (topright[srcStride*(y-logo_y-yclipt)]
+ + topright[srcStride*(y-logo_y-1-yclipt)]
+ + topright[srcStride*(y-logo_y+1-yclipt)])*(x-logo_x)/logo_w
+ + (topleft[x-logo_x-xclipl]
+ + topleft[x-logo_x-1-xclipl]
+ + topleft[x-logo_x+1-xclipl])*(logo_h-(y-logo_y))/logo_h
+ + (botleft[x-logo_x-xclipl]
+ + botleft[x-logo_x-1-xclipl]
+ + botleft[x-logo_x+1-xclipl])*(y-logo_y)/logo_h
+ )/6;
+/* interp = (topleft[srcStride*(y-logo_y)]*(logo_w-(x-logo_x))/logo_w
+ + topright[srcStride*(y-logo_y)]*(x-logo_x)/logo_w
+ + topleft[x-logo_x]*(logo_h-(y-logo_y))/logo_h
+ + botleft[x-logo_x]*(y-logo_y)/logo_h
+ )/2;*/
+ if (y >= logo_y+band && y < logo_y+logo_h-band && x >= logo_x+band && x < logo_x+logo_w-band) {
+ *xdst = interp;
+ } else {
+ dist = 0;
+ if (x < logo_x+band) dist = MAX(dist, logo_x-x+band);
+ else if (x >= logo_x+logo_w-band) dist = MAX(dist, x-(logo_x+logo_w-1-band));
+ if (y < logo_y+band) dist = MAX(dist, logo_y-y+band);
+ else if (y >= logo_y+logo_h-band) dist = MAX(dist, y-(logo_y+logo_h-1-band));
+ *xdst = (*xsrc*dist + interp*(band-dist))/band;
+ if (show && (dist == band-1)) *xdst = 0;
+ }
+ }
+
+ dst+= dstStride;
+ src+= srcStride;
}
}
static int config(struct vf_instance *vf,
- int width, int height, int d_width, int d_height,
- unsigned int flags, unsigned int outfmt){
+ int width, int height, int d_width, int d_height,
+ unsigned int flags, unsigned int outfmt){
return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
}
@@ -130,15 +181,15 @@ static void get_image(struct vf_instance *vf, mp_image_t *mpi){
if(mpi->imgfmt!=vf->priv->outfmt) return; // colorspace differ
// ok, we can do pp in-place (or pp disabled):
vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
- mpi->type, mpi->flags, mpi->w, mpi->h);
+ mpi->type, mpi->flags, mpi->w, mpi->h);
mpi->planes[0]=vf->dmpi->planes[0];
mpi->stride[0]=vf->dmpi->stride[0];
mpi->width=vf->dmpi->width;
if(mpi->flags&MP_IMGFLAG_PLANAR){
mpi->planes[1]=vf->dmpi->planes[1];
mpi->planes[2]=vf->dmpi->planes[2];
- mpi->stride[1]=vf->dmpi->stride[1];
- mpi->stride[2]=vf->dmpi->stride[2];
+ mpi->stride[1]=vf->dmpi->stride[1];
+ mpi->stride[2]=vf->dmpi->stride[2];
}
mpi->flags|=MP_IMGFLAG_DIRECT;
}
@@ -147,22 +198,24 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
mp_image_t *dmpi;
if(!(mpi->flags&MP_IMGFLAG_DIRECT)){
- // no DR, so get a n