summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-08-12 15:03:34 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-08-12 15:03:34 +0300
commite09fe1ce0413609b891f4abf2f5df5f1996622a0 (patch)
tree4624712ba8f4773463272c44513a86af6accc9da
parent9425571f41d5cca40ec75537cdac3e474948f047 (diff)
parentf88bf0c7b7faf4b6f58c8b4c9c0f3892e07dc5ba (diff)
downloadmpv-e09fe1ce0413609b891f4abf2f5df5f1996622a0.tar.bz2
mpv-e09fe1ce0413609b891f4abf2f5df5f1996622a0.tar.xz
Merge svn changes up to r27458
-rw-r--r--Changelog13
-rw-r--r--DOCS/man/en/mplayer.15
-rw-r--r--DOCS/man/fr/mplayer.125
-rw-r--r--DOCS/man/zh/mplayer.140
-rw-r--r--Makefile7
-rw-r--r--cfg-common.h9
-rwxr-xr-xconfigure12
-rw-r--r--etc/codecs.conf2
-rw-r--r--libass/ass_render.c13
-rw-r--r--libmpdemux/demux_rtp_codec.cpp1
-rw-r--r--libvo/vo_x11.c3
-rw-r--r--libvo/vo_xvmc.c2
-rw-r--r--mplayer.c2
-rw-r--r--vidix/AsmMacros.h2
-rw-r--r--vidix/dha.c2
-rw-r--r--vidix/drivers.c4
-rw-r--r--vidix/pci.c6
-rw-r--r--vidix/sh_veu_vid.c594
-rw-r--r--vidix/sysdep/pci_linux.c6
19 files changed, 689 insertions, 59 deletions
diff --git a/Changelog b/Changelog
index e049cc30f3..92e6c122d5 100644
--- a/Changelog
+++ b/Changelog
@@ -11,6 +11,8 @@ MPlayer (1.0)
EA Maxis XA ADPCM audio, RL2 video, Beam Software SIFF video, V.Flash PTX video
* AVOption support for libavcodec-based decoders
* image decoders: Sun rasterfile, PCX image
+ * MLP decoder via lavc
+ * use lavc ADPCM codecs by default
Demuxers:
* -lavfdopts cryptokey allows decrypting MXF and ASF files
@@ -26,6 +28,7 @@ MPlayer (1.0)
* support MOV subtitle format
* support for attachments in lavf demuxer
* support for chapters in lavf demuxer
+ * Flac speedup in lavf demuxer
Filters:
* vf_ow new overcomplete wavelet denoiser
@@ -43,21 +46,26 @@ MPlayer (1.0)
FFmpeg/libavcodec:
* DNxHD (SMPTE VC-3) encoder
* H.264 speedup and PAFF decoding
+ * correctly decode more of the H.264 conformance testsuite
* Nellymoser audio codec
* VC-1/WMV3 MMX optimizations
* VP3 decoder speedup
+ * Split-Radix FFT (speedup multiple audio codecs)
+ * MMX/SSE/ARM and other misc speedups
libmpeg2:
* enable Alpha/ARM optimizations in libmpeg2
* SSE2-optimized IDCT routines from upstream libmpeg2
+ * synced with upstream
Drivers:
* replace PolypAudio by PulseAudio (-ao pulse)
* add force-pbo suboption for faster output in vo_gl
* add Nintendo Wii/GameCube video driver (-vo wii)
+ * VIDIX driver for SuperH Mobile VEU hardware block.
+ * support -border on vo_gl/gl2 in x11
MEncoder:
- * Ogg muxing using -of lavf -o done.ogg
* check for system-wide configuration file in MEncoder
* AVOption support for lavc encoders
* AVOption support for lavf muxers
@@ -73,12 +81,15 @@ MPlayer (1.0)
* add options to disable some or all configuration files
* support for DOS-style file:///x:/path paths
* some new slave commands (check DOCS/tech/slave.txt)
+ * misc fixes to libass
Ports:
* small crash with vo_macosx fixed
* AC3/DTS passthrough for ao_macosx
* fix frozen OSD on Mac OS X
* vo_gl now works with -wid and nVidia drivers on Windows (this is a hack)
+ * VIDIX on SuperH.
+ * intentionally break gcc 3.3 on mac os x, please use 4.x
rc2try2:
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1
index 33301f5fc3..7e06545b80 100644
--- a/DOCS/man/en/mplayer.1
+++ b/DOCS/man/en/mplayer.1
@@ -3459,8 +3459,9 @@ Very fast video output driver on cards that support it.
.RSs
.IPs <subdevice>
Explicitly choose the VIDIX subdevice driver to use.
-Available subdevice drivers are cyberblade, mach64,
-mga_crtc2, mga, nvidia, pm2, pm3, radeon, rage128, sis_vid and unichrome.
+Available subdevice drivers are cyberblade, ivtv, mach64,
+mga_crtc2, mga, nvidia, pm2, pm3, radeon, rage128, s3, sh_veu,
+sis_vid and unichrome.
.RE
.PD 1
.
diff --git a/DOCS/man/fr/mplayer.1 b/DOCS/man/fr/mplayer.1
index 637bc4c82c..9fd199e428 100644
--- a/DOCS/man/fr/mplayer.1
+++ b/DOCS/man/fr/mplayer.1
@@ -3229,7 +3229,7 @@ Corrige le basculement en mode plein-cran sur OpenBox 1.x.
.
.TP
.B \-geometry x[%][:y[%]] ou [WxH][+x+y]
-Ajuste la position d'origine sur l'cran de la sortie.
+Ajuste la position d'origine sur l'cran de sortie.
Les variables x et y sont en pixels mesurs partir du coin suprieur droit
de l'cran jusqu'au coin suprieur droit de la vido affiche, cependant si
un signe pourcentage est indiqu aprs la variable, cette valeur est alors
@@ -3417,7 +3417,7 @@ Utile pour intgrer MPlayer dans un navigateur (avec l'extension plugger
par exemple).
.
.TP
-.B \-xineramascreen <\-2\-...> (X11 uniquement)
+.B \-xineramascreen <\-2\-...>
Dans les configurations xinerama (c'est dire un bureau unique s'tendant sur
plusieurs crans, cette option dit MPlayer sur quel cran afficher le film.
La valeur \-2 signifie plein cran sur la totalit de l'cran virtuel, (dans ce
@@ -3427,6 +3427,9 @@ La position initiale dfinie par l'option \-geometry est relative l'cran
dfini.
Fontionnera gnralement uniquement avec "\-fstype \-fullscreen" ou
"\-fstype none".
+Cette option ne convient pour dfinir l'cran de dmarrage (de mme pour
+l'cran en mode plein cran), \-geometry est plus appropri.
+Gr par les pilotes de sortie vido gl, gl2, x11, et xv.
.
.TP
.B \-zrbw (\-vo zr uniquement)
@@ -3647,8 +3650,9 @@ Pilote de sortie vido trs rapide sur les cartes le grant.
.RSs
.IPs <sous-priphrique>
Choisi explicitement le sous-priphrique utiliser.
-Les pilotes de sous-priphrique existant sont cyberblade,
-mach64, mga_crtc2, mga, nvidia, pm2, pm3, radeon, rage128, sis et unichrome.
+Les pilotes de sous-priphrique existant sont cyberblade, ivtv,
+mach64, mga_crtc2, mga, nvidia, pm2, pm3, radeon, rage128, s3, sh_veu,
+sis et unichrome.
.RE
.PD 1
.
@@ -8655,25 +8659,14 @@ plus les quantum seront semblables d'une trame l'autre
.B vqcomp=<0.0\-1.0>
Compression quantum, vrc_eq dpend de cette option (passe 1/2)
(par dfaut\ : 0.5).
-Par exemple, en prenant l'quation de contrle de flux (rate control) par
-dfaut, si vqcomp=1.0, le contrle de flux alloue chaque trame le nombre
-de bits ncessaire pour qu'elles soient toutes encodes avec le mme quantum
-(que cela soit ncessaire ou non).
-Si vqcomp=0.0, le contrle de flux alloue chaque trame le mme nombre de
-bits, c--d un encodage dbit binaire strictement constant.
.I NOTE\ :
-Ceci sont des exemples extrmes et ne devraient jamais tre utilises.
-La qualit subjective tant optimale pour des valeurs entre ces deux extrmes.
+La qualit subjective sera optimale pour des valeurs entre ces deux extrmes.
.
.TP
.B vrc_eq=<quation>
quation principale de contrle de dbit (passe 1/2)
.RE
.RSs
-.IPs "1\ \ \ \ "
-constant bitrate
-.IPs "tex\ \ "
-qualit constante
.IPs 1+(tex/\:avgTex-1)*qComp
approximativement l'quation de l'ancien code de contrle de dbit
.IPs tex^qComp
diff --git a/DOCS/man/zh/mplayer.1 b/DOCS/man/zh/mplayer.1
index 9bd347d59e..8c91fcace0 100644
--- a/DOCS/man/zh/mplayer.1
+++ b/DOCS/man/zh/mplayer.1
@@ -1,4 +1,4 @@
-.\" sync with en/mplayer.1 r27132
+.\" sync with en/mplayer.1 r27348
.\" Encoding: UTF-8
.\" Reminder of hard terms which need better/final solution later:
.\" /capture; playtree in parent list; colorkey; retrace; desync; downmix;
@@ -73,7 +73,7 @@ mencoder \- 影视编解码器
.
.br
.B mplayer
-[dvd|dvdnav]://[标题|[开始标题]\-结束标题]
+[dvd|dvdnav]://[标题|[开始标题]\-结束标题][/设备]
[选项]
.
.br
@@ -835,7 +835,7 @@ MOUSE_BTN0\-MOUSE_BTN0_DBL。
xv, xvidix 和 dfbmga。
.
.TP
-.B \-framedrop(也请参见 \-hardframedrop,未指定 -no-correct-pts 时只可用于实验)
+.B \-framedrop(也请参见 \-hardframedrop,未使用 \-nocorrect\-pts 时只可用于实验)
跳过显示一些帧从而在慢的机器上保持 A/V 同步。
视频滤镜不会应用到这些帧上。对于 B-帧 甚至解码也完全跳过。
.
@@ -849,7 +849,7 @@ xv, xvidix 和 dfbmga。
显示简短的选项概要。
.
.TP
-.B \-hardframedrop(未指定 -no-correct-pts 时只可用于实验)
+.B \-hardframedrop(未使用 \-nocorrect\-pts 时只可用于实验)
更加密集的丢帧(中断解码过程)。将导致图像失真!
注意,libmpeg2 解码器尤其可能在使用该选项后崩溃,所以请考虑使用
“\-vc ffmpeg12,”。
@@ -986,6 +986,10 @@ n 大小的 FIFO 能容纳 (n\-1) 缓冲事件。
必须选择 DVD 菜单中的按钮。
.
.TP
+.B \-noar
+关闭对于 AppleIR 的支持。
+.
+.TP
.B \-noconsolecontrols
阻止 MPlayer 读取标准输入的键盘事件。
读取标准输入的数据时有用。命令行中发现 \- 会自动启用。
@@ -1002,10 +1006,6 @@ n 大小的 FIFO 能容纳 (n\-1) 缓冲事件。
关闭支持 LIRC。
.
.TP
-.B \-noar
-关闭对于苹果 IR 遥控器的支持。
-.
-.TP
.B \-nomouseinput
停用鼠标键 按/\:放 输入 (mozplayerxp 的上下文菜单依赖此选项)。
.
@@ -2701,7 +2701,6 @@ If not specified mplayer will search the first usable card.
.B \-border
使用窗口边框和装饰来播放电影。
既然默认是启用, 使用 \-noborder 停用标准的窗口装饰。
-被 directx 视频输出驱动支持。
.
.TP
.B \-brightness <\-100\-100>
@@ -3035,13 +3034,19 @@ ggi 和 gl2 的都支持此功能。
把 MPlayer 嵌入浏览器(比如 plugger 扩展)时有用。
.
.TP
-.B \-xineramascreen <\-2\-...> (仅用于 X11)
+.B \-xineramascreen <\-2\-...>
在 Xinerama 配置中(就是一个单一桌面展开在多个显示器上),
此选项告诉 MPlayer 把电影显示在哪个屏幕上。
值 \-2 表示全屏幕展开到整个虚拟的显示屏幕上(在这种情况下将完全忽略Xinerama的信
息),\-1 表示在目前窗口所在的显示屏上全屏幕。
通过 \-geometry 选项设置的初始位置是相对于指定屏幕的。
通常只能与 "\-fstype \-fullscreen" 或 "\-fstype none" 一起工作。
+该选项不适用于仅仅设置启动屏幕(也不适用于设置全屏屏幕),\-geometry 是目前可用
+于此目前的最好选项。
+This option is not suitable to only set the startup screen (and not also the
+fullscreen screen), \-geometry is the best that is available for that purpose
+currently.
+Supported by the gl, gl2, x11, and xv video output drivers.
.
.TP
.B \-zrbw (仅用于 \-vo zr)
@@ -4983,7 +4988,7 @@ unsigned long long counter /*用于保持同步, 更新每次
.br
该过滤器的工作方式是以正常速度播放 \'stride\' ms 的音频,而消耗的是
\'stride*scale\' ms 的输入音频。
-通过把一个跨度域内的 'overlap'% 的内容,与紧接着前一个跨度域的音频混合在一起,把各个
+通过把一个跨度域内的 \'overlap\'% 的内容,与紧接着前一个跨度域的音频混合在一起,把各个
跨度域拼接在一起。
也可以让该选项对后 \'search\' ms 的音频作一个短小的统计性分析,以判定最佳的重叠位置。
.PD 0
@@ -5011,7 +5016,7 @@ unsigned long long counter /*用于保持同步, 更新每次
设置播放速度改变时的反应。
.RSss
.IPs tempo
-改变音频节奏以使其与播放速度同步(默认值)
+改变音频节奏以使其与播放速度同步(默认值)。
.IPs pitch
抵消过滤器产生的效果。
改变声音间隔而不改变音频节奏。
@@ -5020,9 +5025,9 @@ unsigned long long counter /*用于保持同步, 更新每次
.I 警告:
与视频的同步变差。
.IPs both
-同时改变节奏和间隔
+同时改变节奏和间隔。
.IPs none
-忽略速度的改变
+忽略速度的改变。
.RE
.RE
.sp 1
@@ -9829,6 +9834,10 @@ Sony 数字视频容器格式
有时需要提高这个值以防止“缓冲下溢”。
.
.TP
+.B "o\ \ \ \ \ \ "
+FIXME:无说明文档
+.
+.TP
.B packetsize=<size>
所选格式单个数据包的大小,以字节为单位表示。
当将流合并至MPEG[12]的实现格式时,默认值为:
@@ -9839,9 +9848,6 @@ Sony 数字视频容器格式
当前只对MPEG[12]有意义:单位为秒,对于任意出现的流,输出流参照计时器(SCR)和解
码时间戳(DTS)间的初始差距(流分离至解码间的延迟)。
.
-.TP
-.B "o\ \ \ \ \ \ "
-FIXME:没有说明文档
.
.
.
diff --git a/Makefile b/Makefile
index a55d2944a5..a7998061cf 100644
--- a/Makefile
+++ b/Makefile
@@ -598,6 +598,7 @@ SRCS_MPLAYER-$(VIDIX_PM3) += vidix/pm3_vid.c
SRCS_MPLAYER-$(VIDIX_RADEON) += vidix/radeon_vid.c
SRCS_MPLAYER-$(VIDIX_RAGE128) += vidix/rage128_vid.c
SRCS_MPLAYER-$(VIDIX_S3) += vidix/s3_vid.c
+SRCS_MPLAYER-$(VIDIX_SH_VEU) += vidix/sh_veu_vid.c
SRCS_MPLAYER-$(VIDIX_SIS) += vidix/sis_vid.c vidix/sis_bridge.c
SRCS_MPLAYER-$(VIDIX_UNICHROME) += vidix/unichrome_vid.c
@@ -1058,7 +1059,13 @@ dhahelperwinclean:
+# Do not include dependencies when they are about to be removed anyway
+# or if SKIP_DEPS was set to "yes" on the command line.
+ifneq ($(MAKECMDGOALS),distclean)
+ifneq ($(SKIP_DEPS),yes)
-include $(DEPS)
+endif
+endif
.PHONY: all doxygen *install* *tools drivers dhahelper*
.PHONY: checkheaders *clean dep depend tests
diff --git a/cfg-common.h b/cfg-common.h
index 2b0122c353..607333a52d 100644
--- a/cfg-common.h
+++ b/cfg-common.h
@@ -139,7 +139,6 @@ const m_option_t tvopts_conf[]={
};
#endif /* CONFIG_TV */
-#ifdef CONFIG_PVR
extern int pvr_param_aspect_ratio;
extern int pvr_param_sample_rate;
extern int pvr_param_audio_layer;
@@ -150,6 +149,7 @@ extern char *pvr_param_bitrate_mode;
extern int pvr_param_bitrate_peak;
extern char *pvr_param_stream_type;
+#ifdef CONFIG_PVR
const m_option_t pvropts_conf[]={
{"aspect", &pvr_param_aspect_ratio, CONF_TYPE_INT, 0, 1, 4, NULL},
{"arate", &pvr_param_sample_rate, CONF_TYPE_INT, 0, 32000, 48000, NULL},
@@ -164,11 +164,7 @@ const m_option_t pvropts_conf[]={
};
#endif /* CONFIG_PVR */
-#ifdef CONFIG_DVBIN
-#include "stream/dvbin.h"
extern const m_config_t dvbin_opts_conf[];
-#endif
-
extern const m_option_t lavfdopts_conf[];
extern int rtspStreamOverTCP;
@@ -346,10 +342,9 @@ const m_option_t msgl_config[]={
};
-#ifdef WIN32
-
extern char * proc_priority;
+#ifdef WIN32
struct {
char* name;
int prio;
diff --git a/configure b/configure
index 23cec50441..48c2a6d062 100755
--- a/configure
+++ b/configure
@@ -4287,6 +4287,8 @@ _def_vidix_drv_rage128='#undef CONFIG_VIDIX_DRV_RAGE128'
_vidix_drv_rage128=no
_def_vidix_drv_s3='#undef CONFIG_VIDIX_DRV_S3'
_vidix_drv_s3=no
+_def_vidix_drv_sh_veu='#undef CONFIG_VIDIX_DRV_SH_VEU'
+_vidix_drv_sh_veu=no
_def_vidix_drv_sis='#undef CONFIG_VIDIX_DRV_SIS'
_vidix_drv_sis=no
_def_vidix_drv_unichrome='#undef CONFIG_VIDIX_DRV_UNICHROME'
@@ -4303,11 +4305,12 @@ if test "$_vidix" = yes ; then
_def_vidix='#define CONFIG_VIDIX 1'
_vosrc="$_vosrc vo_cvidix.c"
_vomodules="cvidix $_vomodules"
- test "$_vidix_drivers" || _vidix_drivers="cyberblade ivtv mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sis unichrome"
+ test "$_vidix_drivers" || _vidix_drivers="cyberblade ivtv mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
test $_ivtv = "yes" || _vidix_drivers=`echo $_vidix_drivers | sed s/ivtv//`
- # some vidix drivers are meant to work on x86 only, discard them elsewhere
+ # some vidix drivers are architecture and os specific, discard them elsewhere
x86 || _vidix_drivers=`echo $_vidix_drivers | sed -e s/cyberblade// -e s/sis// -e s/unichrome// -e s/s3//`
+ (test $host_arch = "sh" && linux) || _vidix_drivers=`echo $_vidix_drivers | sed s/sh_veu//`
for driver in $_vidix_drivers ; do
uc_driver=`echo $driver | tr '[a-z]' '[A-Z]'`
@@ -6873,8 +6876,9 @@ echocheck "mencoder"
if test "$_mencoder" = yes ; then
_def_muxers='#define CONFIG_MUXERS 1'
else
- # mpeg1video for vf_lavc, snow for vf_uspp and vf_mcdeint
+ # mpeg1video for vf_lavc, snow for vf_uspp and vf_mcdeint, png for vf_screenshot
_libavencoders="MPEG1VIDEO_ENCODER SNOW_ENCODER"
+ test "$_zlib" = yes && _libavencoders="$_libavencoders PNG_ENCODER"
_libavmuxers=""
fi
echores "$_mencoder"
@@ -7895,6 +7899,7 @@ VIDIX_PM3=$_vidix_drv_pm3
VIDIX_RADEON=$_vidix_drv_radeon
VIDIX_RAGE128=$_vidix_drv_rage128
VIDIX_S3=$_vidix_drv_s3
+VIDIX_SH_VEU=$_vidix_drv_sh_veu
VIDIX_SIS=$_vidix_drv_sis
VIDIX_UNICHROME=$_vidix_drv_unichrome
VSTREAM = $_vstream
@@ -8622,6 +8627,7 @@ $_def_vidix_drv_pm3
$_def_vidix_drv_radeon
$_def_vidix_drv_rage128
$_def_vidix_drv_s3
+$_def_vidix_drv_sh_veu
$_def_vidix_drv_sis
$_def_vidix_drv_unichrome
$_def_vidix_pfx
diff --git a/etc/codecs.conf b/etc/codecs.conf
index cd00c4d210..14b0f42d68 100644
--- a/etc/codecs.conf
+++ b/etc/codecs.conf
@@ -1,5 +1,5 @@
;=============================================================================
-; Default codecs config file. It replaces the old codecs.c file!
+; Default codecs config file.
; Before editing this file, please read DOCS/tech/codecs.conf.txt !
;=============================================================================
diff --git a/libass/ass_render.c b/libass/ass_render.c
index 894d8e6711..df75aeb76e 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -161,6 +161,7 @@ typedef struct render_context_s {
uint32_t fade; // alpha from \fad
char be; // blur edges
int shadow;
+ int drawing_mode; // not implemented; when != 0 text is discarded, except for style override tags
effect_t effect_type;
int effect_timing;
@@ -1028,6 +1029,13 @@ static char* parse_tag(char* p, double pwr) {
render_context.shadow = val;
else
render_context.shadow = render_context.style->Shadow;
+ } else if (mystrcmp(&p, "pbo")) {
+ (void)strtol(p, &p, 10); // ignored
+ } else if (mystrcmp(&p, "p")) {
+ int val;
+ if (!mystrtoi(&p, 10, &val))
+ val = 0;
+ render_context.drawing_mode = !!val;
}
return p;
@@ -1203,6 +1211,7 @@ static void init_render_context(ass_event_t* event)
render_context.clip_y1 = frame_context.track->PlayResY;
render_context.detect_collisions = 1;
render_context.fade = 0;
+ render_context.drawing_mode = 0;
render_context.effect_type = EF_NONE;
render_context.effect_timing = 0;
render_context.effect_skip_timing = 0;
@@ -1750,7 +1759,9 @@ static int ass_render_event(ass_event_t* event, event_images_t* event_images)
while (1) {
// get next char, executing style override
// this affects render_context
- code = get_next_char(&p);
+ do {
+ code = get_next_char(&p);
+ } while (code && render_context.drawing_mode); // skip everything in drawing mode
// face could have been changed in get_next_char
if (!render_context.font) {
diff --git a/libmpdemux/demux_rtp_codec.cpp b/libmpdemux/demux_rtp_codec.cpp
index 4dd2a1908f..15d9fd0be4 100644
--- a/libmpdemux/demux_rtp_codec.cpp
+++ b/libmpdemux/demux_rtp_codec.cpp
@@ -198,6 +198,7 @@ void rtpCodecInitialize_audio(demuxer_t* demuxer,
sh_audio->wf = wf;
demux_stream_t* d_audio = demuxer->audio;
d_audio->sh = sh_audio; sh_audio->ds = d_audio;
+ d_audio->id = sh_audio->aid;
wf->nChannels = subsession->numChannels();
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c
index ac8c0191bd..c3692cad58 100644
--- a/libvo/vo_x11.c
+++ b/libvo/vo_x11.c
@@ -29,9 +29,6 @@ static int Shmem_Flag;
static XShmSegmentInfo Shminfo[1];
static int gXErrorFlag;
static int CompletionType = -1;
-
-/* since it doesn't seem to be defined on some platforms */
-int XShmGetEventBase(Display *);
#endif
#include "sub.h"
diff --git a/libvo/vo_xvmc.c b/libvo/vo_xvmc.c
index 749e4f4364..dbf5483434 100644
--- a/libvo/vo_xvmc.c
+++ b/libvo/vo_xvmc.c
@@ -131,8 +131,6 @@ const LIBVO_EXTERN(xvmc);
//shm stuff from vo_xv
#ifdef HAVE_SHM
-/* since it doesn't seem to be defined on some platforms */
-int XShmGetEventBase(Display*);
static XShmSegmentInfo Shminfo;
static int Shmem_Flag;
#endif
diff --git a/mplayer.c b/mplayer.c
index b89b212de7..e43ff54d35 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -2659,7 +2659,7 @@ int gui_no_filename=0;
if(strcasecmp(priority_presets_defs[i].name, proc_priority) == 0)
break;
}
- mp_msg(MSGT_CPLAYER,MSGL_STATUS,"Setting process priority: %s\n",
+ mp_msg(MSGT_CPLAYER,MSGL_STATUS,MSGTR_SettingProcessPriority,
priority_presets_defs[i].name);
SetPriorityClass(GetCurrentProcess(), priority_presets_defs[i].prio);
}
diff --git a/vidix/AsmMacros.h b/vidix/AsmMacros.h
index 228e4b6dd6..f40929ade5 100644
--- a/vidix/AsmMacros.h
+++ b/vidix/AsmMacros.h
@@ -77,6 +77,8 @@
#include "sysdep/AsmMacros_arm32.h"
#elif defined(__powerpc__)
#include "sysdep/AsmMacros_powerpc.h"
+#elif defined(__sh__)
+#include <sys/io.h>
#else
#include "sysdep/AsmMacros_x86.h"
#endif
diff --git a/vidix/dha.c b/vidix/dha.c
index 8e3d2ada5d..28dc8c8c09 100644
--- a/vidix/dha.c
+++ b/vidix/dha.c
@@ -185,7 +185,7 @@ void unmap_phys_mem(void *ptr, unsigned long size)
#endif /* Generic mmap (not win32, nor os2) */
-#if !defined(__alpha__) && !defined(__powerpc__)
+#if !defined(__alpha__) && !defined(__powerpc__) && !defined(__sh__)
unsigned char INPORT8(unsigned idx)
{
return inb(idx);
diff --git a/vidix/drivers.c b/vidix/drivers.c
index d809e89332..6d427b1e2b 100644
--- a/vidix/drivers.c
+++ b/vidix/drivers.c
@@ -44,6 +44,7 @@ extern VDXDriver pm3_drv;
extern VDXDriver radeon_drv;
extern VDXDriver rage128_drv;
extern VDXDriver s3_drv;
+extern VDXDriver sh_veu_drv;
extern VDXDriver sis_drv;
extern VDXDriver unichrome_drv;
@@ -93,6 +94,9 @@ void vidix_register_all_drivers (void)
#ifdef CONFIG_VIDIX_DRV_S3
vidix_register_driver (&s3_drv);
#endif
+#ifdef CONFIG_VIDIX_DRV_SH_VEU
+ vidix_register_driver (&sh_veu_drv);
+#endif
#ifdef CONFIG_VIDIX_DRV_SIS
vidix_register_driver (&sis_drv);
#endif
diff --git a/vidix/pci.c b/vidix/pci.c
index ffa91224e1..1006b14a80 100644
--- a/vidix/pci.c
+++ b/vidix/pci.c
@@ -484,7 +484,7 @@ static int pcibus=-1, pcicard=-1, pcifunc=-1 ;
#include "sysdep/pci_arm32.c"
#elif defined(__powerpc__)
#include "sysdep/pci_powerpc.c"
-#elif defined(__x86_64__)
+#elif defined(__x86_64__) || defined(__sh__)
/* Nothing here right now */
#else
#include "sysdep/pci_x86.c"
@@ -628,7 +628,7 @@ int pci_scan(pciinfo_t *pci_list,unsigned *num_pci)
} while (++pcr._pcibusidx < pcr._pcinumbus);
}
-#if !defined(__alpha__) && !defined(__powerpc__)
+#if !defined(__alpha__) && !defined(__powerpc__) && !defined(__sh__)
/* Now try pci config 2 probe (deprecated) */
if ((pcr._configtype == 2) || do_mode2_scan) {
@@ -689,7 +689,7 @@ int pci_scan(pciinfo_t *pci_list,unsigned *num_pci)
outb(PCI_MODE2_ENABLE_REG, 0x00);
}
-#endif /* !__alpha__ && !__powerpc__ */
+#endif /* !__alpha__ && !__powerpc__ && !__sh__ */
disable_os_io();
diff --git a/vidix/sh_veu_vid.c b/vidix/sh_veu_vid.c
new file mode 100644
index 0000000000..1d683e38c6
--- /dev/null
+++ b/vidix/sh_veu_vid.c
@@ -0,0 +1,594 @@
+/*
+ * VIDIX driver for SuperH Mobile VEU hardware block.
+ * Copyright (C) 2008 Magnus Damm
+ *
+ * Requires a kernel that exposes the VEU hardware block to user space
+ * using UIO. Available in upstream linux-2.6.27 or later.
+ *
+ * Tested using WVGA and QVGA panels with sh7722 VEU and sh7723 VEU2H.
+ *
+ * This file is part of MPlayer.
+ *
+ * MPlayer 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.
+ *
+ * MPlayer 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 MPlayer; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/mman.h>
+#include <sys/time.h>
+#include <sys/ioctl.h>
+#include <fcntl.h>
+#include <linux/fb.h>
+#include <inttypes.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include "config.h"
+#include "vidix.h"
+#include "fourcc.h"
+
+#include "dha.h"
+
+static int fgets_with_openclose(char *fname, char *buf, size_t maxlen)
+{
+ FILE *fp;
+
+ fp = fopen(fname, "r");
+ if (!fp)
+ return -1;
+
+ fgets(buf, maxlen, fp);
+ fclose(fp);
+ return strlen(buf);
+}
+
+struct uio_device {
+ char *name;
+ char *path;
+ int fd;
+};
+
+#define MAXNAMELEN 256
+
+static int locate_uio_device(char *name, struct uio_device *udp)
+{
+ char fname[MAXNAMELEN], buf[MAXNAMELEN];
+ char *tmp;
+ int uio_id;
+
+ uio_id = -1;
+ do {
+ uio_id++;
+ snprintf(fname, MAXNAMELEN, "/sys/class/uio/uio%d/name", uio_id);
+ if (fgets_with_openclose(fname, buf, MAXNAMELEN) < 0)
+ return -1;
+
+ } while (strncmp(name, buf, strlen(name)));
+
+ tmp = strchr(buf, '\n');
+ if (tmp)
+ *tmp = '\0';
+
+ udp->name = strdup(buf);
+ udp->path = strdup(fname);
+ udp->path[strlen(udp->path) - 5] = '\0';
+
+ snprintf(buf, MAXNAMELEN, "/dev/uio%d", uio_id);
+ udp->fd = open(buf, O_RDWR | O_SYNC);
+
+ if (udp->fd < 0)
+ return -1;
+
+ return 0;
+}
+
+struct uio_map {
+ unsigned long address;
+ unsigned long size;
+ void *iomem;
+};
+
+static int setup_uio_map(struct uio_device *udp, int nr, struct uio_map *ump)
+{
+ char fname[MAXNAMELEN], buf[MAXNAMELEN];
+
+ snprintf(fname, MAXNAMELEN, "%s/maps/map%d/addr", udp->path, nr);
+ if (fgets_with_openclose(fname, buf, MAXNAMELEN) <= 0)
+ return -1;
+
+ ump->address = strtoul(buf, NULL, 0);
+
+ snprintf(fname, MAXNAMELEN, "%s/maps/map%d/size", udp->path, nr);
+ if (fgets_with_openclose(fname, buf, MAXNAMELEN) <= 0)
+ return -1;
+
+ ump->size = strtoul(buf, NULL, 0);
+ ump->iomem = mmap(0, ump->size,
+ PROT_READ|PROT_WRITE, MAP_SHARED,
+ udp->fd, nr * getpagesize());
+
+ if (ump->iomem == MAP_FAILED)
+ return -1;
+
+ return 0;
+}
+
+struct fb_info {
+ unsigned long width;
+ unsigned long height;
+ unsigned long bpp;
+ unsigned long line_length;
+
+ unsigned long address;
+ unsigned long size;
+};
+
+static int get_fb_info(char *device, struct fb_info *fip)
+{
+ struct fb_var_screeninfo vinfo;
+ struct fb_fix_screeninfo finfo;
+ void *iomem;
+ int fd;
+
+ fd = open(device, O_RDWR);
+ if (fd < 0) {
+ perror("open");
+ return -1;
+ }
+
+ if (ioctl(fd, FBIOGET_VSCREENINFO, &vinfo) == -1) {
+ perror("ioctl(FBIOGET_VSCREENINFO)");
+ return -1;
+ }
+
+ fip->width = vinfo.xres;
+ fip->height = vinfo.yres;
+ fip->bpp = vinfo.bits_per_pixel;
+
+ if (ioctl(fd, FBIOGET_FSCREENINFO, &finfo) == -1) {
+ perror("ioctl(FBIOGET_FSCREENINFO)");
+ return -1;
+ }
+
+ fip->address = finfo.smem_start;
+ fip->size = finfo.smem_len;
+ fip->line_length = finfo.line_length;
+
+ iomem = mmap(0, fip->size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
+
+ if (iomem == MAP_FAILED) {
+ perror("mmap");
+ return -1;
+ }
+
+ /* clear framebuffer */
+ memset(iomem, 0, fip->line_length * fip->height);
+ munmap(iomem, fip->size);
+
+ close(fd);
+ return 0;
+}
+
+#define VESTR 0x00 /* start register */
+#define VESWR 0x10 /* src: line length */
+#define VESSR 0x14 /* src: image size */
+#define VSAYR 0x18 /* src: y/rgb plane address */
+#define VSACR 0x1c /* src: c plane address */
+#define VBSSR 0x20 /* bundle mode register */
+#define VEDWR 0x30 /* dst: line length */
+#define VDAYR 0x34 /* dst: y/rgb plane address */
+#define VDACR 0x38 /* dst: c plane address */
+#define VTRCR 0x50 /* transform control */
+#define VRFCR 0x54 /* resize scale */
+#define VRFSR 0x58 /* resize clip */
+#define VENHR 0x5c /* enhance */
+#define VFMCR 0x70 /* filter mode */
+#define VVTCR 0x74 /* lowpass vertical */
+#define VHTCR 0x78 /* lowpass horizontal */
+#define VAPCR 0x80 /* color match */
+#define VECCR 0x84 /* color replace */
+#define VAFXR 0x90 /* fixed mode */
+#define VSWPR 0x94 /* swap */
+#define VEIER 0xa0 /* interrupt mask */
+#define VEVTR 0xa4 /* interrupt event */
+#define VSTAR 0xb0 /* status */
+#define VBSRR 0xb4 /* reset */
+
+#define VMCR00 0x200 /* color conversion matrix coefficient 00 */
+#define VMCR01 0x204 /* color conversion matrix coefficient 01 */
+#define VMCR02 0x208 /* color conversion matrix coefficient 02 */
+#define VMCR10 0x20c /* color conversion matrix coefficient 10 */
+#define VMCR11 0x210 /* color conversion matrix coefficient 11 */
+#define VMCR12 0x214 /* color conversion matrix coefficient 12 */
+#define VMCR20 0x218 /* color conversion matrix coefficient 20 */
+#define VMCR21 0x21c /* color conversion matrix coefficient 21 */
+#define VMCR22 0x220 /* color conversion matrix coefficient 22 */
+#define VCOFFR 0x224 /* color conversion offset */
+#define VCBR 0x228 /* color conversion clip */
+
+/* Helper functions for reading registers. */
+
+static unsigned long read_reg(struct uio_map *ump, int reg_offs)
+{
+ volatile unsigned long *reg = ump->iomem;
+
+ return reg[reg_offs / 4];
+}
+