summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2008-11-25 21:12:01 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2008-11-25 21:12:01 +0200
commit835511ac394d5283c9c449e6154ccb0db1365321 (patch)
treec223ee6b82481a0030273cfae9e831dada249fd8
parent6c712271ce9e8d4eb9cd615e920139ebcb1d1d49 (diff)
parentcc5e0406412a5f8b4e6e7094f6ffa18a65decd74 (diff)
downloadmpv-835511ac394d5283c9c449e6154ccb0db1365321.tar.bz2
mpv-835511ac394d5283c9c449e6154ccb0db1365321.tar.xz
Merge svn changes up to r28038
-rw-r--r--DOCS/man/fr/mplayer.111
-rw-r--r--DOCS/xml/pl/encoding-guide.xml156
-rwxr-xr-xconfigure32
-rw-r--r--cpudetect.c15
-rw-r--r--etc/codecs.conf9
-rw-r--r--libmpcodecs/ad_libvorbis.c4
-rw-r--r--libmpcodecs/vf_screenshot.c168
-rw-r--r--libmpeg2/idct.c2
-rw-r--r--libmpeg2/libmpeg2_changes.diff2
-rw-r--r--libvo/video_out.h4
-rw-r--r--libvo/vo_direct3d.c162
-rw-r--r--libvo/vo_fbdev.c1813
-rw-r--r--libvo/vo_gl.c42
-rw-r--r--libvo/vo_macosx.m12
-rw-r--r--libvo/vo_quartz.c2512
-rw-r--r--libvo/vo_wii.c275
-rw-r--r--libvo/vo_x11.c37
-rw-r--r--libvo/vo_xvmc.c9
-rw-r--r--mplayer.c11
-rw-r--r--subdir.mak2
20 files changed, 2624 insertions, 2654 deletions
diff --git a/DOCS/man/fr/mplayer.1 b/DOCS/man/fr/mplayer.1
index 58bedeb1f2..2d3a595ba6 100644
--- a/DOCS/man/fr/mplayer.1
+++ b/DOCS/man/fr/mplayer.1
@@ -1,4 +1,4 @@
-.\" synced with r27906
+.\" synced with r27979
.\" Encoding: iso-8859-1
.\" MPlayer (C) 2000-2008 MPlayer Team
.\" The English man page was/is done by Gabucino, Diego Biurrun, Jonas Jermann
@@ -3435,8 +3435,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.
+Cette option ne convient pas pour dfinir l'cran de dmarrage (car l'affichage
+se fera toujours en plein cran sur le moniteur donn), \-geometry est plus
+appropri.
Gr par les pilotes de sortie vido gl, gl2, x11, et xv.
.
.TP
@@ -3684,6 +3685,10 @@ Comme pour vidix
VIDIX tournant sous Windows.
.
.TP
+.B direct3d (Windows uniquement) (CODE BTA!)
+Pilote de sortie vido utilisant l'interface Direct3D (utilse sous Vista).
+.
+.TP
.B directx (Windows uniquement)
Pilote de sortie vido utilisant l'interface DirectX.
.PD 0
diff --git a/DOCS/xml/pl/encoding-guide.xml b/DOCS/xml/pl/encoding-guide.xml
index cbb7c07f4f..8f83921cda 100644
--- a/DOCS/xml/pl/encoding-guide.xml
+++ b/DOCS/xml/pl/encoding-guide.xml
@@ -1096,137 +1096,141 @@ rozdzielczości DVD) żeby dobrze wyglądać.
</sect2>
<!-- ********** -->
-<!-- synced 'till here -->
<sect2 id="menc-feat-dvd-mpeg4-filtering">
-<title>Filtering</title>
+<title>Filtrowanie</title>
<para>
-Learning how to use <application>MEncoder</application>'s video filters
-is essential to producing good encodes.
-All video processing is performed through the filters -- cropping,
-scaling, color adjustment, noise removal, sharpening, deinterlacing,
-telecine, inverse telecine, and deblocking, just to name a few.
-Along with the vast number of supported input formats, the variety of
-filters available in <application>MEncoder</application> is one of its
-main advantages over other similar programs.
+Bardzo ważne do robienia dobrych kodowań jest nauczenie się posługiwania
+systemem filtrów <application>MEncodera</application>.
+Całe przetwarzanie video jest wykonywane przez filtry &ndash; kadrowanie, skalowanie,
+dopasowywanie kolorów, usuwanie szumu, telecine, odwrócone telecine, usuwanie
+bloków żeby wymienić choć część.
+Poza dużą ilością obsługiwanych formatów wejściowych to właśnie zakres
+dostępnych filtrów jest jedną z głównych przewag
+<application>MEncodera</application> nad podobnymi programami.
</para>
<para>
-Filters are loaded in a chain using the -vf option:
+Filtry są ładowane do łańcucha przy pomocy opcji -vf:
-<screen>-vf filter1=options,filter2=options,...</screen>
+<screen>-vf filtr1=opcje,filtr2=opcje,...</screen>
-Most filters take several numeric options separated by colons, but
-the syntax for options varies from filter to filter, so read the man
-page for details on the filters you wish to use.
+Większość filtrów przyjmuje kilka parametrów numerycznych oddzielanych
+dwukropkami, ale dokładna składnia zależy od filtru więc szczegóły odnośnie
+filtrów, które chcesz zastosować, znajdziesz na stronie man.
</para>
<para>
-Filters operate on the video in the order they are loaded.
-For example, the following chain:
+Filtry działają na filmie w kolejnoścy w jakiej zostały załadowane.
+Na przykład następujący łańcuch:
<screen>-vf crop=688:464:12:4,scale=640:464</screen>
-will first crop the 688x464 region of the picture with upper-left
-corner at (12,4), and then scale the result down to 640x464.
+najpierw skadruje fragment 688x464 filmu z lewym górnym rogiem na pozycji
+(12,4) a potem zmniejszy rozdzielczość wyniku do 640x464.
</para>
<para>
-Certain filters need to be loaded at or near the beginning of the
-filter chain, in order to take advantage of information from the
-video decoder that will be lost or invalidated by other filters.
-The principal examples are <option>pp</option> (postprocessing, only
-when it is performing deblock or dering operations),
-<option>spp</option> (another postprocessor to remove MPEG artifacts),
-<option>pullup</option> (inverse telecine), and
-<option>softpulldown</option> (for converting soft telecine to hard telecine).
+Niektóre filtry trzeba ładować na początku lub blisko początku łańcucha,
+ponieważ korzystają one z informacji którą następne filtry mogą zgubić lub
+unieważnić.
+Sztandarowym przykłądem jest <option>pp</option> (postprocessing, tylko gdy
+wykonuje operacje usuwania bloków lub pierścieni),
+<option>spp</option> (inny postprocessor do usuwania artefaktów MPEG),
+<option>pullup</option> (odwrócone telecine) i
+<option>softpulldown</option> (konwertuje miękkie telecine na twarde).
</para>
<para>
-In general, you want to do as little filtering as possible to the movie
-in order to remain close to the original DVD source. Cropping is often
-necessary (as described above), but avoid to scale the video. Although
-scaling down is sometimes preferred to using higher quantizers, we want
-to avoid both these things: remember that we decided from the start to
-trade bits for quality.
+W ogólności chcesz przeprowadzać jak najmniej filtrowania żeby film pozostał
+możliwie bliski oryginałowi.
+Kadrowanie często jest niezbęne (jak opisano powyżej) ale staraj się uniknąć
+skalowania.
+Chociaż czasami zmniejszenie rozdzielczości jest lepszym wyjściem niż użycie
+wyższego kwantyzatora, chcemy uniknąć obu: pamiętajmy, że od początku
+zdecydowaliśmy się wybrać jakość kosztem wielkości.
</para>
<para>
-Also, do not adjust gamma, contrast, brightness, etc. What looks good
-on your display may not look good on others. These adjustments should
-be done on playback only.
+Nie należy też dostosowywać gammy, kontrastu, jasności itp.
+Co wygląda dobrze na Twoim ekranie może nie być tak dobre na innych.
+Takie dostrojenia powinny być wykonywane tylko przy odtwarzaniu.
</para>
<para>
-One thing you might want to do, however, is pass the video through a
-very light denoise filter, such as <option>-vf hqdn3d=2:1:2</option>.
-Again, it is a matter of putting those bits to better use: why waste them
-encoding noise when you can just add that noise back in during playback?
-Increasing the parameters for <option>hqdn3d</option> will further
-improve compressibility, but if you increase the values too much, you
-risk degrading the image visibly. The suggested values above
-(<option>2:1:2</option>) are quite conservative; you should feel free to
-experiment with higher values and observe the results for yourself.
+Jedną rzeczą którą możesz chcieć zrobić, jest przepuszczenie filmu przez bardzo
+lekkie usuwanie szumów, takie jak <option>-vf hqdn3d=2:1:2</option>.
+Znów, to kwestia lepszego zastosowania bitów: po co marnować je na zakodowanie
+szumu skoro można dodać ten szum przy odtwarzaniu?
+Zwiększenie parametrów dla <option>hqdn3d</option> jeszcze bardziej poprawi
+kompresowalność, ale jeśli przesadzisz to zauważalnie zniekształcisz obraz.
+Wartości sugerowane powyżej (<option>2:1:2</option>) są dość konserwatywne; nie
+bój się eksperymentować z wyższymi wartościami i samemu oceniać wyniki.
</para>
</sect2>
<!-- ********** -->
<sect2 id="menc-feat-dvd-mpeg4-interlacing">
-<title>Interlacing and Telecine</title>
+<title>Przeplot i telecine</title>
<para>
-Almost all movies are shot at 24 fps. Because NTSC is 30000/1001 fps, some
-processing must be done to this 24 fps video to make it run at the correct
-NTSC framerate. The process is called 3:2 pulldown, commonly referred to
-as telecine (because pulldown is often applied during the telecine
-process), and, naively described, it works by slowing the film down to
-24000/1001 fps, and repeating every fourth frame.
+Prawie wszystkie filmy są kręcone przy 24 fps.
+Ponieważ NTSC ma 30000/1001 fps potrzebna jest pewna przeróbka żeby film 24 fps
+mógł być wyświetlany z prawidłową szybkością NTSC.
+Ten proces nazywa się 3:2 pulldown, często zwany też telecine (ponieważ jest
+używany przy konwersji z kina do telewizji) i, w uproszczeniu, jest to
+spowolnienie filmu do 24000/1001 fps i powtórzenie co czwartej klatki.
</para>
<para>
-No special processing, however, is done to the video for PAL DVDs, which
-run at 25 fps. (Technically, PAL can be telecined, called 2:2 pulldown,
-but this does not become an issue in practice.) The 24 fps film is simply
-played back at 25 fps. The result is that the movie runs slightly faster,
-but unless you are an alien, you probably will not notice the difference.
-Most PAL DVDs have pitch-corrected audio, so when they are played back at
-25 fps things will sound right, even though the audio track (and hence the
-whole movie) has a running time that is 4% less than NTSC DVDs.
+Filmy DVD PAL, odtwarzanie przy 25 fps, nie wymagają żadnego specjalnego
+traktowania.
+(Technicznie rzecz ujmując, PAL może być poddany telecine, nazywanemu 2:2
+pulldown, ale w praktyce nie jest to problemem.)
+Po prostu film 24 fps jest odtwarzany przy 25 fps.
+W wyniku tego film jest odtwarzany odrobinkę szybciej, ale jeśli nie masz
+nieziemskich zmysłów to tego nie zauważysz.
+Większość DVD PAL ma skorygowaną wysokość dźwięku, więc kiedy są odtwarzane
+przy 25 fps dźwięk będzie brzmiał poprawnie, mimo tego że ścieżka dźwiekowa
+(jak i cały film) jest o 4% krótsza niż DVD NTSC.
</para>
<para>
-Because the video in a PAL DVD has not been altered, you need not worry
-much about framerate. The source is 25 fps, and your rip will be 25
-fps. However, if you are ripping an NTSC DVD movie, you may need to
-apply inverse telecine.
+Ponieważ film na DVD PAL nie został zmieniony, nie ma powodu za bardzo
+przejmować się framerate.
+Oryginał ma 25 fps i Twój rip też będzie miał 25 fps.
+Jednak jeśli ripujesz film z DVD NTSC możesz być zmuszony do zastosowania
+odwrotnego telecine.
</para>
<para>
-For movies shot at 24 fps, the video on the NTSC DVD is either telecined
-30000/1001, or else it is progressive 24000/1001 fps and intended to be
-telecined on-the-fly by a DVD player. On the other hand, TV series are usually
-only interlaced, not telecined. This is not a hard rule: some TV series
-are interlaced (such as Buffy the Vampire Slayer) whereas some are a
-mixture of progressive and interlaced (such as Angel, or 24).
+Dla filmów nagrywanych przy 24 fps obraz na DVD NTSC jest albo poddany telecine
+na 30000/1001 albo jest progresywny przy 24000/1001 i&nbsp;przeznaczony do poddania
+telecine w locie przez odtwarzacz DVD.
+Z drugiej strony seriale telewizyjne zazwyczaj mają tylko przeplot, nie są poddane telecine.
+Nie jest to reguła: Niektóre seriale (na przykład Buffy Łowca Wampirów) mają
+przeplot, a inne są mieszanką progresywnego i&nbsp;przeplotu (Angel, 24).
</para>
<para>
-It is highly recommended that you read the section on
+Jest wysoce zalecane żebyś przeczytał sekcję
+<!-- TODO przetłumaczyć tytuł -->
<link linkend="menc-feat-telecine">How to deal with telecine and interlacing in NTSC DVDs</link>
-to learn how to handle the different possibilities.
+żeby dowiedzieć się jak sobie radzić z&nbsp;różnymi możliwościami.
</para>
<para>
-However, if you are mostly just ripping movies, likely you are either
-dealing with 24 fps progressive or telecined video, in which case you can
-use the <option>pullup</option> filter <option>-vf
-pullup,softskip</option>.
+Jednak jeśli zazwyczaj tylko ripujesz filmy, prawdopodobnie masz doczynienia
+z filmem 24 fps progresywnym lub poddanym telecine, a w takim przypadku możesz
+użyć filtra <option>pullup</option> podając parametr
+<option>-vf pullup,softskip</option>.
</para>
</sect2>
<!-- ********** -->
+<!-- synced 'till here -->
<sect2 id="menc-feat-dvd-mpeg4-encoding-interlaced">
<title>Encoding interlaced video</title>
diff --git a/configure b/configure
index f7704f674a..64375ef561 100755
--- a/configure
+++ b/configure
@@ -1488,7 +1488,7 @@ if test "`basename $_cc`" = "icc" || test "`basename $_cc`" = "ecc"; then
cc_version="v. ?.??, bad"
cc_fail=yes
;;
- 10.1)
+ 10.1|11.0)
cc_version="$cc_version, ok"
;;
*)
@@ -3582,9 +3582,23 @@ if test "$_macosx" = auto ; then
fi
if test "$_macosx" = yes ; then
cat > $TMPC <<EOF
+#include <CoreAudio/CoreAudio.h>
+int main(void) { return 0; }
+EOF
+ if cc_check -framework CoreAudio; then
+ _ld_extra="$_ld_extra -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
+ _coreaudio=yes
+ _def_coreaudio='#define CONFIG_COREAUDIO 1'
+ _aosrc="$_aosrc ao_macosx.c"
+ _aomodules="macosx $_aomodules"
+ else
+ _coreaudio=no
+ _def_coreaudio='#undef CONFIG_COREAUDIO'
+ _noaomodules="macosx $_noaomodules"
+ fi
+ cat > $TMPC <<EOF
#include <Carbon/Carbon.h>
#include <QuickTime/QuickTime.h>
-#include <CoreAudio/CoreAudio.h>
int main(void) {
EnterMovies();
ExitMovies();
@@ -3592,21 +3606,15 @@ int main(void) {
return 0;
}
EOF
- if cc_check -framework Carbon -framework QuickTime -framework CoreAudio; then
- _ld_extra="$_ld_extra -framework Carbon -framework QuickTime -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
- _coreaudio=yes
- _def_coreaudio='#define CONFIG_COREAUDIO 1'
- _aosrc="$_aosrc ao_macosx.c"
- _aomodules="macosx $_aomodules"
+ if cc_check -framework Carbon -framework QuickTime; then
+ _ld_extra="$_ld_extra -framework Carbon -framework QuickTime"
+ _quartz=yes
_def_quartz='#define CONFIG_QUARTZ 1'
_vosrc="$_vosrc vo_quartz.c"
_vomodules="quartz $_vomodules"
_def_quicktime='#define CONFIG_QUICKTIME 1'
else
- _macosx=no
- _coreaudio=no
- _def_coreaudio='#undef CONFIG_COREAUDIO'
- _noaomodules="macosx $_noaomodules"
+ _quartz=yes
_def_quartz='#undef CONFIG_QUARTZ'
_novomodules="quartz $_novomodules"
_def_quicktime='#undef CONFIG_QUICKTIME'
diff --git a/cpudetect.c b/cpudetect.c
index 22edd58795..ffd0705e0e 100644
--- a/cpudetect.c
+++ b/cpudetect.c
@@ -57,10 +57,17 @@ static int has_cpuid(void)
long a, c;
// code from libavcodec:
+#ifdef ARCH_X86_64
+#define PUSHF "pushfq\n\t"
+#define POPF "popfq\n\t"
+#else
+#define PUSHF "pushfl\n\t"
+#define POPF "popfl\n\t"
+#endif
__asm__ volatile (
/* See if CPUID instruction is supported ... */
/* ... Get copies of EFLAGS into eax and ecx */
- "pushf\n\t"
+ PUSHF
"pop %0\n\t"
"mov %0, %1\n\t"
@@ -68,15 +75,17 @@ static int has_cpuid(void)
/* to the EFLAGS reg */
"xor $0x200000, %0\n\t"
"push %0\n\t"
- "popf\n\t"
+ POPF
/* ... Get the (hopefully modified) EFLAGS */
- "pushf\n\t"
+ PUSHF
"pop %0\n\t"
: "=a" (a), "=c" (c)
:
: "cc"
);
+#undef PUSHF
+#undef POPF
return a != c;
}
diff --git a/etc/codecs.conf b/etc/codecs.conf
index a4989bc057..79184f2c22 100644
--- a/etc/codecs.conf
+++ b/etc/codecs.conf
@@ -3491,6 +3491,15 @@ audiocodec vorbis
driver libvorbis
dll "libvorbis"
+audiocodec tremor
+ info "OggVorbis audio decoder"
+ status working
+ comment "OggVorbis fixed-point decoder useful for ARM based systems"
+ fourcc vrbs
+ format 0x566F
+ driver tremor
+ dll "tremor"
+
audiocodec vorbisacm
info "OggVorbis ACM"
status working
diff --git a/libmpcodecs/ad_libvorbis.c b/libmpcodecs/ad_libvorbis.c
index 6f37e27710..520b07f50a 100644
--- a/libmpcodecs/ad_libvorbis.c
+++ b/libmpcodecs/ad_libvorbis.c
@@ -12,7 +12,11 @@
static const ad_info_t info =
{
"Ogg/Vorbis audio decoder",
+#ifdef CONFIG_TREMOR
+ "tremor",
+#else
"libvorbis",
+#endif
"Felix Buenemann, A'rpi",
"libvorbis",
""
diff --git a/libmpcodecs/vf_screenshot.c b/libmpcodecs/vf_screenshot.c
index 7770dd4de0..8471285345 100644
--- a/libmpcodecs/vf_screenshot.c
+++ b/libmpcodecs/vf_screenshot.c
@@ -41,11 +41,11 @@ struct vf_priv_s {
//===========================================================================//
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)
{
vf->priv->ctx=sws_getContextFromCmdLine(width, height, outfmt,
- d_width, d_height, IMGFMT_RGB24);
+ d_width, d_height, IMGFMT_RGB24);
vf->priv->outbuffer_size = d_width * d_height * 3 * 2;
vf->priv->outbuffer = realloc(vf->priv->outbuffer, vf->priv->outbuffer_size);
@@ -72,10 +72,10 @@ static void write_png(struct vf_priv_s *priv)
fp = fopen (fname, "wb");
if (fp == NULL) {
- mp_msg(MSGT_VFILTER,MSGL_ERR,"\nPNG Error opening %s for writing!\n", fname);
- return;
+ mp_msg(MSGT_VFILTER,MSGL_ERR,"\nPNG Error opening %s for writing!\n", fname);
+ return;
}
-
+
pic.data[0] = priv->buffer;
pic.linesize[0] = priv->stride;
size = avcodec_encode_video(priv->avctx, priv->outbuffer, priv->outbuffer_size, &pic);
@@ -95,11 +95,11 @@ static int fexists(char *fname)
static void gen_fname(struct vf_priv_s* priv)
{
do {
- snprintf (priv->fname, 100, "shot%04d.png", ++priv->frameno);
+ snprintf (priv->fname, 100, "shot%04d.png", ++priv->frameno);
} while (fexists(priv->fname) && priv->frameno < 100000);
if (fexists(priv->fname)) {
- priv->fname[0] = '\0';
- return;
+ priv->fname[0] = '\0';
+ return;
}
mp_msg(MSGT_VFILTER,MSGL_INFO,"*** screenshot '%s' ***\n",priv->fname);
@@ -110,96 +110,99 @@ static void scale_image(struct vf_priv_s* priv, mp_image_t *mpi)
{
uint8_t *dst[3];
int dst_stride[3];
-
+
dst_stride[0] = priv->stride;
dst_stride[1] = dst_stride[2] = 0;
if (!priv->buffer)
- priv->buffer = memalign(16, dst_stride[0]*priv->dh);
+ priv->buffer = memalign(16, dst_stride[0]*priv->dh);
dst[0] = priv->buffer;
dst[1] = dst[2] = 0;
sws_scale_ordered(priv->ctx, mpi->planes, mpi->stride, 0, priv->dh, dst, dst_stride);
}
-static void start_slice(struct vf_instance* vf, mp_image_t *mpi){
+static void start_slice(struct vf_instance* vf, mp_image_t *mpi)
+{
vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
- mpi->type, mpi->flags, mpi->width, mpi->height);
+ mpi->type, mpi->flags, mpi->width, mpi->height);
if (vf->priv->shot) {
- vf->priv->store_slices = 1;
- if (!vf->priv->buffer)
- vf->priv->buffer = memalign(16, vf->priv->stride*vf->priv->dh);
+ vf->priv->store_slices = 1;
+ if (!vf->priv->buffer)
+ vf->priv->buffer = memalign(16, vf->priv->stride*vf->priv->dh);
}
-
+
}
-static void draw_slice(struct vf_instance* vf,
- unsigned char** src, int* stride, int w,int h, int x, int y){
+static void draw_slice(struct vf_instance* vf, unsigned char** src,
+ int* stride, int w,int h, int x, int y)
+{
if (vf->priv->store_slices) {
- uint8_t *dst[3];
- int dst_stride[3];
- dst_stride[0] = vf->priv->stride;
- dst_stride[1] = dst_stride[2] = 0;
- dst[0] = vf->priv->buffer;
- dst[1] = dst[2] = 0;
- sws_scale_ordered(vf->priv->ctx, src, stride, y, h, dst, dst_stride);
+ uint8_t *dst[3];
+ int dst_stride[3];
+ dst_stride[0] = vf->priv->stride;
+ dst_stride[1] = dst_stride[2] = 0;
+ dst[0] = vf->priv->buffer;
+ dst[1] = dst[2] = 0;
+ sws_scale_ordered(vf->priv->ctx, src, stride, y, h, dst, dst_stride);
}
vf_next_draw_slice(vf,src,stride,w,h,x,y);
}
-static void get_image(struct vf_instance* vf, mp_image_t *mpi){
+static void get_image(struct vf_instance* vf, mp_image_t *mpi)
+{
// FIXME: should vf.c really call get_image when using slices??
if (mpi->flags & MP_IMGFLAG_DRAW_CALLBACK)
return;
- vf->dmpi= vf_get_image(vf->next, mpi->imgfmt,
- mpi->type, mpi->flags/* | MP_IMGFLAG_READABLE*/, mpi->width, mpi->height);
+ vf->dmpi= vf_get_image(vf->next, mpi->imgfmt,
+ mpi->type, mpi->flags/* | MP_IMGFLAG_READABLE*/, mpi->width, mpi->height);
mpi->planes[0]=vf->dmpi->planes[0];
mpi->stride[0]=vf->dmpi->stride[0];
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->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->width=vf->dmpi->width;
mpi->flags|=MP_IMGFLAG_DIRECT;
-
+
mpi->priv=(void*)vf->dmpi;
}
static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts)
{
mp_image_t *dmpi = (mp_image_t *)mpi->priv;
-
+
if (mpi->flags & MP_IMGFLAG_DRAW_CALLBACK)
dmpi = vf->dmpi;
else
if(!(mpi->flags&MP_IMGFLAG_DIRECT)){
- dmpi=vf_get_image(vf->next,mpi->imgfmt,
- MP_IMGTYPE_EXPORT, 0,
- mpi->width, mpi->height);
- vf_clone_mpi_attributes(dmpi, mpi);
- dmpi->planes[0]=mpi->planes[0];
- dmpi->planes[1]=mpi->planes[1];
- dmpi->planes[2]=mpi->planes[2];
- dmpi->stride[0]=mpi->stride[0];
- dmpi->stride[1]=mpi->stride[1];
- dmpi->stride[2]=mpi->stride[2];
- dmpi->width=mpi->width;
- dmpi->height=mpi->height;
+ dmpi=vf_get_image(vf->next,mpi->imgfmt,
+ MP_IMGTYPE_EXPORT, 0,
+ mpi->width, mpi->height);
+ vf_clone_mpi_attributes(dmpi, mpi);
+ dmpi->planes[0]=mpi->planes[0];
+ dmpi->planes[1]=mpi->planes[1];
+ dmpi->planes[2]=mpi->planes[2];
+ dmpi->stride[0]=mpi->stride[0];
+ dmpi->stride[1]=mpi->stride[1];
+ dmpi->stride[2]=mpi->stride[2];
+ dmpi->width=mpi->width;
+ dmpi->height=mpi->height;
}
if(vf->priv->shot) {
- if (vf->priv->shot==1)
- vf->priv->shot=0;
- gen_fname(vf->priv);
- if (vf->priv->fname[0]) {
- if (!vf->priv->store_slices)
- scale_image(vf->priv, dmpi);
- write_png(vf->priv);
- }
- vf->priv->store_slices = 0;
+ if (vf->priv->shot==1)
+ vf->priv->shot=0;
+ gen_fname(vf->priv);
+ if (vf->priv->fname[0]) {
+ if (!vf->priv->store_slices)
+ scale_image(vf->priv, dmpi);
+ write_png(vf->priv);
+ }
+ vf->priv->store_slices = 0;
}
return vf_next_put_image(vf, dmpi, pts);
@@ -212,15 +215,15 @@ static int control (vf_instance_t *vf, int request, void *data)
* 1: take screenshots with each frame until the same command is given once again
**/
if(request==VFCTRL_SCREENSHOT) {
- if (data && *(int*)data) { // repeated screenshot mode
- if (vf->priv->shot==2)
- vf->priv->shot=0;
- else
- vf->priv->shot=2;
- } else { // single screenshot
- if (!vf->priv->shot)
- vf->priv->shot=1;
- }
+ if (data && *(int*)data) { // repeated screenshot mode
+ if (vf->priv->shot==2)
+ vf->priv->shot=0;
+ else
+ vf->priv->shot=2;
+ } else { // single screenshot
+ if (!vf->priv->shot)
+ vf->priv->shot=1;
+ }
return CONTROL_TRUE;
}
return vf_next_control (vf, request, data);
@@ -243,19 +246,27 @@ static int query_format(struct vf_instance* vf, unsigned int fmt)
case IMGFMT_BGR15:
case IMGFMT_RGB32:
case IMGFMT_RGB24:
- case IMGFMT_Y800:
- case IMGFMT_Y8:
- case IMGFMT_YVU9:
- case IMGFMT_IF09:
- case IMGFMT_444P:
- case IMGFMT_422P:
- case IMGFMT_411P:
- return vf_next_query_format(vf, fmt);
+ case IMGFMT_Y800:
+ case IMGFMT_Y8:
+ case IMGFMT_YVU9:
+ case IMGFMT_IF09:
+ case IMGFMT_444P:
+ case IMGFMT_422P:
+ case IMGFMT_411P:
+ return vf_next_query_format(vf, fmt);
}
return 0;
}
-static void uninit(vf_instance_t *vf);
+static void uninit(vf_instance_t *vf)
+{
+ av_freep(&vf->priv->avctx);
+ if(vf->priv->ctx) sws_freeContext(vf->priv->ctx);
+ if (vf->priv->buffer) free(vf->priv->buffer);
+ free(vf->priv->outbuffer);
+ free(vf->priv);
+}
+
// open conflicts with stdio.h at least under MinGW
static int screenshot_open(vf_instance_t *vf, char* args)
{
@@ -283,15 +294,6 @@ static int screenshot_open(vf_instance_t *vf, char* args)
return 1;
}
-static void uninit(vf_instance_t *vf)
-{
- av_freep(&vf->priv->avctx);
- if(vf->priv->ctx) sws_freeContext(vf->priv->ctx);
- if (vf->priv->buffer) free(vf->priv->buffer);
- free(vf->priv->outbuffer);
- free(vf->priv);
-}
-
const vf_info_t vf_info_screenshot = {
"screenshot to file",
diff --git a/libmpeg2/idct.c b/libmpeg2/idct.c
index 82049df4bc..e753053354 100644
--- a/libmpeg2/idct.c
+++ b/libmpeg2/idct.c
@@ -265,7 +265,7 @@ void mpeg2_idct_init (uint32_t accel)
mpeg2_idct_altivec_init ();
} else
#endif
-#ifdef HAVE_VIS
+#ifdef HAVE_MVI
if (accel & MPEG2_ACCEL_ALPHA_MVI) {
mpeg2_idct_copy = mpeg2_idct_copy_mvi;
mpeg2_idct_add = mpeg2_idct_add_mvi;
diff --git a/libmpeg2/libmpeg2_changes.diff b/libmpeg2/libmpeg2_changes.diff
index ec95f96997..6220b61f03 100644
--- a/libmpeg2/libmpeg2_changes.diff
+++ b/libmpeg2/libmpeg2_changes.diff
@@ -111,7 +111,7 @@
} else
#endif
-#ifdef ARCH_ALPHA
-+#ifdef HAVE_VIS
++#ifdef HAVE_MVI
if (accel & MPEG2_ACCEL_ALPHA_MVI) {
mpeg2_idct_copy = mpeg2_idct_copy_mvi;
mpeg2_idct_add = mpeg2_idct_add_mvi;
diff --git a/libvo/video_out.h b/libvo/video_out.h
index e392b55f2b..7ad09a74a8 100644
--- a/libvo/video_out.h
+++ b/libvo/video_out.h
@@ -286,8 +286,6 @@ extern int vo_colorkey;
extern int WinID;
-#if defined(CONFIG_FBDEV) || defined(CONFIG_VESA)
-
typedef struct {
float min;
float max;
@@ -300,6 +298,4 @@ extern char *monitor_hfreq_str;
extern char *monitor_vfreq_str;
extern char *monitor_dotclock_str;
-#endif /* defined(CONFIG_FBDEV) || defined(CONFIG_VESA) */
-
#endif /* MPLAYER_VIDEO_OUT_H */
diff --git a/libvo/vo_direct3d.c b/libvo/vo_direct3d.c
index 43f594777c..78b8dbc159 100644
--- a/libvo/vo_direct3d.c
+++ b/libvo/vo_direct3d.c
@@ -52,9 +52,9 @@ const LIBVO_EXTERN(direct3d)
static struct global_priv {
int is_paused; /**< 1 = Movie is paused,
0 = Movie is not paused */
- int is_cfg_finished; /**< Synchronization "semaphore". 1 when
- instance of reconfigure_d3d is finished */
-
+ int is_clear_needed; /**< 1 = Clear the backbuffer before StretchRect
+ 0 = (default) Don't clear it */
+ D3DLOCKED_RECT locked_rect; /**< The locked Offscreen surface */
RECT fs_movie_rect; /**< Rect (upscaled) of the movie when displayed
in fullscreen */
RECT fs_panscan_rect; /**< PanScan source surface cropping in
@@ -155,6 +155,12 @@ static void calc_fs_rect(void)
"<vo_direct3d>Fullscreen Movie Rect: t: %ld, l: %ld, r: %ld, b:%ld\r\n",
priv->fs_movie_rect.top, priv->fs_movie_rect.left,
priv->fs_movie_rect.right, priv->fs_movie_rect.bottom);
+
+ /* The backbuffer should be cleared before next StretchRect. This is
+ * necessary because our new draw area could be smaller than the
+ * previous one used by StretchRect and without it, leftovers from the
+ * previous frame will be left. */
+ priv->is_clear_needed = 1;
}
/** @brief Destroy D3D Context related to the current window.
@@ -164,6 +170,11 @@ static void destroy_d3d_context(void)
mp_msg(MSGT_VO,MSGL_V,"<vo_direct3d>destroy_d3d_context called\r\n");
/* Let's destroy the old (if any) D3D Content */
+ if (priv->locked_rect.pBits) {
+ IDirect3DSurface9_UnlockRect(priv->d3d_surface);
+ priv->locked_rect.pBits = NULL;
+ }
+
if (priv->d3d_surface != NULL) {
IDirect3DSurface9_Release (priv->d3d_surface);
priv->d3d_surface = NULL;
@@ -254,10 +265,6 @@ static int reconfigure_d3d(void)
return 0;
}
- /* Fill the Surface with black color. */
- IDirect3DDevice9_ColorFill(priv->d3d_device, priv->d3d_surface, NULL,
- D3DCOLOR_ARGB(0xFF, 0, 0, 0) );
-
calc_fs_rect();
return 1;
@@ -269,9 +276,6 @@ static void uninit_d3d(void)
{
mp_msg(MSGT_VO,MSGL_V,"<vo_direct3d>uninit_d3d called\r\n");
- /* Block further calls to reconfigure_d3d(). */
- priv->is_cfg_finished = 0;
-
/* Destroy D3D Context inside the window. */
destroy_d3d_context();
@@ -288,40 +292,48 @@ static void uninit_d3d(void)
*/
static uint32_t render_d3d_frame(mp_image_t *mpi)
{
- D3DLOCKED_RECT locked_rect; /**< Offscreen surface we lock in order
- to cop