From bogus@does.not.exist.com Sat Mar 21 18:16:05 2009 From: bogus@does.not.exist.com () Date: Sat, 21 Mar 2009 17:16:05 -0000 Subject: No subject Message-ID: Simply it should be a good habit, imho ;) > Michael > _______________________________________________ > Mplayer-cvslog mailing list > Mplayer-cvslog at mplayerhq.hu > http://mplayerhq.hu/mailman/listinfo/mplayer-cvslog > Best regards! Nick From bogus@does.not.exist.com Sat Mar 21 18:16:05 2009 From: bogus@does.not.exist.com () Date: Sat, 21 Mar 2009 17:16:05 -0000 Subject: No subject Message-ID: > > _______________________________________________ > Mplayer-cvslog mailing list > Mplayer-cvslog at mplayerhq.hu > http://mplayerhq.hu/mailman/listinfo/mplayer-cvslog > Best regards! Nick From bogus@does.not.exist.com Sat Mar 21 18:16:05 2009 From: bogus@does.not.exist.com () Date: Sat, 21 Mar 2009 17:16:05 -0000 Subject: No subject Message-ID:   --- NEW FILE --- mplayer - codec status table

 

Status of codecs support

Video codecs
Audio codecs

Video codecs:

Built-in native codecs
codec name fourcc codecfile out comments
%i %F %d %Y %c
Fully functional Win32 VfW/DShow codecs
codec name fourcc codecfile out DShow comments
%i %F %d %Y %D %c
Codecs with problems
codec name fourcc codecfile problem
%i %F %d %c
Not yet working codecs:
codec name fourcc codecfile problem
%i %F %d %c
Not tested codecs:
codec name fourcc codecfile problem
%i %F %d %c

Audio codecs:

Built-in native codecs
codec name format codecfile comments
%i %f %d %c
Fully functional Win32 ACM/DShow codecs
codec name format codecfile DShow comments
%i %f %d %D %c
Codecs with problems
codec name format codecfile problem
%i %f %d %c
Not yet working codecs
codec name format codecfile problem
%i %f %d %c
Not yet tested codecs
codec name format codecfile problem
%i %f %d %c
--- NEW FILE ---

2.2. Wspierane kodeki

2.2.1. Kodeki Video

Zobacz: http://www.mplayerhq.hu/DOCS/codecs-status.html. Znajdziesz tam kompletn?, codziennie tworzon? list?!!!

Najwa?niejsze kodeki video:

  • MPEG1 (VCD) i MPEG2 (DVD) video
  • DivX ;-), OpenDivX (DivX4), 3ivx i inne warianty MPEG4
  • Windows Media Video 7 (WMV1) i 8 (WMV2) wykorzystywany w plikach .wmv
  • Kodeki Intel Indeo (3.1,3.2,4.1,5.0)
  • MJPEG, ASV2 i inne formaty sprz?towe
  • Kodeki XAnim
  • VIVO

Je?li masz kodeka Win32 nie wymienionego tutaj, oraz jeszcze nie obs?ugiwanego, przeczytaj importowanie kodek?w, by uzyska? informacje o tym, jak pom?c nam w dodaniu wsparcia dla niego!

2.2.1.1. DivX4

Ta sekcja zawiera informacje o kodekach DivX4 z ProjectMayo. Ich pierwsz? dost?pn? wersj? alfa by? OpenDivX 4.0 alfa 47 oraz 48. Wsparcie dla nich zosta?o do??czone w MPlayerze, i jest kompilowane standardowo. Dawniej u?ywali?my kodu postprocessing z tych kodek?w do opcjonalnego zwi?kszenia jako?ci film?w MPEG1/2. Teraz ju? stosujemy w?asny.

Nowa generacja tych kodek?w potrafi nawet dekodowa? filmy zrobione z u?yciem nies?awnych kodek?w DivX! Ale to jeszcze nie wszystko! S? one DU?O szybsze, ni? tradycyjne DLLe Win32 DivX. Zobacz poni?ej opis konfiguracji. Jedyn? wad? tych kodek?w jest fakt, ?e aktualnie s? one closed-source. :(

Kodeki mo?na ?ci?gn?? z nast?puj?cego URL:

    http://download2.projectmayo.com/dnload/divx4linux/divx4linux-20010718.zip

Rozpakuj je i uruchom, jako root, polecenie: ./install.sh .

Uwaga: NIE zapomnij doda? /usr/local/lib do /etc/ld.so.conf !

MPlayer automatycznie wykrywa czy DivX4 jest (w?a?ciwie) zainstalowany, wystarczy go, tak jak zawsze, skompilowa?. Je?li mplayer nie wykrywa DivX4, oznacza to, ?e nie zainstalowa?e? go w taki spos?b jak powy?ej podano, i/lub popsu?e? konfiguracj? (zobacz ostatnie pytanie w sekcji 5.1).

U?ywanie tego kodeka jest troch? skomplikowane. Poniewa? powstaje konflikt ze starym OpenDivX (jego API jest bardzo podobne do do tego z OpenDivX), kod OpenDivX jest wy??czony, r?wnie? sterownik OpenDivX wywo?uje t? bibliotek?.

Og?lnie mo?emy sprowadzi? to zagadnienie do faktu, ?e masz dwie opcje do zastosowania tego kodeka:

  -vc odivx   u?ycie kodeka divx4 jako nowej wersji OpenDivX. W tym przypadku produkuje on we w?asnym buforze obrazy YV12 oraz MPlayer (libvo) dokonuje konwersji przestrzeni kolor?w. (REKOMENDOWANE!)
-vc divx4 u?ycie konwersji przestrzeni kolor?w z kodeka divx4. W tym trybie mo?na u?y? r?wnie? YUY2/UYVY.

Metoda 'odivx' jest zazwyczaj szybsza, ze wzgl?du na fakt, ?e przenosi ona dane obrazu do formatu YV12 (planar YUV 4:2:0), a to wymaga du?o mniejszego pasma przenoszenia na szynie. W trybie spakowanego YUV (YUY2, UYVY) stosuj metod? 'divx4'. W trybie RGB mo?esz dowolnie wybiera?, poniewa? pr?dko?ci ich s? takie same, r??ni? si? by? mo?e tylko w odniesieniu do aktualnego bpp.

Uwaga: ten kodek wspiera r?wnie? postprocessing, ale zakres warto?ci jest dziwny: (UAKTUALNI?)

  0   bez postproc
10 .. 20 postprocessing, normalny (jak na poziomie 2 z divxd)
30 .. 60 mocny prostprocessing, obci??a mocno CPU (podobnie jak poziom 4 z divxd

2.2.1.2. DivX/libavcodec z ffmpeg

Poczynaj?c od wersji 0.4.2, ffmpeg zawiera kodek DivX opensource, kt?ry jest kompatybilny z tradycyjnym DivX. MPlayer wspiera ten kodek i dzi?ki temu mo?liwe staje si? ogl?danie film?w DivX/DivX4 na platformach innych ni? x86 oraz osi?ganie du?o szybszej pr?dko?ci dekodowania DivX/DivX4, ni? za pomoc? kodek?w Win32 i oryginalnych bibliotek DivX4
. Poniewa? zosta?o to usuni?te z drzewa cvs MPlayera, musisz ?ci?gn?? to r?cznie bezpo?rednio z drzewa cvs FFmpeg

.

cvs -d:pserver:anonymous at cvs.ffmpeg.sourceforge.net:/cvsroot/ffmpeg login
cvs -d:pserver:anonymous at cvs.ffmpeg.sourceforge.net:/cvsroot/ffmpeg co ffmpeg

UWAGA: Je?li kopiujesz z podkatalogami CVS, nast?pnym razem wystarczy zrobi? 'cvs update'.

Teraz przenie? nowo ?ci?gni?te ?r?d?a ffmpeg: katalog libavcodec, (ze wszystkimi jego podkatalogami) do drzewa katalogowego MPlayera, tak, aby to wygl?da?o w taki spos?b:

    main/libavcodec

Linkowanie symboliczne NIE jest wystarczaj?ce. Musisz to skopiowa? b?d? przenie??!!!

Nast?pnie skompiluj. configure wykrywa czy wszystko jest w porz?dku i mo?e by? skompilowane. Ten kodek r?wnie? wspiera postprocessing!

W celu u?ycia go, od?wie? sw?j plik codecs.conf, zgodnie z tym, co m?wi? strony podr?cznika lub example.conf (opcja -vfm).

Aby osi?gn?? najwi?ksz? pr?dko?? na moim K6, usuwam sekcj? ffmpeg12 z codecs.conf (ten kodek nie jest zoptymalizowany a libmpeg2 jest dwa razy szybszy), i wpisuj? vfm=5 w moim pliku konfiguracyjnym. Po czym MPlayer zawsze ju? u?ywa ffdivx/ffodivx do dekodowania plik?w DivX/DivX4 oraz libmpeg2 do plik?w MPEG1/2. Przy takiej konfiguracji na moim K6/2 500 z Matrox G400 mog? ogl?da? filmy DivX/DivX4 w najwy?szej rozdzielczo?ci, bez straty klatek (framedrop).

2.2.1.3. Kodeki XAnim

U?ywanie (niekt?rych) kodek?w XAnim z innym programem ni? XAnim, jest NIELEGALNE. TWOIM obowi?zkiem jest przeczytanie licencji i zastosowanie si? do niej. Autorzy MPlayera nie mog? zosta? poci?gni?ci do odpowiedzialno?ci za jakiekolwiek, sprzeczne z prawem, zachowania u?ytkownik?w.

A wi?c: tak, MPlayer potrafi u?ywa? do dekodowania kodek?w XAnim. W??czenie ich jest bardzo proste:

  • ?ci?gnij kodeki, kt?rych chcesz u?ywa? ze strony XAnim. Nie ma tam kodeka 3ivx , wi?c ?ci?gnij go ze strony 3ivx.
  • U?yj opcji --with-xanimlibdir, aby poda? dla configure, gdzie znajduj? si? kodeki xanim. Domy?lnie s? one szukane w katalogu / (...) .
  • Zmie? nazwy plik?w, obcinaj?c cz??? dotycz?c? architektury tak, aby wygl?da?y one nast?puj?co: vid_cvid.xa, vid_h263.xa, vid_iv50.xa

Jest to rodzina kodek?w video o numerze 10, przydatne wi?c b?dzie u?ycie opcji -vfm 10 i poinformowanie MPlayera, by ich u?y? je?li to mo?liwe.

Testowane kodeki: Indeo 3.2, 4.1, 5.0, CVID, 3ivX, h263.

2.2.1.4. Obraz VIVO

MPlayer potrafi odgrywa? obrazy Vivo (1.0 i 2.0). Najbardziej odpowiedni kodek do plik?w 1.0, to dekoder FFmpeg's H263, Mo?esz go u?y? za pomoc? opcji -vc ffh263 (b?dziesz potrzebowa? najnowszego libavcodec!). Do plik?w 2.0 u?yj ivvideo.dll pliku DLL Win32 (do sci?gni?cia tutaj), zainstaluj go w /usr/lib/win32, b?d? w innym miejscu, w kt?rym przechowujesz kodeki Win32. Ten p??niejszy kodek nie obs?uguje tryb?w YV12 ani YUY2, a tylko BGR i jest u?yteczny wy??cznie z wyj?ciami X11 i OpenGL. Miejmy nadziej?, ?e ffh263 b?dzie wspiera? pliki VIVO 2.0 w przysz?o?ci.

2.2.1.5. Obraz MPEG 1/2

MPEG1 i MPEG2 s? dekodowane za pomoc? biblioteki w?asnej libmpeg2. Jej kod ?r?d?owy jest zawarty w MPlayerze i oczywi?cie jest wieloplatformowy. Obs?ugujemy pliki video MPEG1/2 z b??dami przez sprawdzanie, jak? sygnatur? zwraca libmpeg2, i kiedy jest to sig11 (segmentation fault), szybko inicjalizujemy ponownie kodek, i kontynuujemy dok?adnie z tego miejsca, w kt?rym pojawi? si? b??d. Nie ma tu zauwa?alnej straty pr?dko?ci.

2.2.1.6. MS Video1

Jest bardzo stary i bardzo z?y kodek Microsoftu. W przesz?o?ci by? on dekodowany z kodekiem Win32 msvidc32.dll, teraz mamy w?asn? implementacj? open-source wykonan? przez Mike'a Melansona).

2.2.1.7. Cinepak CVID

Najlepszym sposobem, aby ogl?da? obrazy Cinepak za pomoc? MPlayera jest u?ycie kodeka XAnim vid_cvid.xa, poniewa? obs?uguje on wyj?cia YV12, YUY2, w przeciwie?stwie do kodeka Win32, kt?ry wspiera wy??cznie RGB.

2.2.2. Kodeki d?wi?ku

Najwa?niejsze kodeki d?wi?ku, to:

  • MPEG layer 2 oraz layer 3 (MP3) audio(w?asny kod, z optymalizacj? MMX/SSE/3DNow!)
  • MPEG layer 1 audio(w?asny kod, z libavcodec)
  • AC3 Dolby audio (w?asny kod, z optymalizacj? SSE/3DNow!)
  • Ogg Vorbis kodek audio (w?asna biblioteka)
  • Voxware audio (u?ycie DirectShow DLL)
  • alaw, msgsm, pcm i inne proste stare formaty d?wi?kowe

2.2.2.1. Programowe dekodowanie AC3

Domy?lny dekoder, u?ywany do plik?w z d?wi?kiem AC3.

Dekoder AC3 mo?e tworzy? mieszanki wyj?ciowego d?wi?ku dla 2, 4 lub 6 g?o?nik?w. Skonfigurowany dla 6 g?o?nik?w, dekoder ten dostarcza oddzielne wyj?cia dla wszystkich kana??w AC3 do sterownika karty d?wi?kowej, umo?liwiaj?c do?wiadczenie wra?enia pe?nego "d?wi?ku otaczaj?cego", bez wymagania od zewn?trznego dekodera AC3 u?ycia kodeka hwac3.

U?yj opcji -channels, aby wybra? ilo?? kana??w wyj?ciowych. U?yj opcji -channels 2 dla stereo downmix. Dla czterokana?owego downmix (wyj?cia lewo-prz?d, prawo-prz?d, lewo-ty?, prawo-ty?), u?yj opcji -channels 4. W tym przypadku jakikolwiek centralny kana? b?dzie miksowany odpowiednio do przednich kana??w. Ostatecznie, "-channels 6" b?dzie wyprowadza?o wszystkie kana?y AC3 tak, jak s? zakodowane - w kolejno?ci lewy, prawy, lewy-tylny, prawy-tylny, centralny oraz LFE.

Domy?lna liczba kana??w wyj?ciowych wynosi 2.

Aby korzysta? z wi?cej ni? dw?ch kana??w wyj?ciowych, musisz u?y? OSS, i posiada? sterownik dla karty d?wi?kowej, kt?ry obs?uguje odpowiedni? liczb? kana??w wyj?ciowych przez SNDCTL_DSP_CHANNELS ioctl. Na przyk?ad wersja sterownika emu10k1 (u?ywanego z kartami SB Live), nowsza ni? z sierpnia 2001, powinna by? odpowiednia.

Miksowanie na wyj?ciu wi?cej ni? dw?ch kana??w powinno by? traktowane jako eksperymentalne.

2.2.2.2. Sprz?towe dekodowanie AC3

Potrzebna ci b?dzie karta d?wi?kowa, zdolna do obs?ugi AC3, z cyfrowym wyj?ciem (SP/DIF). Sterownik karty d?wi?kowej musi obs?ugiwa? format AFMT_AC3 (tak, jak to jest w SB Live!). Po??cz sw?j dekoder AC3 do wyj?cia SP/DIF oraz u?yj opcji '-ac hwac3'. To mo?e zadzia?a?, b?d? nie (status eksperymentalny - najprawdopodobniej nie zadzia?a).

2.2.2.3. Obs?uga libmad

libmad jest wieloplatformow? bibliotek? dekodowania d?wi?ku MPEG. Je?li nie wiesz dlaczego to jest dobre, prawdopodobnie nie potrzebujesz tego.

Aby w??czy? obs?ug?, skompiluj ?r?d?a z opcj? --enable-mad.

2.2.2.4. D?wi?k VIVO

Kodek d?wi?ku stosowany do plik?w VIVO zale?y od tego, czy jest to plik VIVO/1.0, czy VIVO/2.0. Pliki VIVO/1.0 zawieraj? d?wi?k g.723, za? pliki VIVO/2.0 maj? Vivo Siren. Obecnie ?aden z nich nie jest wspierany, ale mo?esz ?ci?gn?? kodek g.723 z tej strony, a nast?pnie skopiowa? go do katalogu /usr/lib/win32 lub innego odpowiedniego.

2.2.3. Importowanie kodek?w Win32

2.2.3.1. Kodeki VFW

VfW (Video for Windows), jest to stare Video API dla Windows. Jego kodeki maj? rozszerzenia .DLL lub (rzadziej) .DRV. Je?li MPlayer nie dzia?a z twoim AVI:

    UNKNOWN video codec: HFYU (0x55594648)

To oznacza, ?e tw?j AVI jest zakodowany za pomoc? kodeka, kt?ry ma HFYU fourcc (HFYU = kodek HuffYUV, DIV3 = DivX Low Motion, itd....). Teraz, gdy ju? to wiemy, b?dziemy musieli dowiedzie? si?, kt?r? bibliotek? DLL z Windows za?adowa?, aby m?c odtworzy? ten plik. W naszym przypadku system.ini zawiera to (oraz wiele innych):

    VIDC.HFYU=huffyuv.dll

Tak wi?c b?dziemy potrzebowa? pliku huffyuv.dll. Zauwa?, ?e kodeki d?wi?ku s? wyr??nione za pomoc? prefiksu MSACM:

    msacm.l3acm=L3codeca.acm

To jest kodek MP3. Maj?c ju? wszystkie potrzebne informacje (fourcc, plik z kodekiem, pr?bka AVI), wy?lij ??danie wsparcia dla twojego kodeka mailem i za?aduj te pliki przez FTP:

    ftp://ftp.mplayerhq.hu/MPlayer/incoming/[nazwa_kodeka]/

2.2.3.2. Kodeki DirectShow

DirectShow to najnowsze Video API, kt?re jest nawet gorsze, ni? jego poprzednik. Sprawy si? bardziej komplikuj?, odk?d:

  • system.ini nie zawiera potrzebnych informacji, a w zamian za to jest przechowywany w rejestrze :(
  • b?dzie potrzebny nam GUID kodeka.

Wi?c znajd?my ten przekl?ty rejestr ...

  • Uruchom 'regedit'.
  • Wci?nij ctrl-f, odznacz pierwsze dwie opcje i zaznacz trzeci?. Wpisz fourcc kodeka (np.: TM20).
  • Powinno si? pokaza? pole ze ?cie?k? i nazw? pliku (np. : C:\WINDOWS\SYSTEM\TM20DEC.AX).
  • Skoro mamy ju? plik, potrzebne nam jeszcze GUID. Spr?buj jeszcze raz poszuka?, ale tym razem nazwy kodeka, nie fourcc. Jego nazw? mo?na odczyta? w File/Properties/Advanced, podczas odtwarzania tego pliku przez Media Player. Je?li si? nie da, to pech ;) Spr?buj zgadn?? (np. szukaj: TrueMotion).
  • Je?li znalaz?e? (w rejestrze), powinno by? tam pole FriendlyName oraz pole CLSID. Zapisz, ?e 16 bajt?w CLSID, to potrzebne nam GUID.

UWAGA:Poszukuj?c plik?w, staraj si? w??czy? wszystkie pola wyboru ... Mo?esz dosta? wiele nieprzydatnych odpowiedzi, ale by? mo?e dostaniesz te w?a?ciwe przy okazji ...

UWAGA: W razie niepowodzenia zrzu? wszystko na M$.

Maj?c ju? wszystkie potrzebne informacje (fourcc, GUID, plik z kodekiem, pr?bka AVI), wy?lij zg?oszenie wsparcia dla swojego kodeka mailem, i prze?lij te pliki na adres FTP:
ftp://ftp.mplayerhq.hu/MPlayer/incoming/[nazwa_kodeka]/

--- NEW FILE ---

MPlayer - Movie Player for LINUX (C) 2000-2001 Arpad Gereoffy (A'rpi/ESP-team)

http://www.mplayerhq.hu


[ Angielski ] [ W?gierski ] [ Niemiecki ] [ Francuski ] [ Polski ]


Spis tre?ci


[...1595 lines suppressed...]
No sound at all:
  • your file uses an unsupported codec
    Workaround: read the documentation and help us adding support for it

Video-out problems:

First note: options -fs -vm and -zoom are just recommendations, not (yet) supported by all drivers. So it isn't a bug if it doesn't work. Only a few driver supports scaling/zooming, don't expect this from x11 or dga.

OSD/sub flickering:
- x11 driver: sorry, it can't be fixed now
- xv driver: use -double option

--- NEW FILE ---

2.4. Encoding with MEncoder

Overview

MEncoder (MPlayer's Movie Encoder) is a simple movie encoder, designed to encode MPlayer-playable movies (AVI/DVD/VCD/VOB/MPG/MOV/VIV/NET) to other MPlayer-playable formats (see below). Currently it's in beta stage, and encodes only to DivX4 (1 or 2 passes) video, PCM/MP3/VBRMP3 audio. Also has stream copying abilities. In the future, there will be cropping, resizing filters, and other interesting stuff.

Compiling

  • read MPlayer's compilation instructions, it contains info about how to install libdvdread for DVD support, etc.
  • download the newest DivX4linux libs from avifile.sourceforge.net, and have them PROPERLY installed. This is needed for DivX4 (1/2 pass) encoding. And since this is mandatory (now), MEncoder is Linux-only.
  • download and compile libmp3lame (from lame 3.89beta or lame CVS).
    WARNING : DO NOT COMPILE LAME WITH GCC 2.96 ! It won't work properly !
    This is needed for CBR/VBR MP3 audio encoding ability. Note that a single lame binary isn't sufficient. BTW: the less optimization you use for lame, the better the quality will be. You can test quality by running make test after lame's compiling process is over. The resulting number should be less than 30. Don't panic if it's 400 or so, you shouldn't heard any audible quality decrease. Oh, and if your compiler doesn't even run make test ... Well, delete that GCC 2.96.
  • use ./configure with optional parameters as usual (use --enable-tv to include V4L tuner grabbing code), and type : make mencoder , then make install.

You are ready. As you probably know, other encoding tools need the avifile library installed. MEncoder doesn't need it at all.

MEncoder features :

  • encoding from the wide range of fileformats and decoders of MPlayer
  • encoding from V4L compatible TV tuners
  • encoding/multiplexing to interleaved AVI files with proper index
  • 1 or 2 pass DivX4 video
  • VBR MP3 audio
  • PCM audio
  • stream copying (CBR audio only)
  • input A/V synchronizing (PTS-based, can be disabled with -mc 0 option)
  • FPS correction with -ofps option (useful when encoding 29.97fps VOB to 24fps AVI)
  • movie rescaling

Planned features :

  • using audio from separate file (AC3, MP3, OGG)
  • VBR audio stream copy
  • even wider variety of available en/decoding formats/codecs (creating VOB files with DivX4/Indeo5/VIVO streams :)

Encoding 2-pass DivX4

The name comes from the fact that this method encodes the file twice. The first encoding (dubbed pass) creates some temporary files with a size of few megabytes (do not delete them yet). In the second pass, the output file is created, using the bitrate data from the temporary file. The resulting file will have much better image quality. If this is the first time you heard about this, you should consult some guides available on the Net.

This example shows how to encode a DVD to a 2-pass DivX4 AVI. Just two commands are needed :
    mencoder -dvd 2 -ovc divx4 -oac mp3lame -divx4opts br=1100 -o movie.avi -pass 1
    mencoder -dvd 2 -ovc divx4 -oac mp3lame -divx4opts br=1100 -o movie.avi -pass 2

Rescaling movies

Often the need to resize movie images' size emerges. Its reasons can be many, examples are decreasing output file size, encoding SVCDs to DivX. Ripped DVDs are mostly rescaled, for example a 4:3 DVD should be 640x480, especially when you want it to fit to 1 CD, and have good quality at the same time. SVCDs have 480x480 size, and their header contains the aspect ratio the player should use (Ex.: 480x480 + 4:3 = 640x480). However when encoding to AVI (DivX) files, you have be aware that AVI headers don't store this value. Thus, the only solution is rescaling.

The output size is specified with the -x, and -y options. Furthermore, there are 3 rescaling filters in MEncoder, 0 : fast 1 : bilinear, 2 : bilinear, bicubic (best quality). They can be specified with the -sws option. If not specified, MEncoder will use 0 : fast bilinear.

Rescaling is very simple :
    mencoder sample-svcd.mpg -divx4opts br=1300 -x 640 -y 480 -sws 2 -o output.avi

Stream copying

MEncoder can handle input streams in two ways : encode or copy them. This section is about copying.

  • Video stream (option -ovc copy) : nice stuff can be done :)
    Like, putting (not converting!) FLI or VIVO or MPEG1 video into an AVI file ! Of course only MPlayer can play such files :) And it probably has no real life value at all. Rationally : video stream copying can be useful for example when only the audio stream has to be encoded (like, uncompressed PCM to MP3).
  • Audio stream (option -oac copy) : straightforward.

Syntax

  mencoder [options] [input file] [options] ...

Available options

NOTE : for all available options, read the manpage !

   -o filename    specify output filename
   -x width in pixels    rescale output video to given pixels width
   -y height in pixels    rescale output video to given pixels height
   -sws 0-2    type of scaling method
  0 - fast bilinear
  1 - bilinear
  2 - bicubic (best quality)
   -ovc codecname    Encode with the given codec (codec names are from codecs.conf). Examples:
  help - get list of available codecs
  copy - no encoding, just copy the stream (only from AVI/ASF now)
  divx4 - encode to DivX4
   -oac codecname    Encode with the given codec (codec names are from codecs.conf). Examples:
  help - get list of available codecs
  copy - no encoding, just copy the stream (only from AVI/ASF now)
  pcm - encode to uncompressed PCM
  mp3lame - encode to MP3 (using Lame)
   -divx4opts    If encoding to DivX4, you can specify its parameters here, like:
  -divx4opts br=1800:deinterlace:key=250
Common options: (for full list, check the manpage!)
  help - get help
  br=XXX - specify bitrate in kbit <4-16000> or bit <16001-24000000>
  q=XXXX - quality (1-fastest, 5-best - default 5)
   -lameopts    If encoding to MP3 with libmp3lame, you can specify its parameters here, like:
  -lameopts q=3
  -lameopts br=192:cbr
Common options: (for full list, check the manpage!)
  help - get help
  cbr - select CBR MP3 (default is VBR)
  br=XXX - specify bitrate in kbit <0-1024> (this is for CBR only!)
  q=XXXX - quality (0-highest, 9-fastest - default 0) (this is for VBR only!)

Examples

Using MEncoder is the easiest thing on Earth. See the following :

Encoding from DVD, title 2 :
    mencoder -dvd 2 -o title2.avi

Encoding from DVD, title 2, with rescaling :
    mencoder -dvd 2 -x 640 -y 480 -sws 2 -o title2.avi

Encoding from HTTP :
    mencoder http://mplayer.hq/example.avi -o example.avi

Encoding from a pipe :
    rar p test-SVCD.rar | mencoder -divx4opts br=800 -ofps 24 -pass 1 -- -

Encoding multiple *.vob files :
    cat *.vob | mencoder <options> -

Encoding from tuner (for tuner options see the TV input section !) :
    mencoder -tv on:driver=v4l:width=640:height=480 <options>

For all available options, check the MEncoder man page !

--- NEW FILE ---

5. FAQ section

5.1 Compilation

 
  Q: configure ends with this text, and MPlayer won't compile !
Your gcc does not support even i386 for '-march' and '-mcpu'.
A: Your gcc isn't installed correctly, check config.log file for details.
 
  Q: What does "No such file or directory" means ?
A: Probably there is no such file or directory.
 
  Q: What's the problem with gcc 2.96 ?
A: To be short: DO NOT USE gcc 2.96 !!!
Check this and this texts! If you still really really want to do so, be sure to use the latest release.
 
Q: Great, I have gcc 3.0.1 from RedHat/Mandrake, then I'm fine--!
A: No, since there have been/are issues with those compilers.
Use 2.95.x series for reliability (not 2.96). Use the latest gcc 3.0.x (starting at 3.0.2) if you want to use a 3.0.x version.
 
Q: I tried to compile MPlayer, but I got this output:
In file included from /usr/include/g++-v3/bits/std_cwchar.h:42,
                 from /usr/include/g++-v3/bits/fpos.h:40,
                 from /usr/include/g++-v3/bits/char_traits.h:40,
                 from /usr/include/g++-v3/bits/std_string.h:41,
                 from /usr/include/g++-v3/string:31,
                 from libwin32.h:36,
                 from DS_AudioDecoder.h:4,
                 from DS_AudioDec.cpp:5:
/usr/include/wchar.h: In function Long long int wcstoq(const wchar_t*,
   wchar_t**, int)':
/usr/include/wchar.h:514: cannot convert `const wchar_t* __restrict' to
`const
A: Upgrade your glibc to the newest. On Mandrake, use 2.2.4-8mdk .
 
Q: ...gcc 2.96... (yes, some people are STILL flaming about their gcc 2.96!!)
A:

But we has idegs (the word 'ideg' is described further in the FAQ). And our idegcounters overflow again and again.

Unfortunately MPlayer is out of our control. It's used by lamers, Linux users who can't even use windows, and never tried to compile a kernel. They installed (with default options) Mandrake or RedHat or Suse, and without RTFM'ing they send messages saying 'it doesn't work! help me! please! i'm new to the linux! help! oh! help me!'. We can't stop them, but at least we try to force them RTFM and to read fuckin' messages of ./configure and mplayer.

And you clever guys come and flame us with gcc 2.96 and binary packages. Instead of helping users or making patches to help solve problems.

Half of our spare/free time is spent by answering silly mails here and making newer tricks and checks to configure to avoid such mails.

And there is a balance. On one hand are you, clever guys, saying we are very bad because we don't like buggy gcc 2.96, and at the other hand there are the 'new to linux' guys who are showing us gcc 2.96 is buggy.

Conclusion: we can't be good. Half of people always will say we are bad.

Maybe we should close the project, make it closed source, commercial, and provide install support for it. then we could leave current work, so development could go faster, and we earn lots of money with it and buy a big house, etc etc. Do you really want it? It seems.

Arpi (a mail on the mplayer-users list)

 
Q: Where can I find information about gcc 2.96 bugs ?
A: In this documentation. And this documentation describes why RedHat released 2.96 and other interesting things.
 
Q: SDL output doesn't work or compile. Problem is ....
A: It is tested with newest SDL (probably runs on 1.1.7+). It does NOT work with any previous version, so don't ask.
 
Q: I am still having trouble compiling with SDL support. gcc says something about "undefined reference to `SDL_EnableKeyRepeat'" What's now?
A: Where did you install the SDL library? If you installed in /usr/local (the default) then edit the top level config.mak and add "-L/usr/local/lib " after "X_LIBS=" Now type make. You're done!
 
Q: It doesn't compile, and it misses uint64_t inttypes.h and similar things...
A: copy etc/inttypes.h to MPlayer directory (cp etc/inttypes.h .) try again...
 
Q: I have Pentium III but ./configure doesn't detect SSE
A: Only kernel versions 2.4.x supports SSE (or try latest 2.2.19 or newer, but be prepared for problems)
 
Q: I have G200/G400, how to compile/use mga_vid driver?
A: Read all this documentation.
 
Q: Are there rpm/deb/... packages of MPlayer?
A: You can make a .deb package for yourself, check section 6.1. It's _STRONGLY_ discouraged to use precompiled packages of MPlayer, since it (currently) _highly_ depends on compile-time options and optimizations! Precompiled packages are COMPLETELY unsupported by the MPlayer team!
 
Q: During 'make', MPlayer complains about X11 libraries. I don't understand, I DO have X installed!?
A: ...but you don't have the X development package installed. Or not correctly. It's called XFree86-devel* under RedHat, and xlib6g-dev* under Debian. Also check if the /usr/X11 symlink exists (this can be a problem on Mandrake systems). It can be created with the
    $ ln -sf /usr/X11R6 /usr/X11
command. Also check the /usr/include/X11 link :
    $ ln -sf /usr/X11R6/include/X11 /usr/include/X11
Your distribution may differ from the Linux Filesystem Standard.
 
Q: What about DGA driver? I can't find it!!!
A: ./configure autodetects your DGA driver. If -vo help doesn't show DGA, then there's a problem with your X installation. Try ./configure --enable-dga (and RTFM) Alternatively, try SDL's DGA driver with '-vo sdl:dga' options.
 
Q: I can't compile SVGAlib.. I'm using 2.3/2.4 kernel.
A: You have to edit SVGAlib's Makefile.cfg and comment "BACKGROUND = y" out.
 
Q: I compiled MPlayer with libdvdcss/libdivxdecore support, but when I try to start it, it says:
> error while loading shared libraries: lib*.so.0: cannot load shared object file: No such file or directory
I checked up on the file and it IS there in /usr/local/lib.
A: What are you doing on Linux? Can't you install a library? Why do we get these questions? It's not MPlayer specific at all! Add /usr/local/lib to /etc/ld.so.conf and run ldconfig . Or install it to /usr/lib , because if you can't solve the /usr/local problem, you are careless enough to do such things.
 
Q: MPlayer doesn't seem to find my libcss. What am I doing wrong ?
A: It's normal. MPlayer no longer depends on libcss to play a DVD. You have to install libdvdread and libdvdcss. Check for DVD Playback part here. libcss is to be used for example when you want to play encrypted VOB files from hard disk (not for general users).
 
Q: Hmm, strange. When loading the mga_vid.o kernel module, I found this in the logs:
Warning: loading mga_vid.o will taint the kernel: no license
A: The latest kernels modules needs require a flag indicating its license (mainly to avoid kernel hackers' debugging closed sources drivers). Upgrade your kernel and your modutils and MPlayer.
 
Q: When compiling MEncoder, it segfaults at linking !!!
A: Dunno, upgrading binutils should help (2.11.92.* or newer should be good). Not our fault, do NOT report!
 
Q: I'd like to compile MPlayer on Minix !
A: Me too.
 
5.2. General questions
 
Q: What about DVD playing ?
A: Read the CD/DVD section in this page.
 
Q: -xy or -fs option doesn't work with x11 driver (-vo x11)
A: It does, but you have to explicitly specify software scaling (it's SLOW!) with the -zoom option. You better use XF86VidMode support: you must specify the -vm and the -fs switch, and you're done. Make sure you have the right Modelines in your XF86Config file, and try if the DGA driver (and SDL's DGA driver, see RTFM) works for you. It's much faster. If SDL's DGA works too, use that, it'll be EVEN faster!
 
Q: What is the meaning of numbers in the status line?
A: See: A: 2.1 V: 2.2 A-V: -0.167 ct: 0.042 57 41% 0% 2.6% 0 4
  • A: audio position in seconds
  • V: video position in seconds
  • A-V: audio-video difference in seconds (delay)
  • ct: total A-V sync correction done
  • frames played (counting from last seek)
  • video codec cpu usage in percent (for mpeg it includes video_out too!)
  • video_out cpu usage for avi, 0 for mpg (see above)
  • audio codec cpu usage in percent
  • frames needed to drop to maintain A-V sync
  • current level of image postprocessing (when using -autoq)
Most of them are for debug purposes, and will be removed soon.
 
Q: What if I don't want them to appear?
A: Then you use the -quiet option, and read the manpage.
 
Q: Why is video_out cpu usage zero (0%) for mpeg files?
A: It's not zero, but it's built in into codec, so can't be measured separated. You should try to play the file using -vo null and then -vo ... and check the difference to see video_out speed...
 
Q: What's XMMP? (is it XMMS or XMPS but mispelled?)
A: It's a new project, see http://frozenproductions.com for details
 
Q: There are error messages about file not found /usr/lib/win32/....
A: Download w32codec.zip from *our* FTP (avifile's codec package has different DLL set). Install it.
 
Q: Are there any mailing lists on MPlayer?
A: Yes! See RTFM on how to subscribe them!
 
Q: I've found a nasty bug when I tried to play my favourite video!! Who should I inform?
A: See Appendix C.
 
Q: I have problems playing files with ... codec. Can I use'em?
A: Check http://www.mplayerhq.hu/DOCS/codecs-status.html, if it doesn't contain your codec, read section 2.1.3, and contact us.
 
Q: Umm, what is "IdegCounter"?
A: A mixture of a hungarian and an english word. In english, "Ideg" means "nerve", and is pronounced as something like "ydaegh" . It was first used to measure the nervousness of A'rpi, after some (umm) "mystic" disappearance of CVS code ;)
 
Q: And what is "Faszom(C)ounter" ?
A: "Fasz" is a hungarian word you don't want to know, the others are in connection with the pervert minds of the MPlayer developers.
 
Q: LIRC doesn't work, because ...
A: Are you sure you use "mplayer_lirc" instead of "mplayer"?
 
Q: Subtitles are very nice, the most beautiful I've ever seen, but they slow down the playing! I know it's unlikely...
A: After running ./configure , edit config.h and replace #undef FAST_OSD with #define FAST_OSD. Then recompile.
 
Q: The OSD is flickering!
A: You use a vo driver with single buffering (x11,xv). With xv, use -double option.
 
Q: What exactly is this libavcodec?
A: See the 2.1.2.2 section.
 
Q: But configure tells me "Checking for libavcodec ... no"!
A: You need to get libavcodec from FFmpeg's CVS. Read the instructions in the ffmpeg section.
 
Q: The GUI isn't usable with icewm, because some panel are over the movie!!
A: Known, icewm is shit and dictatoric. Unsolvable. In detail: icewm sucks because its taskbar overrides GUI's window resize queries. If it asks for resize to 800x600, then it resizes window to 800x(600-taskbar_size). It's bad. Very bad. In short: shit.
 
Q: I can't access the GUI menu. I press right click, but I can't access any menu items !
A: Are you using FVWM ? Try the following :
Start -> Settings -> Configuration -> Base Configuration

Set "Use Applications position hints" to Yes.
 
5.3. File playing problems
 
Q: ...... works with avifile/aviplay while doesn't with MPlayer.
A: MPlayer != avifile The only common thing between these players is the Win32 DLL loader. The codecs (dll) sets, syncronization, demultiplexing etc is totaly different and shouldn't be compared. If something works with aviplay it doesn't mean that MPlayer should do it and vice versa.
 
Q: Audio goes out of sync playing .avi file.
A: Try with -bps or -nobps option if still bad, send me (upload to ftp) that file, I'll check.
 
Q: Indeo 3.x/4.x movies are viewed upside-down!!!?
A: It's a known bug (really it's a bug/limitation of the DLL codec) Try if your vo driver supports the -flip switch.
 
Q: Indeo 3.x,4.x video doesn't work at 32bpp resolutions (16,24 bpp are ok).
A: It's a known bug (really it's a bug/limitation of the DLL codec).
 
Q: MPlayer exits with something error when using l3codeca.acm.
A: Check 'ldd /usr/local/bin/mplayer' output. If it contains
    libc.so.6 => /lib/libc.so.6 (0x4???????)
where "?" is any number then it's ok, the error is not here. If it is:
    libc.so.6 => /lib/libc.so.6 (0x00??????)
then there is problem with your kernel/libc. Maybe you are using some security patches (for example Solar Designer's OpenWall patch) which forces loading libraries to very low addresses. Because l3codeca.acm is a non-relocatable DLL, it must be loaded to 0x00400000, we can't change this. You should use non-patched kernel, or use MPlayer's -afm 1 option to disable using l3codeca.acm.
 
Q: My computer plays M$ DivX AVIs with resolutions ~ 640x300 and stereo mp3 sound too slow. When I use -nosound switch, everything is ok (but quiet).
A: Ok son, your machine is too slow. RTFM or anything.
 
Q: MPlayer dies with "MPlayer interrupted by signal 4 in module: decode_video".
A: Try running MPlayer on the machine you compiled on. Or recompile. Don't use MPlayer on different CPU than it was compiled on.
 
Q: I have problems with [your window manager] and fullscreen xv/xmga/sdl/x11 modes..
A: Use the -fsmode switch. See example.conf or manpage.
 
Q: But it works with avifile!
A: So what?
 
Q: Then avifile is better!
A: Then use avifile, it has nice GUI and nice C++ code :)
 
Q: I got this playing mpeg files: Can't find codec for video format 0x10000001!
A: You have old version of codecs.conf at ~/.mplayer/. Upgrade it from etc/
OR you have the vc= option or similar, in your config file(s).
 
Q: After starting mplayer under KDE(1/2) I just get a black screen and nothing happens, after about one minute the video starts playing.
A: The KDE arts sound daemon is blocking the sound device, either wait the time until video starts or you disable the arts-daemon in kontrollcenter. If you want to use arts sound, specify audio output via SDL (ao=sdl), and make sure your SDL can handle arts sound. Yet another option is to start mplayer with artsdsp.
 
Q: I have an AVI that plays with grey screen with -vc odivx, and green with -vc divx4 .
A: It's not a DivX file, but an M$ MPEG4v3 . Update your codecs.conf.
 
Q: There this movie is, and when I play it I get video-audio desync and/or MPlayer crashes with the following:
DEMUXER: Too many (945 in 8390980 bytes) video packets in the buffer!
A: This can have multiple reasons.
  • your CPU and/or video card and/or bus is too SLOW. MPlayer displays a message if this is the case. (and the dropped frames counter is going up fast)
  • if it is an AVI, maybe it has shit interleaving. Try the -ni option.
  • your sound driver is shit, or you use ALSA 0.5 with -ao oss. See the soundcards section.
  • the AVI has shit header, try with the -nobps option, and/or -mc 0 .
  •  
    Q: I have an MJPEG file which works with other players but displays only black image in MPlayer.
    A: Disable the Windows DLL in codecs.conf, or use -vc ffmjpeg option (you have to compile MPlayer with libavcodec).
     
    Q: When I try to grab from my tuner, it works, but colors are strange. It's ok with other applications.
    A: Your card probably misreports its colorspace capacity. Try with YUY2 instead of default YV12 (see TV input documentation).
     
    Q: When I try to start playing, I get this message, but playing is good :
    Linux RTC init: ioctl (rtc_pie_on): Permission denied
    A: See the Installation section. The part about new sync code.
     
    Q: I have A/V sync problems. Some of my AVIs play fine, but some play with double speed !
    A: You have buggy soundcard/driver. Most likely it's fixed at 44100Hz, and you try to play a file which has 22050Hz audio. Try the -ao sdl driver.
     
    Q: All the WMV (or other..) files I play gives green/gray window and there is only sound! It prints:
    Detected video codec: [null] drv:0 (NULL codec (no decoding))
    A: Update your codecs.conf
     
    Q: I'm using the GUI. During startup, MPlayer prints :
    Gtk-WARNING **: This process is currently running setuid or setgid.
    This is not a supported use of GTK+. You must create a helper
    program instead. For further details, see...
    A: You can't use GTK in a suid-root binary, as pointed out in the GUI section.
     
    5.4. Video/audio driver problems (vo/ao)
     
    Q: Ok, -vo help shows DGA driver, but it is babbling about permissions! Help me!
    A: It works only if running as root! It's a DGA limitation. You should become to root (su -), and try again. Another solution is making mplayer SUID root, but its NOT RECOMMENDED!
        chown root /usr/local/bin/mplayer
        chmod 750 /usr/local/bin/mplayer
        chmod +s /usr/local/bin/mplayer
    !!!! BUT STAY TUNED !!!!
    This is a *BIG* security risk! *NEVER* do this on a server or on a computer can be accessed by more people than only you because they can gain root privilegies through suid root mplayer!!!
    !!!! SO YOU HAVE BEEN WARNED ... !!!!
     
    Q: When using Xvideo, my Voodoo 3/Banshee says:
    X Error of failed request: BadAccess (attempt to access private resource denied)
      Major opcode of failed request: 147 (MIT-SHM)
      Minor opcode of failed request: 1 (X_ShmAttach)
      Serial number of failed request: 26
      Current serial number in output stream:27

    A: Your driver is old, update it. Either download (at least) DRI version 0.6 from http://dri.sourceforge.net, or use the DRI cvs.
     
    Q: When using Xvideo, I can't play DivX avis with my Voodoo 3/Banshee! It says:
    ...
    Xvideo image format: 0x32315659 (YV12) planar
    Xvideo image format: 0x30323449 (I420) planar
    ...
    A1: See the previous answer.
    A2: Since 0.18pre4 we support libavcodec from the ffmpeg package. It contains a C language DivX and OpenDivX decoder. The DivX decoder uses YV12 format for output, thus it should work for you. Compile in libavcodec support.
     
    Q: OpenGL (-vo gl) output doesn't work (hangup/black window/X11 errors/...).
    A: Your opengl driver doesn't support dynamic texture changes (glTexSubImage) It's known not to work with nVidia's binary shit. It's known to work with Utah-GLX/DRI and Matrox G400 card. Also with DRI and Radeon card. It won't work with DRI others than these. it will not work with 3DFX cards because the 256x256 texture size limit.
     
    Q: I have an nVidia TNT/TNT2 card, and I have a band with strange colours, right under the movie! Whose fault is this?
    A: It's the nVidia X driver's. These bugs are ONLY with the TNT/TNT2 cards, and we can't do anything about it, it's not our bug. UPDATE : it's fixed in newest drivers, at last..
     
    Q: I have an nVidia XYZ card, and when I click on the GUI's diplay window to toggle displaying the GUI panel, a black square appears where I clicked. I have the newest driver.
    A: Yes, nvidia corrected a previous bug (above), and implemented a new one. Let's congratule them.
     
    Q: When I use the GUI with SDL video output, a second video window is created.
    A: Known, don't use SDL for GUI yet.
     
    5.5. Feature requests
     
    Q: Is there a hint on how to watch RealMedia movies in MPlayer?
    A: There's no way to do it. Therefore this format deserves to die in flames. Theoretically you can reverse engineer Real codecs built for Linux (they are available as .so files), but in practice that's really difficult, even if you know how the compiler used by Real is making assembler code.
     
    Q: When will be <your favourite video feature> (like subtitle placement) implemented?
    A: Wait for libvo2.
     
    Q: I want to play MP3 files with MPlayer !
    A: This feature is not planned. There are much better players (mpg123, 3pm, xmms) for this task, use them. BTW, MPlayer stands for Movie Player.
     
    Q: I'd like to seek +/- 1 frames, instead of 10 seconds.
    A: This won't be done. It was, but then it fucked up A/V sync. Feel free to implement it, and send a patch. Don't ask for it.
     
    Q: Where is the Windows version ?
    A: It's not released, and won't be. Look around the windows scene (opensource ASF parsers, opensource ASF encoders, etc) and you'll know why. We don't want to go to jail.
     
    Q: What card you may suggest me to buy?
    A0: It's for your opinion only but our issues are:
    A1: Speed:
    This parameter can be computed very easy:
    a) which movies do you plan to watch:
    - MPEG1: 320x200 at 32=256000
    so you need only 256*25fps=6.4Mb/sec bandwidth (This format can be played in real-time on any PC since P-100 + S3Virge)
    - MPEG4: 640x480 at 32=1228800
    you need videobandwidth 1.2*25fps=30Mb/sec To watch such movie in real-time you need enough power PC: (Celeron-450+DIMM based video card)
    - MPEG2 (aka DVD or SDTV): 1024x768 at 32=3145728
    you need videobandwidth 3*30fps=90Mb/sec In extremal cases (if your video card supports IDCT decoding) this can be played on the same PC as for MPEG4
    - HDTV (HighData TeleVision): 2000x2000 at 32=16000000
    i.e. videobandwidth = 16*30fps=480Mb/sec (This means also that you need at least 32Mb of video memory to watch this stream: 16Mb for RGB area and 16Mb for YUV area)
    b) Bandwidth of PCI slot is: 33Mhz*32bit=132Mb/sec And PCI2.1 has 66MHz*32bit=265Mb/sec that is far enough for any movie playback (except HDTV streams which really require AGP bus).
    c) What memory type should be installed on video card:
    SIMM - avoid that
    DIMM - good if your video card has 128-bit memory access.
    DDR - is far enough for all types.
    Note: By DGA comparision - there is no any visible difference between video cards which have installed the same type of video memory.
    Resume: If you have enough power CPU (Celeron-450 or K6-2-500) it would be enough to buy any video card which has at least 8Mb of DIMM or DDR memory.
    A2: Quality:
    This question was investigated in depth at:
    http://www.anadtech.com AnandTech - Video Card Roundup - DVD Quality, Features & Performance (October 2000)
    A3: WORKING features under Linux:
    If you are win32 user then probably you have support (from driver and DirectX8 side) for any feature which was introduced in your chip.
    But for linux users:
    Currently I know only several vendors which have more or less advanced support under Linux:
     
     
    Matrox
    ATI
    NVidia
    S4 Savage
    Driver's provider enthusiasts enthusiasts OEM + enthusiasts enthusiasts
    Driver's quality Best(X11,kernel) Best(X11,GATOS,kernel) Buggy(X11 only) Best(X11 only)
    VIDEO OVERLAY
    BES and YV2RGB YES YES YES YES
    scaling filters N/A YES N/A N/A
    adaptive deinterlace NO YES N/A N/A
    Video equalizer (hue, contrast, saturation, color correction) N/A PARTLY (under devel) N/A N/A
    Alpha blending, color and video keys PARTLY PARTLY (under devel) N/A N/A
    Video capture N/A YES(GATOS) N/A N/A
    TV-out YES YES N/A N/A

    Well - it's very rude observing of video card. Indeed we should pay our attention for models of video card:
    For example if MatroxG400(G450) drivers support TV-out then G550 has no such support.
    Other sample: Adaptive deinterlacing exists only since Rage128 chip and isn't present on Mach64+ ones. Same as 3D features are far different from Mach64 to Radeon2 8500 with trueform possibilities.

    ANYWAY - MPLAYER'S TEAM DOESN'T ACCEPT ANY CLAIMS IF YOU AFTER
    READING OF THIS MATERIAL WILL BUY CARD WHICH IS UNSUCCESSFUL FOR YOU!!!
    THIS MATERIAL IS ONLY OUR VISION.

    Q: If PCI slot is far enough for most types of movies then why S3 Virge
    is too slow for them?
    A: Due to its SIMM memory.

     
    5.6. Encoding
     
    Q: How can I encode ?
    A: Check this documentation.
     
    --- NEW FILE ---

    2.1. Supported formats

    MPlayer can read/play from the following devices/formats:

    • VCD (Video CD) directly from CD-ROM or from CDRwin's .bin image file
    • DVD, directly from your DVD disk, using libdvdread for decryption
    • MPEG 1/2 System Stream (PS/PES/VOB) and Elementary Stream (ES) file formats
    • RIFF AVI file format
    • ASF/WMV 1.0 file format
    • QT/MOV file format with (un)compressed headers
    • VIVO format (.viv files)
    • supports reading from stdin, or network via HTTP

    Note: about realmedia (.ra/.rm) support read the FAQ!

    It's important to clarify a popular mistake. When people see a file with .AVI extension, they instantly declare that isn't an MPEG file. That's not true. At least not entirely. If you tell them that such a file can contain MPEG1 video, they laugh at you. Feel free to kick their dumbass faces, then tell them to RTFM.

    You see, a codec isn't equal to a file format.
    Video codecs are: MPEG1, MPEG2, DivX, Indeo5, 3ivx.
    Video formats are: MPG, AVI, ASF.

    In theory, you can happily put an OpenDivX video and MP3 audio into a .MPG format file. Though most players won't play it, since they expect MPEG1 video and MP2 audio (.MPG doesn't have the necessary fields to describe its video and audio streams, like .AVI does). Or put MPEG1 video to an .AVI. For example ffmpeg can create these files.

    Audio codecs and formats are basically the same terms.

    2.1.1. Video formats

    2.1.1.1. MPEG files

  • MPG : this is the most basic form of MPEG file formats. Contains MPEG1 video, and MP2 (MPEG-1 layer 2) audio, or rarely MP1.
  • DAT : this is the very same format as MPG, just different extension. Used on Video CDs. Due to the nature VCDs are created and Linux is designed, the DAT files can't be played nor copied from VCDs. You have to use the -vcd option to play the VideoCD.
  • VOB : this is the MPEG file format on DVDs. The same as MPG, plus capability to contain subtitles, or non-MPEG (AC3) audio. Contains encoded MPEG2 video, and usually AC3 audio, but MP2 is allowed too.
    Read the DVD section !
  • In MPEG files, series of frames are grouped together, and are independent from the other groups. What this means is you can cut/join an MPEG file with standard file-tools (like dd, cut), and it remains completely functional.

    One important feature for MPGs is that they have a field to describe the aspect ratio of the video stream within. For example SVCDs have 480x480 resolution video, and in the header that field is set to 4:3, so it's played at 640x480. AVI files don't have this field, so one has to rescale it during encoding.

    2.1.1.2. AVI files

    Designed by Micro$oft, the AVI (Audio Video Interleaved) is a widespread multipurpose format, currently used mostly for DivX and DivX4 videos. Has many known drawbacks, and inabilities (for example in streaming). Has support for one video stream, and 99 audio streams. Can be as big as 2Gb. There exists an extension for it to be bigger, called OpenDMS. M$ currently strongly discourages its use and propagates ASF/WMV. Not if anybody cares.
    NOTE : DV cameras can create two types of AVI format, one is the usual and playable, the other is neither.

    There are two kinds of AVI files:

    • Interleaved : audio and video content is interleaved. This is the standard usage. Recommended and mostly used. Some tools create interleaved AVIs with bad sync. MPlayer detects these as interleaved, and this climaxes in loss of A/V sync, probably at seeking. These files should be played as non-interleaved (with the -ni option).
    • Non-interleaved : bad. First come the whole video stream, then the whole audio stream, thus needs a lot of seeking. It's very bad when playing from network or CDROM.

    MPlayer supports 2 kind of timing for AVI files:

    • bps-based : it is based on bitrate/samplerate of video/audio stream. This method is used by most players, including avifile and windows media player. Files with broken headers, and files created with VBR audio but not VBR-compliant encoder will result in A/V desync with this method (mostly at seeking).
    • interleaving-based : it doesn't use bitrate value of the header, instead it uses the relative position of interleaved audio and video chunks. Makes some badly encoded file with VBR audio playable.

    Any audio and video codec is allowed, but note that VBR audio isn't well supported by most of the players. The file format makes it possible to use VBR audio, but most players expect CBR audio, thus they fail with VBR. VBR is unusual, and Microsoft's AVI specs only describe CBR audio. I also note, that most AVI encoders/multiplexers create bad files if using VBR audio. Only 2 exception (known by me): NaNDub and MEncoder.

    2.1.1.3. ASF/WMV files

    ASF (active streaming format) comes from Microsoft. They developed two variants of ASF, v1.0 and v2.0. v1.0 is used by their media tools (windows media player and windows media encoder) and is very secret. v2.0 is published and patented :). Of course they differ, there is no compatibility at all (it's just another legal game). MPlayer supports only v1.0, as nobody has ever seen v2.0 files :) . Note, that .ASF files nowdays come with the extension .WMA or .WMV.

    2.1.1.4. QuickTime/MOV files

    These are from Macintosh. Usually have extensions of .QT or .MOV . Note that since the MPEG4 Group chose QuickTime as the recommended file format for MPEG4, their .MOV files come with .MPG or .MP4 extension (interesting that in these files the video stream is a real .MPG file. With the -dumpvideo option you can even extract it.).

    Codecs: any codecs allowed, both CBR and VBR. Note: most new mov files use Sorenson video and QDesign Music audio. These formats are completely secret, and only Apple's quicktime player is able to play these files (on win/mac only).

    2.1.1.5. VIV files

    MPlayer happily demuxes VIVO file formats. The format's big disadvantage is that it has no index block, nor fixed packetsize or sync bytes, and most files lack even keyframes, so forget seeking!

    VIVO/1.0 files' video codec is standard h.263 . The VIVO/2.0 files' video codec is a modified, nonstandard h.263 . Audio is the same, it may be g.723 (standard), or Vivo Siren .

    See the VIVO video codec and VIVO audio codec sections for installation instructions.

    2.1.2. Audio formats

    Currently MPlayer is still a Movie and not a Media player, thus the pure audio formats (for example MP3, WAV, audio ASF) are unplayable. Use xmms, mpg123 or whatever.

    --- NEW FILE ---

    Question: What is GCC 2.96 ? I can't find it at GNU site.

    Answer: Read the official answer from GNU GCC team.

    Question: What is the problem with GCC 2.96 ? And with 3.x ?

    Answer:

    And for the people, who periodically asks what are the exact problems with gcc 2.96, my answer: we don't know exactly. There were various problems and new problems / bugs come up periodically. It is not a single bug/problem. We just see various bugreports, mostly gcc internal bugs, compiler syntax errors in source or bad code compiled. They all are solved using different version of gcc. I understand that gcc 2.96 has different default optimization flags and they conflicts with our inline asm code, but we can't fix them, and we really don't want to fix them as they work with other compilers or gcc versions, and the fix may cause speed loss.

    I think that the gcc 2.96 should be fixed to be option-compatible with other releases, but redhat guys refused to do it. If someone interested - ask Eugene K., avifile author, he has a long mailing with them, because they had the same problems with avifile. Finally he changed avifile source to workaround gcc 2.96 bugs... We simply has no interest and time to do it.

    Ah, and about the pipe-in-comment bug: it wasn't really our bug. I've talked one of gcc maintainers, and he told me that gcc 2.96 and 3.x supports intel asm syntax, and it caused the pipe bug. But it is a bug, because gcc silently, without any warning, ignored the whole asm block!

    Other gcc 3.x problems comes from broken libstdc++ or glibc header (std_*.h) installation. They are not our fault. MPlayer compiles and works well with gcc 3.x versions. Only 2.96 is broken, but it depends on many environment elements, including gcc 2.96 release number, enabled mplayer features, etc. If it works for you using gcc 2.96, it doesn't mean it will work for everyone.

    Answer 2:

    Also read this text !!!

    Question: No! You are wrong! Everything works with gcc 2.96 but MPlayer

    Answer:

    No. You are wrong! Several projects (mainly which source contains high optimized inline asm code) had problems with gcc 2.96. For example: avifile, MESA / DRI, Wine, ffmpeg, lame. But other projects already workarounded gcc bugs (changed code which triggered compiler bugs) so they work for now.

    Question: No! You are wrong! Everything works with gcc 2.96 including MPlayer

    Answer:

    Good. Be happy. But you must know, it depends on many environment elements, including gcc 2.96 release number, enabled mplayer features, etc. If it works for you using gcc 2.96, it doesn't mean it will work for everyone! It only means that you are lucky, until you find a problem. But don't forget the No.1 rule of gcc 2.96 users: NEVER REPORT BUGS OR PROBLEMS IF YOU ARE USING GCC 2.96

    Question: Ok. Understood. But I want to give it a try... how to compile with gcc 2.96?

    Answer: Really? Are you sure? Ok. You know... here is it: ./configure --disable-gcc-checking

    Question: No! I don't agree with you, because ...

    Answer: It doesn't matter. Keep your commets for yourself. We're not interested in gcc 2.96 stories.

    --- NEW FILE --- .\" MEncoder (C) 2000-2001 Arpad Gereoffy .\" This manpage was/is done by Gabucino .\" .TH MEncoder .SH NAME mencoder \- Movie Encoder for Linux .SH SYNOPSIS .B mencoder .RB [ \-vcd\ ] .RB [ \-dvd\ ] .RB [ \-chapter\ ] .RB [ \-dvdangle\ ] .RB [ \-dvdkey\ ] .RB [ \-nobps ] .RB [ \-aid\ ] .RB [ \-vid\ ] .RB [ \-pp\ ] .RB [ \-vc\ ] .RB [ \-ac\ ] .RB [ \-vfm\ ] .RB [ \-afm\ ] .RB [ \-include\ ] .RB [ \-mc\ seconds/5f ] .RB [ \-v ] .RB [ \-mp3file\ ] .RB [ \-ac3file\ ] .RB [ \-ovc\ ] .RB [ \-oac\ ] .RB [ \-divx4opts\ ] .RB [ \-lameopts\ ] .RB [ \-pass\ <1/2> ] .RB [ \-passlogfile\ ] .RB [ \-ofps\ ] .RB [ \-o\ ] .RB [ \-frames\ ] .RB [ \-x\ ] .RB [ \-y\ ] .RB [ \-sws\ <0-2> ] .I - or file or device .PP .SH DESCRIPTION .I mencoder MEncoder (MPlayer's Movie Encoder) is a simple movie encoder, designed to encode MPlayer-playable movies (AVI/DVD/VCD/VOB/MPG/MOV/VIV/NET) to other MPlayer-playable formats (see below). Currently it's in beta stage, and encodes only to DivX4 (1 or 2 passes) video, PCM/MP3/VBRMP3 audio. Also has stream copying abilities. In the future, there will be cropping, resizing filters, and other interesting stuff. .LP .SH "GENERAL OPTIONS" .TP .I NOTE Every "flag" option has "noflag" pair, e.g. -flag opposite is -noflag .TP .I NOTE CHECK THE HTML DOCUMENTATION TOO ! .TP .B \-vcd Encode the specified VCD track. .TP .B \-dvd Encode the specified DVD title. .TP .B \-chapter <chapter id> Use with -dvd option (see above). Start encoding at the specified chapter. .TP .B \-dvdangle <angle id> Use with -dvd option (see above), and if the DVD disc has multiple angles. It will encode the angle specified here. .TP .B \-dvdkey <key> Used to decrypt CSS-encrypted streams on hard disk (with given CSS decrypt key). .TP .B \-nobps Used only for AVIs. Doesn't use the bps value in the AVI header, instead calculates it. .TP .B \-aid <audio stream id> If the source media contains multiple audio streams (for example DVDs), encode the specified one. .TP .B \-vid <video stream id> If the source media contains multiple video streams, encode the specified one. .TP .B \-pp <value> Apply a postprocess filter to enhance image quality. (values TODO) .TP .B \-vc <codec name> Use specified codec (according to codecs.conf) for decoding input video stream. .TP .B \-ac <codec name> Use specified codec (according to codecs.conf) for decoding input audio stream. .TP .B \-vfm <video codec family> Force decoding by using a specific codec FAMILY, and FALLBACK to default if failed. For examples see MPlayer manpage. .TP .B \-afm <audio codec family> Force decoding by using a specific codec FAMILY, and FALLBACK to default if failed. For examples see MPlayer manpage. .TP .B \-include specify config file to be parsed after the default .TP .B \-mc\ seconds/5frame maximum sync correction per 5 frames (in seconds). Use -mc 0 to disable input A/V sync. .TP .B \-v Increase verbosity. .TP .B \-ovc <codecname> Encode with the given codec (codec names are from codecs.conf). Examples: -ovc help get help -ovc copy no encoding, just streamcopy -ovc divx4 encode to DivX4 .TP .B \-oac <codecname> Encode with the given codec (codec names are from codecs.conf). Examples: -oac help get help -oac copy no encoding, just streamcopy -oac pcm encode to uncompressed PCM -oac mp3lame encode to MP3 (using Lame) .TP .B \-divx4opts If encoding to DivX4, you can specify its parameters here, like: -divx4opts br=1800:deinterlace:key=250 Available options: help get help br=XXX specify bitrate in kbit <4-16000> or bit <16001-24000000> key=XXX maximum keyframe interval (in frames) deinterlace enable deinterlacing (don't use, DivX4 is buggy!) q=XXXX quality (1-fastest, 5-best) min_quant=XXX minimum quantizer (0-32) max_quant=XXX maximum quantizer (0-32) rc_period=XXX rate control period rc_reaction_period=XXX rate control reaction period rc_reaction_ratio=XXX rate control reaction ratio .TP .B \-lameopts If encoding to MP3 with libmp3lame, you can specify its parameters here, like: -lameopts br=192 Available options: help get help br=XXX specify bitrate in kbit <0-1024> (only for CBR) q=XXX Quality (0-highest, 9-fastest) (for VBR) vbr=XXX variable bitrate method 0=cbr 1=mt 2=rh(default) 3=abr 4=mtrh cbr constant bitrate mode=XXX 0=stereo 1=joint-stereo 2=dualchannel 3=mono (default: auto) padding=XXX 0=no 1=all 2=adjust ratio=XXX compression ratio <1-100> .TP .B \-pass <1/2> With this you can encode 2pass DivX4 files. First encode with -pass 1, then with the same parameters, encode with -pass 2. .TP .B \-passlogfile <filename> When encoding in 2pass mode, MEncoder dumps first pass' informations to the given file instead of the default divx2pass.log . .TP .B \-ofps <fps> The output file will have different frame/sec than the source. .TP .B \-o <filename> Outputs to the given filename, instead of the default 'test.avi' . .TP .B \-frames <number> Encode only given number of frames. .TP .B \-x <rescale width> Rescale output movie to given pixels wide. .TP .B \-y <rescale height> Rescale output movie to given pixels tall. .TP .B \-sws (0-2> Type of scaling method 0 fast bilinear 1 bilinear 2 bicubic (best quality) .SH FILES AND DIRECTORIES .IP .SH "EXAMPLES" .B Encoding DVD title #2 mencoder -dvd 2 -o title2.avi .TP .B Encoding from HTTP mencoder http://mplayer.hq/example.avi -o example.avi .TP .B Encoding from a pipe rar p test-SVCD.rar | mencoder -divx4opts br=800 -ofps 24 -pass 1 -- - .TP .B Encoding multiple *.vob files cat *.vob | mencoder <options> - .IP .SH BUGS Probably. Check the documentation. Bugreports should be addressed to the MPlayer-users mailing list (mplayer-users at mplayerhq.hu) ! If you want to submit a bugreport (which we love to receive!), please double-check the bugreports.html, and tell us all that we need to know to identify your problem. .LP .SH AUTHORS Check documentation ! MPlayer is (C) 2000-2001 .I Arpad Gereoffy <arpi at thot.banki.hu> This manpage is written and maintained by .I Gabucino . .LP .SH STANDARD DISCLAIMER Use only at your own risk! There may be errors and inaccuracies that could be damaging to your system or your eye. Proceed with caution, and although this is highly unlikely, the author doesn't take any responsibility for that! .\" end of file --- NEW FILE --- .\" MPlayer (C) 2000-2001 Arpad Gereoffy <arpi at esp-team.scene.hu> .\" This manpage was/is done by Gabucino .\" .TH MPlayer .SH NAME mplayer \- Movie Player for Linux .SH SYNOPSIS .B mplayer .RB [ \-gui ] .RB [ \-v ] .RB [ \-quiet ] .RB [ \-vo\ <driver>[:<device>] ] .RB [ \-ao\ <driver>[:<device>] ] .RB [ \-vcd\ track\ number ] .RB [ \-sb\ byte\ position ] .RB [ \-nosound ] .RB [ \-abs\ bytes ] .RB [ \-delay\ secs ] .RB [ \-nobps ] .RB [ \-aid\ id ] .RB [ \-vid\ id ] .RB [ \-fps\ rate ] .RB [ \-mc\ seconds/5f ] .RB [ \-fs ] .RB [ \-vm ] .RB [ \-zoom ] .RB [ \-x\ x ] .RB [ \-y\ y ] .RB [ \-xy\ factor ] .RB [ \-pp\ quality ] .RB [ \-include\ configfile ] .RB [ \-lircconf\ configfile ] .RB [ \-ffactor\ number ] .RB [ \-sub\ file ] .RB [ \-subfps\ rate ] .RB [ \-subdelay\ sec ] .RB [ \-z\ <0-8> ] .RB [ \-idx ] .RB [ \-forceidx ] .RB [ \-nodshow ] .RB [ \-noxv ] .RB [ \-forcexv ] .RB [ \-ss\ time ] .RB [ \-dumpaudio ] .RB [ \-dumpvideo ] .RB [ \-dumpstream ] .RB [ \-noframedrop ] .RB [ \-framedrop ] .RB [ \-nodouble ] .RB [ \-double ] .RB [ \-stereo\ mode ] .RB [ \-channels\ n ] .RB [ \-srate\ Hz ] .RB [ \-osdlevel\ level ] .RB [ \-config\ file ] .RB [ \-display\ name ] .RB [ \-unicode ] .RB [ \-utf8 ] .RB [ \-fsmode\ mode ] .RB [ \-vc\ video\ codec\ name ] .RB [ \-ac\ audio\ codec\ name ] .RB [ \-vfm\ video\ codec\ family ] .RB [ \-afm\ audio\ codec\ family ] .RB [ \-frames\ number ] .RB [ \-autoq\ quality ] .RB [ \-fb\ device ] .RB [ \-fbmode\ modename ] .RB [ \-fbmodeconfig\ filename ] .RB [ \-benchmark ] .RB [ \-dvd\ titleid ] .RB [ \-chapter\ chapterid ] .RB [ \-dvdangle\ angleid ] .RB [ \-dvdkey\ key ] .RB [ \-skin\ skin ] .RB [ \-aspect\ ratio ] .RB [ \-monitoraspect\ ratio ] .RB [ \-subcp\ codepage ] .RB [ \-dumpmpsub ] .RB [ \-screenw\ pixels ] .RB [ \-screenh\ pixels ] .RB [ \-cache\ kbytes ] .RB [ \-bpp\ depth ] .RB [ \-flip ] .RB [ \-playlist\ <filename> ] .RB [ \-slave ] .I - or file or device .PP .SH DESCRIPTION .I mplayer MPlayer is a movie player for LINUX (runs on many other Unices, and non-x86 CPUs, see section 6). It plays most MPEG, AVI and ASF/WMV files, supported by many native and Win32 DLL codecs. You can watch VideoCD, SVCD, DVD and even DivX movies too (and you don't need the avifile library at all!). The another big feature of mplayer is the wide range of supported output drivers. It works with X11, Xv, DGA, OpenGL, SVGAlib, fbdev, AAlib, but you can use SDL (and this way all drivers of SDL) and some lowlevel card-specific drivers (for Matrox, 3Dfx and Radeon) too! Most of them supports software or hardware scaling, so you can enjoy movies in fullscreen. And what about the nice big antialiased shaded subtitles (7 supported types!!!) with european/ISO 8859-1,2 (hungarian, english, czech, etc), cyrillic, korean fonts, and OSD? .LP .SH "GENERAL OPTIONS" .TP .I NOTE Every "flag" option has "noflag" pair, e.g. -fs opposite is -nofs .TP .B \-gui start MPlayer with the GUI mode. You have to compile it in, for details see the documentation. .TP .B \-dvd\ titleid tell MPlayer which movies (marked with titleid) to play. For example sometimes '1' are trailers, and '2' is the real movie. .TP .B \-sid\ id Turns on DVD subtitle displaying. Also, you MUST specify a number which corresponds to a DVD subtitle language (1-...). For the list of available subtitles, use with the -v switch and look at the output. (EXPERIMENTAL) .TP .B \-chapter\ chapterid specify which chapter to start playing at. Examples can be found below. .TP .B \-dvdangle\ angleid some DVD discs contain scenes that can be viewed from multiple angles. Here you can tell MPlayer which angles to use. Examples can be found below. .TP .B \-vo\ <driver>[:<device>] select video output driver and optinaly device. "device" is valid with SDL and GGI too, it means sub-driver then (for example: -vo sdl:aalib). you can get the list of available drivers executing .I mplayer -vo help .TP .B \-ao\ <driver>[:<device>] select audio output driver and optinaly device. "device" is valid with SDL too, it means sub-driver then (for example: -vo sdl:esd). If using OSS, you can specify which sound device to use like this : -ao oss:/dev/dsp1 (replaces the old -dsp option) you can get the list of available drivers executing .I mplayer -ao help .TP .B \-vcd\ track play video cd track from device instead of plain file .TP .B \-nosound don't play sound .TP .B \-fs fullscreen playing (centers movie, and makes black bands around it) .TP .B \-vm try to change to a different video mode. dga2, x11 (XF86VidMode) and sdl output drivers support it. .TP .B \-zoom use software scaling, where available (use with -nofs). svga, x11, vesa output drivers support it. .TP .B \-flip flip image (useful for example for old Indeo codecs). Supported only(?) by the 'sdl' and 'x11' outputs. .TP .B \-x\ x scale image to x width [if driver suppports!] .TP .B \-y\ y scale image to y height .TP .B \-xy\ factor scale image by <factor> .TP .B \-pp\ quality apply postprocess filter on decoded image. You need a STRONG CPU in order to use this! The supported formats and settings are: MPEG 1/2 0 (none), TODO OpenDivX 0 (none), TODO DivX4 0 (none), TODO DivX 0 (none), TODO -pp 0x20000 TODO .TP .B \-autoq\ quality dynamically changes the level of postprocess, depending on spare CPU time available. Uses the same value ranges as -pp . The number you specify will be the maximum level used. Usually you can use some big number. You don't have to (and don't) use together with -pp ! .TP .B \-ffactor\ number resample alphamap of the font. Can be: 0 plain white fonts 0.75 very narrow black outline [default] 1 narrow black outline 10 bold black outline .TP .B \-sub\ file use/display this subtitle file .TP .B \-subfps\ rate specify frame/sec rate of subtitle file (ONLY for frame-based SUB files, i.e. NOT MicroDVD format!) (default: the same as the movie) .TP .B \-subdelay\ sec delays subtitles by <sec> seconds. Can be negative. .TP .B \-osdlevel\ level specifies which mode the OSD should start in (0 : none, 1 : seek, 2: seek+timer) (default = 2) .TP .B \-lircconf\ configfile specifies a configfile for LIRC (see http://www.lirc.org) if you don't like the default ~/.lircrc .TP .B \-v enable verbose output (more -v means more verbose) .TP .B \-quiet display less output, status messages. .TP .B \-benchmark used in combination with -nosound and -vo null for benchmarking. .TP .B \-skin skin directory load skin from this directory (WITHOUT path name!). For example '-skin fittyfene' tries these : /usr/local/share/mplayer/Skin/fittyfene ~/.mplayer/Skin/fittyfene .TP .B \-aspect ratio set aspect ratio of movies. It's autodetected on MPEG files, and can't be autodetected on AVI files. Examples: -aspect 4:3 or -aspect 1.3333 -aspect 16:9 or -aspect 1.7777 (has -noaspect pair) .TP .B \-monitoraspect ratio set aspect ratio of your screen. Examples: -monitoraspect 4:3 or 1.3333 -monitoraspect 16:9 or 1.7777 .TP .B \-playlist <file> play files according to this filelist (1 file/row). .TP .B \-slave This option switches on slave mode. This is intended for use of MPlayer as a backend to other programs. Instead of intercepting keyboard events, MPlayer will read simplistic command lines from its stdin. See section .B SLAVE MODE PROTOCOL for the syntax. .IP .SH "ADVANCED OPTIONS" .TP .I NOTE These options can help you solve your particular problem.. Also, see the documentation ! .TP .B \-vc <name> force usage of a specific video codec, according to its name in codecs.conf, for example : -vc divx use VFW DivX codec -vc divxds use DirectShow DivX codec -vc ffdivx use libavcodec's DivX codec -vc ffmpeg12 use libavcodec's MPEG1/2 codec -vc divx4 use ProjectMayo's DivX codec See -vc help for FULL list ! .TP .B \-ac <name> force usage of a specific audio codec, according to its name in codecs.conf, for example : -ac mp3 use libmp3 MP3 codec -ac mp3acm use l3codeca.acm MP3 codec -ac ac3 use AC3 codec -ac hwac3 enable Hardware AC3 passthrough (see documentation) -ac vorbis use libvorbis -ac ffmp3 use ffmpeg's MP3 decoder (SLOW) See -ac help for FULL list ! .TP .B \-vfm <1-12> force usage of a specific codec FAMILY, and FALLBACK to default if failed. For example: -vfm 2 use VFW (Win32) codecs -vfm 3 use OpenDivX/DivX4 codec (YV12) (same as -vc odivx but fallback) -vfm 4 use DirectShow (Win32) codecs -vfm 5 use libavcodec codecs -vfm 7 use DivX4 codec (YUY2) (same as -vc divx4 but fallback) -vfm 10 use XAnim codecs See -vc help for FULL list ! NOTE : if libdivxdecore support was compiled in, then type 3 and 7 now contains just the same DivX4 codec, but different APIs to reach it. For difference between them and when to use which, check the DivX4 section in the documentation. .TP .B \-afm <1-12> force usage of a specific audio format. For example: -afm 1 use libmp3 (mp2/mp3, but not mp1) -afm 2 suppose raw PCM audio -afm 3 use libac3 -afm 4 use a matching Win32 codec -afm 5 use aLaw/uLaw driver -afm 10 use libvorbis -afm 11 use ffmpeg's MP3 decoder (even mp1) See -ac help for FULL list ! .TP .B \-sb\ position seek to byte position .TP .B \-ss\ time seek to given time position. For example : -ss 56 -ss 01:10:00 .TP .B \-bpp\ depth use different color depth than autodetect. Not all -vo drivers support it (fbdev, dga2, svga, vesa). .TP .B \-abs\ bytes sound card audio buffer size (in bytes, default: measuring) .TP .B \-delay\ secs audio delay in seconds (may be +/- float value) .TP .B \-nobps don't use avg. byte/sec value for A-V sync (AVI) .TP .B \-aid\ id select audio channel [MPG: 0-31 AVI: 1-99 ASF: 0-127 VOB: 128-...] .TP .B \-vid\ id select video channel [MPG: 0-15 AVI: -- ] .TP .B \-fps\ value force frame rate (if value is wrong in the header) .TP .B \-mc\ seconds/5frame maximum sync correction per 5 frames (in seconds) .TP .B \-ni force usage of non-interleaved AVI parser .TP .B \-include configfile specify config file to be parsed after the default .TP .B \-z\ <0-8> specifies compression level for PNG output 0 : no compression 8 : max compression .TP .B \-idx rebuilds INDEX of the AVI. Useful with broken downloads, or badly created AVIs. .TP .B \-forceidx force rebuilding of INDEX. Useful for testing, or AVIs with bad indexes. .TP .B \-nodshow disables usage of DirectShow video codecs .TP .B \-noxv disable XVideo hardware acceleration (with SDL only!) .TP .B \-forcexv force using XVideo (SDL!) .TP .B \-dumpaudio writes audio stream of the file to ./stream.dump (mostly usable with mpeg/ac3) .TP .B \-dumpstream dumps the file to ./stream.dump . Useful for example when ripping from DVD. .TP .B \-noframedrop no frame dropping : every frame is played, audio and video may be out of sync (default) .TP .B \-framedrop frame dropping : decode all frames, video may skip .TP .B \-nodouble disable doublebuffering (default). Currently this is only honoured by the Xv and the DGA driver. With the DGA driver this also disables OSD support but yields some speed gain. .TP .B \-double enable doublebuffering. Currently this is only honoured by the Xv and the DGA driver. .TP .B \-dvdkey key key to decrypt stream encrypted with CSS. For example : -dvdkey F169072699 (this is NOT for DVD playing! For DVD use the -dvd option!) .TP .B \-stereo mode select type of MP2/MP3 stereo output. Stereo 0 Left channel 1 Right channel 2 .TP .B \-channels n select number of audio output channels to be used Stereo 2 Surround 4 Full 5.1 6 Currently this option is only honoured for AC3 audio. .TP .B \-srate Hz specifies Hz to playback audio on. Has effect on playback speed! .TP .B \-config configfile specifies where to search for config file .TP .B \-display name specify the hostname and display number of the X server you want to display on. For example : -display xtest.localdomain:0 .TP .B \-unicode tells MPlayer to handle the subtitle file as UNICODE. Contrary: -nounicode .TP .B \-utf8 tells MPlayer to handle the subtitle file as UTF8. .TP .B \-fsmode\ mode This option workarounds some problems when using specific windowmanagers and fullscreen mode. If you experience fullscreen problems, try changing this value between 0 and 7. -fsmode 0 new method -fsmode 1 ICCCWM patch (for KDE2/icewm) -fsmode 2 old method -fsmode 3 ICCCWM patch plus Motif method .TP .B \-frames\ number MPlayer plays <number> frames, then quits. .TP .B \-fb\ device Specifies the framebuffer device to use. By default it uses /dev/fb0 . Only valid for the fbdev driver. .TP .B \-fbmode\ modename Change videomode to the one that is labelled as <modename> in /etc/fb.modes . Only valid for the fbdev driver. .TP .I NOTE VESA framebuffer doesn't support mode changing. .TP .B \-fbmodeconfig\ filename Use this config file instead of the default /etc/fb.modes . Only valid for the fbdev driver. .TP .B \-subcp\ codepage If your system supports iconv(3), you can use this option to specify codepage of the subtitle. Examples: -subcp latin2 -subcp cp1250 .TP .B \-dumpmpsub Convert the given subtitle (specified with the -sub switch) to MPlayer's subtitle format, MPsub. Dumps a dump.mpsub file to current directory. .TP .B \-screenw\ pixels If you use an output driver which can't know the resolution of the screen (mga/fbdev/x11 and/or TVout) this is where you can specify the horizontal resolution. .TP .B \-screenh\ pixels If you use an output driver which can't know the resolution of the screen (mga/fbdev/x11 and/or TVout) this is where you can specify the vertical resolution. .TP .B \-cache\ kbytes This option specifies how much memory to use when precaching a file/URL . Especially useful on slow media. Default is off. .IP .SH "ALPHA/BETA CODE" .TP .I NOTE These are included in this manpage just for completeness! These may or may NOT work! If you don't know what are these, you DON'T need these! In either case, double-check the documentation ! .TP .B \-br\ rate used with '-vo odivx' . Specifies the bitrate to encode OpenDivx at (in bits! e.g: 780000). .TP .I NOTE You CAN'T encode sound, only video right now! Don't ask for it, it's on the TODO list. .TP .B \-encode\ file used with '-vo odivx' . Specifies the output OpenDivX file. Won't overwrite. .TP .B \-dumpvideo dump video stream to ./stream.dump (only with MPEG-PS) (not very usable) .IP .SH KEYBOARD CONTROL .TP .I NOTE These keys may/may not work, depending on your video output driver. .TP <- or -> seek backward/forward 10 seconds up or down seek backward/forward 1 minute pgup/pgdown seek backward/forward 10 minutes p or SPACE pause movie (press any key) q or ESC stop playing and quit program + or - adjust audio delay by +/- 0.1 second / or * decrease/increase volume o toggle OSD: none / seek / seek+timer m toggle using master/pcm volume z or x adjust subtitle delay by +/- 0.1 second (the following keys are valid only when using DirectShow DivX codec, or the DivX4 codec with -vc divx4) 1 or 2 adjust contrast 3 or 4 adjust brightness 5 or 6 adjust hue 7 or 8 adjust saturation .IP .SH SLAVE MODE PROTOCOL If the -slave switch is given, playback is controlled by a line-based protocol with the following tokens: .TP stop pause playback play resume playback seek <NUM> continue at second NUM skip <NUM> skip NUM seconds (may be negative) quit exit mplayer .IP .SH FILES AND DIRECTORIES .TP .I CONFIG FILES Settings are stored system-wide in the /etc/mplayer.conf file, and per-user in $HOME/.mplayer/config. The directory $HOME/.mplayer and the 'config' are created if doesn't exist. .TP .I FONTS Fonts are searched in $HOME/.mplayer/font. There must be a font.desc file, and files with .RAW extension. .TP .I SUBTITLE FILES MPlayer currently supports 9 subtitle formats : MicroDVD, SubRip, unnamed, SAMI (smi), vplayer, RealMedia RT, ssa (Sub Station Alpha), AQT, and our own: MPsub. Sub files are searched in this priority : (for example /mnt/cdrom/movie.avi) /mnt/cdrom/movie.sub (utf/UTF/sub/SUB/srt/SRT/smi/SMI/rt/RT/txt/TXT/ssa/SSA) $HOME/.mplayer/sub/movie.sub (utf/UTF/sub/SUB/srt/SRT/smi/SMI/rt/RT/txt/TXT/ssa/SSA) $HOME/.mplayer/default.sub .IP .SH "EXAMPLES" .B Quickstart DVD playing mplayer -dvd 1 .TP .B Multiangle DVD playing mplayer -dvd 1 -dvdangle 2 .TP .B Playing from a different DVD device mplayer -dvd 1 /dev/dvd2 .TP .B Stream from HTTP mplayer http://mplayer.hq/example.avi .TP .B Convert subtitle to MPsub (to ./dump.mpsub) mplayer dummy.avi -sub source.sub -dumpmpsub .LP .SH BUGS Probably. Check the documentation. Bugreports should be addressed to the MPlayer-users mailing list (mplayer-users at mplayerhq.hu) ! If you want to submit a bugreport (which we love to receive!), please double-check the bugreports.html, and tell us all that we need to know to identify your problem. .LP .SH AUTHORS Check documentation ! MPlayer is (C) 2000-2001 .I Arpad Gereoffy <arpi at thot.banki.hu> This manpage is written and maintained by .I Gabucino . .LP .SH STANDARD DISCLAIMER Use only at your own risk! There may be errors and inaccuracies that could be damaging to your system or your eye. Proceed with caution, and although this is highly unlikely, the author doesn't take any responsibility for that! .\" end of file --- NEW FILE --- <html> <head> <meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <title>MPlayer skin format

    MPlayer skin format


    Contents


    Last modified: Sep 10, 2001

    1 Introduction

    The purpose of this document is to describe the MPlayer skin format. The information contained here might be wrong, for a) it is not me who wrote the GUI, b) the GUI is not finished, c) I might be wrong. So do not be surprised if something does not work as described here.

    Thanks to Zolt?n Ponekker for his help.

    Andr?s Mohari <mayday at freemail.hu>

    2 Overview

    It does not really have anything to do with the skin format, but you should know that MPlayer has no builtin skin, so at least one skin must be installed in order to be able to use the GUI.

    2.1 Directories

    The directories searched for skins are (in order):
        /usr/local/share/mplayer/Skin/
        ~/.mplayer/Skin/
    

    Note that the first path may vary according to the way MPlayer was configured (see the --datadir argument of the configure script).

    Every skin is installed into its own directory under one of the directories listed above, for example:

        /usr/local/share/mplayer/Skin/default/
    

    2.2 Image formats

    Images must be truecolor (24 or 32 bpp) and can be in BMP, PNG and TGA format (note that TGA images must be uncompressed). The preferred format is PNG as it compresses very well.

    In the main window (see below) you can use images with `transparency': regions filled with the color #FF00FF (magenta) are fully transparent when viewed by MPlayer. This means that you can even have shaped windows if your X server has the XShape extension.

    2.3 Parts of a skin

    Skins are quite free-format (unlike the fixed-format skins of Winamp/XMMS, for example), so it is up to you to create something great.

    Currently there are three windows to be decorated: the main window, the subwindow and the skin menu (which can be activated by a right click).

    • The main window is where you can control MPlayer. The background of the window is an image. Various items can (and must) be placed in the window: buttons, potmeters (sliders, if you like it better) and labels. For every item, you must specify its position and size.

      A button has three states (pressed, released, disabled), so its image must be divided into three parts vertically. See the button item for details.

      A potmeter (mainly used for the seek bar and volume/balance control) can have any number of phases by dividing its image into different parts below each other. See hpotmeter and potmeter for details.

      Labels are a bit special: the characters needed to draw them are taken from an image file, and the characters in the image are described by a font description file. The latter is a plain text file which specifies the x,y position and size of each character in the image. (So the image file and its font description file form a font together.) See dlabel and slabel for details.

      Note: all images can have full transparency as described in the section about image formats.

    • The subwindow is where the movie appears. It can display a specified image if there is no movie loaded (it is quite boring to have an empty window :-)) Note: transparency is not allowed here.
    • The skin menu is just a way to control MPlayer by means of menu entries. Two images are required for the menu: one of them is the base image that shows the menu in its normal state, the other one is used to display the selected entries. When you pop up the menu, the first image is shown. If you move the mouse over the menu entries, the currently selected entry is copied from the second image over the menu entry below the mouse pointer. (So the second image is never shown in whole.)

      A menu entry is defined by its position and size in the image (see the section about the skin menu for details).

    There is an important thing not mentioned yet: for buttons, potmeters and menu entries to work, MPlayer must know what to do if they are clicked. This is done by messages (events). For these items you must define the messages to be genereated when they are clicked.

    2.4 Files

    You need the following files to build a skin.
    • The configuration file named skin tells MPlayer how to put different parts of the skin together and what to do if you click somewhere in the window.
    • The background image for the main window.
    • Images for the items in the main window (including one or more font description files needed to draw labels).
    • The image to be displayed in the subwindow (optional).
    • Two images for the skin menu (they are needed only if you want to create a menu).
    With the exception of the skin configuration file, you can name the other files whatever you want (but note that font description files must have .fnt extension).

    3 The skin file

    As mentioned above, this is the skin configuration file. It is line oriented; comment lines start with a ';' character at the beginning of the line (only spaces and tabs are allowed before the ';').

    The file is made up of sections. Each section describes the skin for an application and has the following form:
    section = section name
    .
    .
    .
    end
    

    Currently there is only one application, so you need only one section: its name is movieplayer.

    Within this section each window is described by a block in the following form:
    window = window name
    .
    .
    .
    end
    
    where window name can be one of these strings:

    • main - for the main window
    • sub - for the subwindow
    • menu - for the skin menu

    (The sub and menu block is optional---you do not need to create a menu or to decorate the subwindow.)

    Within a window block, you can define each item for the window by a line in this form:

    item = parameter
    

    where item is a string that identifies the type of the GUI item, parameter is a numeric or textual value (or a list of values separated by commas).

    Putting the above together, the whole file looks something like this:

    section = movieplayer
      window = main
      ; ... items for main window ...
      end
      
      window = sub
      ; ... items for subwindow ...
      end
      
      window = menu
      ; ... items for skin menu ...
      end
    end
    

    Finally some words about specifying images for the various items.
    The name of an image file must be given without leading directories--- images are searched in the directory of the skins. You may (but you need not) specify the file's extension. If the file doesn't exist, MPlayer tries to load the file <filename>.<ext>, where tga, TGA, bmp, BMP, png and PNG is tried for <ext> (in this order). The first matching file will be used.

    Here is an example to make this clear. Suppose that you have an image called main.png that you use for the main window:
        base = main, -1, -1
    
    MPlayer tries to load main, main.tga, main.TGA, main.bmp etc, so main.png will be found.
    If (by accident) you wrote
        base = main.bmp, -1, -1
    
    then main.bmp, main.bmp.tga, main.bmp.TGA, main.bmp.bmp would be searched and MPlayer would finally give up because there is no main.bmp in the directory, but main.png.

    3.1 Main window

    Below you can see the list of items that can be used in the 'window = main' . . . 'end' block.
    base = image, x, y
    Lets you specify the background image to be used for the main window. The window will appear at the given x,y position on the screen (0,0 is the top left corner). You can specify -1 for center and -2 for right (x) and bottom (y). The window will be as large as the image.

    Warning: transparent regions in the image (colored #FF00FF) appear black on X servers without the XShape extension.

    button = image, x, y, width, height, message
    Place a button of width * height size at the x,y position. The specified message is generated when the button is clicked. The image given by image must have three parts below each other (according to the possible states of the button), like this:
    
    +------------+
    |  pressed   |
    +------------+
    |  released  |
    +------------+
    |  disabled  |
    +------------+
    
    decoration = enable|disable
    Enable or disable window manager decoration of the main window. Default is disable.
    hpotmeter = butt, bw,bh, phases, numphases, default, x, y, w, h, msg
    Place a horizontal potmeter of w * h size at the x,y position. The image can be divided into different parts for the different phases of the potmeter (for example, you can have a pot for volume control that turns from green to red while its value changes from the minimum to the maximum.) hpotmeter can have a button that can be dragged horizontally. The parameters are:
    • butt - the image to be used for the button (must have three parts below each other, like in case of button)
    • bw, bh - size of the button
    • phases - The image to be used for the different phases of the hpotmeter. The image must be divided into numphases parts vertically (see below). A special value of NULL can be used if you want no such image.
    • numphases - number of phases stored in the phases image
    • default - default value for hpotmeter (in the range 0 to 100)
    • x, y - position for the hpotmeter
    • w, h - width and height of the hpotmeter
    • msg - the message to be generated when the value of hpotmeter is changed
    The image used for the different phases must look something like this:
    
    +------------+
    |  phase #1  |
    +------------+
    |  phase #2  |
    +------------+
         ...
    +------------+
    |  phase #n  |
    +------------+
    
    Note: there will be a vpotmeter item too, but is it not implemented yet.
    potmeter = phases, numphases, default, x, y, w, h, msg
    A potmeter without a button. (I guess it is ment to be turned round, but it reacts to horizontal dragging only.) For the description of the parameters see hpotmeter. phases can be NULL, but its quite useless, since you can not see where the potmeter is set.
    font = fontfile, fontid
    Defines a font. fontfile is the name of a font description file with .fnt extension (no need to specify the extension here). fontid is used to refer to the font (see dlabel and slabel). Up to 25 fonts can be defined.
    dlabel = x, y, length, align, fontid, "text"
    Place a dynamic label at the x,y position. The label is called dynamic because its text is refreshed periodically. The maximum length of the label is given by length (its height is the height of a character). If the text to be displayed is wider than that, then it will be scrolled, otherwise it is aligned within the specified space by the value of the align parameter: 0 is for right, 1 is for center, 2 is for left.
    The text to be displayed is given by text: it must be written between double quotes (") (but the " cannot be part of the text). The label is displayed using the font identified by fontid. You can use the following variables in the text.
    VariableMeaning
    $1 play time in hh:mm:ss format
    $2 play time in mmmm:ss format
    $3 play time in hh format (hours)
    $4 play time in mm format (minutes)
    $5 play time in ss format (seconds)
    $6 movie's length in hh:mm:ss format
    $7 movie's length in mmmm:ss format
    $8 play time in h:mm:ss format
    $v volume in xxx.xx% format
    $V volume in xxx.x format
    $b balance in xxx.xx% format
    $B balance in xxx.x format
    $$ the $ character
    $a a character according to the audio type (none: n, mono: m, stereo: t)
    $t track number (in playlist)
    $o filename
    $f filename in lower case
    $F filename in upper case
    $T a character according to the stream type (file: f, video CD: v, DVD: d, URL: u)
    $p the "p" character (if a movie is playing and the font has the "p" character)
    $s the "s" character (if the movie is stopped and the font has the "s" character)
    $e the "e" character (if playback is paused and the font has the "e" character)

    Note: The $a, $T, $p, $s and $e variables all return characters that should be displayed as special symbols (for example, "e" is for the pause symbol that usually looks something like ||). You should have a font for normal characters and a different font for symbols. See the section about symbols for more information.

    slabel = x, y, fontid, text
    Place a static label at the x,y position. text is displayed using the font identified by fontid. The text is just a raw string ($x variables do not work) that must be enclosed between double quotes (the " cannot be part of the text). The label is displayed using the font identified by fontid.

    3.2 Subwindow

    The following items can be used in the 'window = sub' . . . 'end' block.
    base = image, x, y, width, height
    The image to be displayed in the window. The window will appear at the given x,y position on the screen (0,0 is the top left corner). You can specify -1 for center and -2 for right (x) and bottom (y). The window will be as large as the image. width and height gives the size of the window; they are optional (if they are missing, the window is the same size as the image).
    background = r, g, b
    Lets you set the background color. It is useful if the image is smaller than the window. r, g and b specifies the red, green and blue component of the color (each of them is a decimal number from 0 to 255).

    3.3 Skin menu

    As mentioned earlier, the menu is displayed using two images. Normal menu entries are taken from the image specified by the base item, while the currently selected entry is taken from the image specified by the selected item. You must define the position and size of each menu entry by the menu item.

    These are the items that can be used in the 'window = menu' . . . 'end' block.

    base = image
    The image for normal menu entries.
    selected = image
    The image showing the menu with all entries selected.
    menu = x, y, width, height, message
    Defines the x,y position and the size of a menu entry in the images. message is the message to be generated when the mouse button is released over the entry.

    4 Fonts

    As mentioned in the section about the parts of a skin, a font is defined by an image and a description file. You can place the characters anywhere in the image, but make sure that their position and size is given in the description file exactly.

    The font description file (with .fnt extension) can have comment lines starting with ';'. The file must have a line in the form

    image = image
    

    where image is the name of the image file to be used for the font (you do not have to specify the extension). The above line is followed by character definition lines of the form:

    "char" = x, y, w, h
    

    Here x and y specifies the position of the char character in the image (0,0 is the upper left corner). w and h is the width and height of the character (in pixels, of course).

    Here is an example that defines the A, B, C characters using font.png.
    ; can be "font" instead of "font.png"
    image = font.png
    
    ; Three characters are enough for demonstration only. :-)
    "A" =  0,0, 7,13
    "B" =  7,0, 7,13
    "C" = 14,0, 7,13
    

    4.1 Symbols

    Some characters have special meanings when returned by some of the variables used in dlabel; these characters are meant to be displayed as symbols. (For example, in case of a DVD stream, you could display a nice DVD logo instead of the character 'd'.)

    The following table lists all the characters that can be used to display symbols (and thus require a different font).

    CharacterSymbol
    p play
    s stop
    e pause
    n no sound
    m mono sound
    t stereo sound
    f stream is a file
    v stream is a video CD
    d stream is a DVD
    u stream is a URL

    Note: currently only 'p', 's', 'e', 'n', 'm' and 't' is used.

    Appendix A: GUI messages

    These are the messages that can be generated by buttons, potmeters and menu entries.

    Note: some of the messages might not work as expected (or not work at all). As you know, the GUI is under development.

    Playback control:

    evNext
    Jump to next track in the playlist.
    evPause
    Pause playing.
    evPauseSwitchToPlay
    Forms a switch together with evPlaySwitchToPause. They can be used to have a common play/pause button. Both messages should be assigned to buttons displayed at the very same position in the window. This message pauses playing and the image for the evPlaySwitchToPause button is displayed (to indicate that the button can be pressed to continue playing).
    evPlay
    Start playing.
    evPlaySwitchToPause
    The opposite of evPauseSwitchToPlay. This message starts playing and the image for the evPauseSwitchToPlay button is displayed (to indicate that the button can be pressed to pause playing).
    evPrev
    Jump to previous track in the playlist.
    evStop
    Stop playing.

    Seeking in the stream:

    evBackward10sec
    evBackward1min
    evBackward10min
    Seek backward 10 seconds / 1 minute / 10 minutes.
    evForward10sec
    evForward1min
    evForward10min
    Seek forward 10 seconds / 1 minute / 10 minutes.
    evSetMoviePosition
    Seek to position (can be used by a potmeter; the relative value (0-100%) of the potmeter is used).

    Video control:

    evDoubleSize
    Set the movie window to double size.
    evFullScreen
    Switch fullscreen mode on/off.
    evNormalSize
    Set the movie window to its normal size.

    Audio control:

    evDecAudioBufDelay
    Decrease audio buffer delay.
    evDecBalance
    Decrease balance.
    evDecVolume
    Decrease volume.
    evIncAudioBufDelay
    Increase audio buffer delay.
    evIncBalance
    Increase balance.
    evIncVolume
    Increase volume.
    evMute
    Mute/unmute the sound.
    evSetBalance
    Set balance (can be used by a potmeter; the relative value (0-100%) of the potmeter is used).
    evSetVolume
    Set volume (can be used by a potmeter; the relative value (0-100%) of the potmeter is used).

    Miscellaneous:

    evAbout
    Open the about window.
    evEqualeaser
    Turn the equalizer on/off.
    evExit
    Quit from the program.
    evIconify
    Iconify the window.
    evLoad
    Load a file (by opening a file browser window, where you can choose a file).
    evLoadPlay
    Does the same as evLoad, but it automatically starts playing after the file is loaded.
    evNone
    Empty message, it has no effect. (Except maybe in CVS versions. :-))
    evPlayList
    Open/close the playlist window.
    evPreferences
    Open the preferences window.
    evSkinBrowser
    Open the skin browser window.
    --- NEW FILE ---

    2.3.2. Audio output devices

    MPlayer's audio interface is called libao2. It currently contains these drivers :

    General:

      oss  OSS (ioctl) driver
    sdlSDL driver (supports up/downsampling, ESD, ARTS etc)
    nasNAS (Network Audio System) driver
    alsa5native ALSA 0.5 driver
    alsa9native ALSA 0.9 driver (works, but has problems -> use OSS)
    sunSUN audio driver (/dev/audio) for BSD and Solaris8 users

    The fact is, Linux soundcard drivers are usually shit, and always as incompatible as they can be. It MAY take a while to find your optimal settings.

    • if you have OSS as driver, first try with -ao oss (this is the default). If you experience glitches, halts or anything out of the ordinary, have a look at -ao sdl (NOTE: of course you'll have to have a new SDL library and its devel pair installed). It helps in a lot of cases (it also supports ESD, ARTS, and up/downsampling. /esd is GNOME's, arts is KDE's sound daemon/).
    • if you have ALSA version 0.5, then you ALMOST always have to use -ao alsa5 , since 0.5 has buggy OSS emulation code, and will crash MPlayer with a message like this:
        DEMUXER: Too many (945 in 8390980 bytes) video packets in the buffer!
    • if you have ALSA version 0.9, use -ao oss or -ao sdl as you wish. You can also use -ao alsa9 as it works now, however it has many problems (losing sync, disappearing audio, etc).

    On Solaris/FreeBSD systems, use the SUN audio driver with the -ao sun option, otherwise you'll have no video, nor audio playing.

    2.3.2.1. Soundcard experiences, recommendations

    VIA onboard chipset (via82cxxx) 48Khz only
    Driver: from here
    Aureal Vortex 2
        OSS:no driver
    OSS/Pro:OK
    ALSA:no driver
    Max kHz:48
    Driver:aureal.sourceforge.net
    Driver2: from here
    (buffer size increased to 32k)
    GUS PnP
    OSS:no driver
    OSS/Pro:OK
    ALSA:OK
    Max kHz:48
    SB Live!
    OSS:OK
    ALSA:(?)
    Max kHz:48
    SB AWE 64
    OSS:max 44kHz
    ALSA:48kHz sounds shit
    Max kHz:48
    Gravis UltraSound ACE
    OSS:max 44Khz. not OK
    ALSA:OK
    Max kHz:48
    Gravis UltraSound MAX
    OSS:OK
    ALSA:OK (?)
    Max kHz:48
    ESS 688
    OSS:OK
    ALSA:OK (?)
    Max kHz:48
    C-Media cards (which ones?)
    OSS:not OK (hissing) (?)
    ALSA:OK (?)
    Max kHz:?
    Yamaha cards (*ymf*)
    OSS:not OK (?) (maybe -ao sdl)
    ALSA:OK only with ALSA 0.5 with OSS emulation AND -ao sdl (!) (?)
    Max kHz:?
    Cards with envy24 chips (like Terratec EWS88MT)
    OSS:?
    OSS/Pro:OK
    ALSA:?
    Max kHz:?
    PC Speaker or DAC
    OSS:OK (use the SDL driver : -ao sdl)
    ALSA:no driver
    Max kHz:the driver emulates 44.1 maybe more
    Driver:ftp://ftp.infradead.org/pub/pcsp

    • on Linux, use at least kernel 2.4 if possible, 2.2 isn't tested
    • if sound clicks when playing from CD-ROM, turn on IRQ unmasking ! for example "hdparm -u1 /dev/cdrom" (see "man hdparm" !!!) This is recommended anyways... (for XMMS, etc...) Read section 4.1.
    • don't use your soundcard by other application ( for ex. XMMS ) ! if you use ESD, start MPlayer with the '-vo sdl:esd' option !
    • Please tell us how MPlayer and your soundcard(s) worked together!

    --- NEW FILE ---

    In medias res

    There are two major topic which always causes huge dispute and flame on the mplayer-users mailing list. Number one is of course the topic of the

    GCC 2.96 series

    Also read this text !!!

    The background : there were/are the GCC 2.95 series. The best of them was 2.95.3 . Please note the style of the version numbering. This is how the GCC team numbers their compilers. The 2.95 series are good. We never ever saw anything that was miscompiled because of the 2.95's faultiness.

    The action : RedHat started to include a GCC version of 2.96 with their distributions. Note the version numbering. This should be the GCC team's versioning. They patched the CVS version of GCC (something between 2.95 and 3.0) They patched it very deep, and used this version in the distrib because 3.0 wasn't out at time, and they wanted IA64 support ASAP (business reasons). Oh, and GCC 2.95 miscompiles bash on the s390 architecture (there is no RedHat distribution for s390..) .

    The facts : MPlayer's compile process needs the --disable-gcc-checking to proceed upon detecting a GCC version of 2.96 (apparently it needs this option on egcs too. It's because we don't test MPlayer on egcs. Pardon us, but we rather develop MPlayer). If you know MPlayer, you should know that it has great speed. It achieves this by having overoptimized MMX/SSE/3DNow/etc codes, fastmemcpy, and lots of other features. MPlayer contained MMX/3DNow instructions in a syntax that all Linux compilers accept it... except RedHat's GCC (it's more standard compliant). It simply skips them. It doesn't give errors. It doesn't give warnings. And, there is Lame. With gcc 2.96, its quality check (make test after compiling) doesn't even run !!! But hey, it compiles bash on s390 and IA64.

    The statements : most developers around the world begun having bad feelings about RedHat's GCC 2.96 , and told their RedHat users to compile with other compiler than 2.96 . RedHat users' disappointment slowly went into anger. What was all good for, apart from giving headaches to developers, putting oil on anti-RedHat flame, confusing users? The answer, I do not know.

    Present age, present time : RedHat says that GCC 2.96-85 and above is fixed, and works properly. Note the versioning. They should have started with something like this. What about GCC 2.96.85 ? It doesn't matter now. I don't search, but I still see bugs with 2.96 . It doesn't matter now, hopefully now RedHat will forget about 2.96 and turn towards 3.0. Towards a deep patched 3.0...

    What I don't understand is why are we hated by RedHat users for putting warning messages, and stay-away documents in MPlayer . Why are we called "brain damaged", "total asshole", "childish" by RedHat users, on our mailing list, and even on the redhat-devel . They even considered forking MPlayer for themselves. RedHat users. Why? It's RedHat that made the compiler, why do you have to hate us? Are you that fellow RedHat worshippers? Please stop it. We don't hold a grudge against users, doesn't matter how loud you advertise its contrary. Please go flame Linus Torvalds, the DRI developers (oh, now I know why there were laid off by VA!), the Wine, avifile. Even if we are arrogant, are we not the same as the previously listed ones? Why do we have to suffer from your unrightful wrath?

    I'm closing this topic. Think over it please. I (Gabucino) personally begun with RedHat, then used Mandrake (sorry I don't know their URL), now I have LFS. Never held a grudge against RedHat or RedHat users, and I still don't. Hate is only comfortable. It won't bring you anywhere.

    Binary distribution of MPlayer

    Tons of users asked us about this. For example Debian users tend to say: Oh, I can apt-get install avifile, why should I compile MPlayer ? While this may sound reasonable, the problem lies a bit deeper than those-fuckin-MPlayer-developers-hate-gcc-2.96-and-RedHat-and-Debian.

    Reasons: Law

    MPlayer describes the sourcecode. It contains several files with incompatible licenses especially on the redistribution clauses. As source files, they are allowed to coexist in a same project.

    Therefore, NEITHER BINARIES NOR BINARY PACKAGES OF MPlayer ARE ALLOWED TO EXIST SINCE SUCH OBJECTS BREAK LICENSES. PEOPLE WHO DISTRIBUTE SUCH BINARY PACKAGES ARE DOING ILLEGAL ACTIVITIES.

    So if you know somebody who maintains a binary package then forward her/him this text and (ask him to) contact us. What (s)he is doing is illegal and IT IS NO LONGER MPlayer, but his/her mplayer. If it breaks, it is his/her fault. Don't come and cry on the MPlayer mailing lists, you will most likely be blacklisted.

    For example that french guy called Christian Marillat who denied our request, and is still distributing binary Debian packages of MPlayer, despite the fact that there was at least one user who downloaded it and failed (of course compiling from source helped him). And there is Guillaume Rousse, who is doing the same, but making RPMs for Mandrake. Do not support criminals!

    Reasons: Technical

    • MPlayer's speed (MMX, SSE, fastmemcpy, etc) optimizations are determined during compilation. Thus a compiled binary contains very processor-specific code. An MPlayer binary compiled for K6 will die on Pentiums and vice versa. This has to be workarounded by runtime detection, which is not an easy thing to do becase it causes massive speed decrease. If you don't believe (it was explained in details 10000 times on mplayer-users, search the archive), solve it and send us a patch. Someone begun work on it, but disappeared since then.
    • MPlayer's video/audio system is not plugin based. It is compiled into the binary, thus making the binary depend on various libraries (the GUI depends on GTK, DivX4 depends on libdivxdecore, SDL depends on libSDL, every SDL release contains an unique bug that has to be workarounded during compiletime, X11 output compiles differently for X3 and X4, etc). You may say: yes, let's make 30 versions of downloadable binaries! We won't. We will make these stuff pluggable in the future.
    --- NEW FILE ---

    2.3.1. Video output devices

    [...966 lines suppressed...] mode which is detected automatically and in this case you'll get comparable with -vo dga and -vo fbdev drivers speed.
    Only thing you need to do - have TV connector plugged in before booting your PC since video BIOS initializes itself only once during POST procedure.

    For detail see VESA sections of this documentation.

    2.3.1.A.3. Voodoo 3

    Check this URL.

    From arpi at thot.banki.hu Sat Mar 21 18:16:05 2009 From: arpi at thot.banki.hu (Arpi) Date: Wed, 10 Jul CEST 01:40:38 +0200 Subject: [Mplayer-cvslog] CVS: main/etc codecs.conf,1.204,1.205 In-Reply-To: <200207091905.g69J5QfJ009393@mail.mplayerhq.hu> Message-ID: <200207100809.g6A89lSm019746@mail.mplayerhq.hu> Hi, > videocodec qtrpza > - info "Quicktime Apple Video" > - status working > - fourcc rpza,azpr > - driver qtrpza > - out BGR32,BGR24,BGR15 > - > -videocodec qtsmc > info "Apple Graphics (SMC) codec" > status working heh? A'rpi / Astral & ESP-team -- Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu From arpi at thot.banki.hu Sat Mar 21 18:16:05 2009 From: arpi at thot.banki.hu (Arpi) Date: Thu, 11 Jul CEST 01:22:00 +0200 Subject: [Mplayer-cvslog] CVS: main/libmpcodecs vd_xvid.c,NONE,1.1 Makefile,1.48,1.49 vd.c,1.42,1.43 vd_divx4.c,1.8,1.9 vd_odivx.c,1.9,1.10 In-Reply-To: <200207102057.g6AKv0Fn026594@mail.mplayerhq.hu> Message-ID: <200207110655.g6B6t2Ut015738@mail.mplayerhq.hu> Hi, > // to set/get/query special features/parameters > static int control(sh_video_t *sh,int cmd,void* arg,...){ > return CONTROL_UNKNOWN; > } hmm, what about postprocessing support? without it it has no much use :( A'rpi / Astral & ESP-team -- Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu From arpi at thot.banki.hu Sat Mar 21 18:16:05 2009 From: arpi at thot.banki.hu (Arpi) Date: Sun, 28 Jul CEST 18:40:44 +0200 Subject: [Mplayer-cvslog] CVS: main vobsub.c,1.15,1.16 In-Reply-To: <200207281442.31253.atmosfear@users.sourceforge.net> Message-ID: <200207281602.g6SG2SIJ028949@mail.mplayerhq.hu> Hi, > On Sunday 28 July 2002 14:21, Kim Minh Kaplan wrote: > > Atmosfear writes: > > > - fprintf(me->fidx, " %06x", palette[i] & 0x00ffffff); > > > + fprintf(me->fidx, " %02x%02x%02x", palette[i]>>16 & 0x000000ff, > > > + palette[i]>>16 & 0x000000ff, palette[i]>>16 & 0x000000ff); > > > > What is that? You are replicating the Y part in the U & V... This > > can't be correct. > Before mplayer vobsub looked like 108080, 808080, eb8080, ... and Windows > vobsub of the same dvd looked like 101010, 808080, ebebeb, ... so maybe > windows vobsub is buggy, but to be compatible we need to do this, otherwise > winvobsub displays bad colours. afaik vobsub has colors in RGB instead of YUV so YYY looks better, it's the same as RGB but in greyscale... A'rpi / Astral & ESP-team -- Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu From arpi at thot.banki.hu Sat Mar 21 18:16:05 2009 From: arpi at thot.banki.hu (Arpi) Date: Sun, 28 Jul CEST 19:01:27 +0200 Subject: [Mplayer-cvslog] CVS: main/libmpcodecs vd_ffmpeg.c,1.35,1.36 In-Reply-To: <200207281554.g6SFsctr022775@mail.mplayerhq.hu> Message-ID: <200207282032.g6SKWoDq019999@mail.mplayerhq.hu> Hi, > Modified Files: > vd_ffmpeg.c > Log Message: > Generate ffmpeg compatible vstats_

    General:

      x11  X11 with optional SHM extension
    xvX11 using overlays with the Xvideo extension (hardware YUV & scaling)
    - - + - - +
    +

     

    Status of codecs support

    @@ -19,16 +19,16 @@

    Video codecs
    Audio codecs

    +
    Video codecs:

    - + - + @@ -36,7 +36,7 @@ - + @@ -48,14 +48,14 @@ - + - + @@ -66,14 +66,14 @@ - + - + @@ -84,14 +84,14 @@ - + - + @@ -105,17 +105,17 @@
    Working video codecs
    codec name fourcc codecfilecomments
    %i %F %d
    New / Untested codecs
    codec name fourcc codecfile problem
    %i %F %d
    Codecs with problems
    codec name fourcc codecfile problem
    %i %F %d
    Not yet working codecs:
    codec name fourcc codecfile problem
    %i %F %d
    - + - + - + @@ -123,17 +123,17 @@ - + - + - + @@ -141,17 +141,17 @@ - + - + - + @@ -159,17 +159,17 @@ - + - + - + From diego at biurrun.de Sun Mar 1 18:52:24 2009 From: diego at biurrun.de (Diego Biurrun) Date: Sun, 1 Mar 2009 18:52:24 +0100 Subject: [MPlayer-cvslog] r28771 - trunk/Makefile In-Reply-To: References: <20090301110705.D98CD3B532@natsuki.mplayerhq.hu> Message-ID: <20090301175224.GK2082@biurrun.de> On Sun, Mar 01, 2009 at 03:05:25PM +0000, Carl Eugen Hoyos wrote: > diego mplayerhq.hu> writes: > > > Log: > > codec-cfg does not depend on codecs.conf.h, it is used to generate it. > > Thank you, that was an awful bug, imo. Yeah, that should have been noticed earlier :-/ The problem is that codec-cfg.c is a mess of different things and should really be split into multiple files. Diego From subversion at mplayerhq.hu Sun Mar 1 18:53:07 2009 From: subversion at mplayerhq.hu (diego) Date: Sun, 1 Mar 2009 18:53:07 +0100 (CET) Subject: [MPlayer-cvslog] r28785 - trunk/DOCS/tech/codecs-in.html Message-ID: <20090301175307.18EF15C04F@natsuki.mplayerhq.hu> Author: diego Date: Sun Mar 1 18:53:06 2009 New Revision: 28785 Log: Use UTF-8 as character set. Modified: trunk/DOCS/tech/codecs-in.html Modified: trunk/DOCS/tech/codecs-in.html ============================================================================== --- trunk/DOCS/tech/codecs-in.html Sun Mar 1 18:48:05 2009 (r28784) +++ trunk/DOCS/tech/codecs-in.html Sun Mar 1 18:53:06 2009 (r28785) @@ -3,7 +3,7 @@ Codec Status Table - MPlayer - The Movie Player - +
    Working audio codecs
    codec name format codecfile comments
    %i %f %d
    New / Untested codecs
    codec name format codecfile problem
    %i %f %d
    Codecs with problems
    codec name format codecfile problem
    %i %f %d
    Not yet working codecs
    codec name format codecfile problem
    %i %f %d
    From subversion at mplayerhq.hu Sun Mar 1 20:31:29 2009 From: subversion at mplayerhq.hu (eugeni) Date: Sun, 1 Mar 2009 20:31:29 +0100 (CET) Subject: [MPlayer-cvslog] r28787 - trunk/libass/ass_bitmap.c Message-ID: <20090301193129.C304654045@natsuki.mplayerhq.hu> Author: eugeni Date: Sun Mar 1 20:31:29 2009 New Revision: 28787 Log: Fix a memory leak. Modified: trunk/libass/ass_bitmap.c Modified: trunk/libass/ass_bitmap.c ============================================================================== --- trunk/libass/ass_bitmap.c Sun Mar 1 20:11:46 2009 (r28786) +++ trunk/libass/ass_bitmap.c Sun Mar 1 20:31:29 2009 (r28787) @@ -214,6 +214,7 @@ static bitmap_t* glyph_to_bitmap_interna dst += bm->w; } + FT_Done_Glyph(glyph); return bm; } From subversion at mplayerhq.hu Mon Mar 2 03:05:33 2009 From: subversion at mplayerhq.hu (compn) Date: Mon, 2 Mar 2009 03:05:33 +0100 (CET) Subject: [MPlayer-cvslog] r28789 - trunk/Changelog Message-ID: <20090302020533.4662E54045@natsuki.mplayerhq.hu> Author: compn Date: Mon Mar 2 03:05:32 2009 New Revision: 28789 Log: changes Modified: trunk/Changelog Modified: trunk/Changelog ============================================================================== --- trunk/Changelog Sun Mar 1 21:40:38 2009 (r28788) +++ trunk/Changelog Mon Mar 2 03:05:32 2009 (r28789) @@ -1,6 +1,6 @@ MPlayer (1.0) - rc3: + rc3: "StillAlive" March 1, 2009 Decoders: * Nellymoser audio decoding via lavc * support for X8 frame (fixes "J-type picture is not supported" for WMV2) @@ -73,11 +73,12 @@ MPlayer (1.0) FFmpeg/libavcodec: * DNxHD (SMPTE VC-3) encoder - * H.264 speedup and PAFF decoding + * H.264 speedup and PAFF decoding (install YASM for faster H264 decoding) * correctly decode more of the H.264 conformance testsuite * Nellymoser audio codec - * VC-1/WMV3 MMX optimizations + * VC-1/WMV3 decoder speedup * VP3 decoder speedup + * VP6 decoder speedup * Split-Radix FFT (speedup multiple audio codecs) * MMX/SSE/ARM and other misc speedups * QCELP decoder From subversion at mplayerhq.hu Mon Mar 2 03:40:22 2009 From: subversion at mplayerhq.hu (compn) Date: Mon, 2 Mar 2009 03:40:22 +0100 (CET) Subject: [MPlayer-cvslog] r28791 - trunk/Changelog Message-ID: <20090302024022.2CF0D5001F@natsuki.mplayerhq.hu> Author: compn Date: Mon Mar 2 03:40:21 2009 New Revision: 28791 Log: import ffmpeg changelog Modified: trunk/Changelog Modified: trunk/Changelog ============================================================================== --- trunk/Changelog Mon Mar 2 03:39:40 2009 (r28790) +++ trunk/Changelog Mon Mar 2 03:40:21 2009 (r28791) @@ -2,7 +2,6 @@ MPlayer (1.0) rc3: "StillAlive" March 1, 2009 Decoders: - * Nellymoser audio decoding via lavc * support for X8 frame (fixes "J-type picture is not supported" for WMV2) * support for DTS WAV/DTS-CD passthrough by ad_hwac3 * Apple's raw YUV2 in MOV @@ -10,8 +9,6 @@ MPlayer (1.0) * video game codecs: BFI video, Playstation MDEC video, ADPCM XA audio, 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 * support for progressive jpeg in ffmjpeg * ACDSystems mjpeg (ACDV) via binary DLL and lavc @@ -39,14 +36,15 @@ MPlayer (1.0) * 10-bit video (v210) via Cinewave binary DLL * Brooktree YUV 4:1:1 Raw (Y41P) via binary DLL * many rare/obscure fourccs for known formats added + * lower priority for binary Linux rv3040 codecs due to bugs Demuxers: * -lavfdopts cryptokey allows decrypting MXF and ASF files * support for wavpack in Matroska - * demux_lavf permits program switching * AVOption support for lavf demuxing * prefer lavf musepack demuxer over libmpdemux - * prefer lavf MOV demuxer over libmpdemux + * prefer lavf MOV demuxer over libmpdemux (use -demuxer mov for old behavior) + * support program switching in lavf demuxer * support -slang in lavf demuxer * support nosound switching in lavf demuxer * support libass in lavf demuxer @@ -54,6 +52,7 @@ MPlayer (1.0) * support MOV subtitle format * support for attachments in lavf demuxer * support for chapters in lavf demuxer + * support seeking in multirate RealMedia files * FLAC speedup in lavf demuxer * MNG demuxer @@ -70,20 +69,66 @@ MPlayer (1.0) * DVD streams can switch angles * DVD still menus are now supported via dvdnav:// * allow specifying the TV standard for each channel + * switch internal dvdread to libdvdread SVN external FFmpeg/libavcodec: - * DNxHD (SMPTE VC-3) encoder - * H.264 speedup and PAFF decoding (install YASM for faster H264 decoding) + * DNxHD encoder + * H.264 PAFF decoding + * Nellymoser ASAO decoder + * Beam Software SIFF demuxer and decoder + * libvorbis Vorbis decoding removed in favor of native decoder + * IntraX8 (J-Frame) subdecoder for WMV2 and VC-1 + * Ogg (Vorbis only) muxer + * PC Paintbrush PCX decoder + * Sun Rasterfile decoder + * TechnoTrend PVA demuxer + * Linux Media Labs MPEG-4 (LMLM4) demuxer + * AVM2 (Flash 9) SWF muxer + * QT variant of IMA ADPCM encoder + * Ipod/Iphone compatible mp4 muxer + * Mimic decoder + * MSN TCP Webcam stream demuxer + * RL2 demuxer / decoder + * IFF demuxer + * 8SVX audio decoder + * BFI demuxer + * MAXIS EA XA (.xa) demuxer / decoder + * BFI video decoder + * OMA demuxer + * MLP/TrueHD decoder + * Electronic Arts CMV decoder + * Motion Pixels Video decoder + * Motion Pixels MVI demuxer + * removed animated GIF decoder/demuxer + * D-Cinema audio muxer + * Electronic Arts TGV decoder + * Apple Lossless Audio Codec (ALAC) encoder + * AAC decoder + * floating point PCM encoder/decoder + * MXF muxer + * E-AC-3 support added to AC-3 decoder + * Nellymoser ASAO encoder + * ASS and SSA demuxer and muxer + * liba52 wrapper removed + * SVQ3 watermark decoding support + * Speex decoding via libspeex + * Electronic Arts TGQ decoder + * RV30 and RV40 decoder + * QCELP / PureVoice decoder + * hybrid WavPack support + * R3D REDCODE demuxer + * Electronic Arts TQI decoder + * OpenJPEG based JPEG 2000 decoder + * NC (NC4600) cameras file demuxer + * MXF D-10 muxer + * Generic metadata API + * H.264 speedup and PAFF decoding (install Yasm for faster H264 decoding) * correctly decode more of the H.264 conformance testsuite - * Nellymoser audio codec * VC-1/WMV3 decoder speedup * VP3 decoder speedup * VP6 decoder speedup * Split-Radix FFT (speedup multiple audio codecs) * MMX/SSE/ARM and other misc speedups - * QCELP decoder - * RV30 decoder - * RV40 decoder libmpeg2: * enable Alpha/ARM optimizations in libmpeg2 @@ -99,7 +144,6 @@ MPlayer (1.0) * Direct3D Windows video output driver added. * factorize code in vo_wii * removed unnecessary code from vo x11, xv, xvmc - * automatic detection of hw acceleration (vo gl:yuv=x) for vo_gl * add OS/2 DART audio driver (-ao dart) * add VDPAU video output @@ -119,7 +163,7 @@ 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 + * libass fixes and updates to match VSFilter renderer * libdvdcss updated to 1.2.10, now same as upstream version * fix -endchapter support again for -dump* options * add startup volume option @@ -132,6 +176,7 @@ MPlayer (1.0) * VIDIX on SuperH. * workarounds for AltiVec on Apple gcc 3.3 on Mac OS X dropped * vo_macosx can now be compiled in 64-bits mode + * allow multiple MPlayer instances w/ vo_macosx using buffer_name * OpenGL support for unmodified MinGW64 SWScaler: From subversion at mplayerhq.hu Mon Mar 2 12:06:05 2009 From: subversion at mplayerhq.hu (reimar) Date: Mon, 2 Mar 2009 12:06:05 +0100 (CET) Subject: [MPlayer-cvslog] r28792 - trunk/m_option.c Message-ID: <20090302110606.06BE24E005@natsuki.mplayerhq.hu> Author: reimar Date: Mon Mar 2 12:06:05 2009 New Revision: 28792 Log: Minor cosmetics: fix indentation Modified: trunk/m_option.c Modified: trunk/m_option.c ============================================================================== --- trunk/m_option.c Mon Mar 2 03:40:21 2009 (r28791) +++ trunk/m_option.c Mon Mar 2 12:06:05 2009 (r28792) @@ -146,7 +146,7 @@ static int parse_int(const m_option_t* o tmp_int = strtol(param, &endptr, 10); if (*endptr) - tmp_int = strtol(param, &endptr, 0); + tmp_int = strtol(param, &endptr, 0); if (*endptr) { mp_msg(MSGT_CFGPARSER, MSGL_ERR, "The %s option must be an integer: %s\n",name, param); return M_OPT_INVALID; From subversion at mplayerhq.hu Mon Mar 2 12:10:12 2009 From: subversion at mplayerhq.hu (reimar) Date: Mon, 2 Mar 2009 12:10:12 +0100 (CET) Subject: [MPlayer-cvslog] r28793 - trunk/m_option.c Message-ID: <20090302111013.26B0A4E079@natsuki.mplayerhq.hu> Author: reimar Date: Mon Mar 2 12:10:11 2009 New Revision: 28793 Log: Use strtoll in parse_int to avoid discrepancies between 32 and 64 bit systems. Modified: trunk/m_option.c Modified: trunk/m_option.c ============================================================================== --- trunk/m_option.c Mon Mar 2 12:06:05 2009 (r28792) +++ trunk/m_option.c Mon Mar 2 12:10:11 2009 (r28793) @@ -137,16 +137,16 @@ const m_option_type_t m_option_type_flag // Integer static int parse_int(const m_option_t* opt,const char *name, char *param, void* dst, int src) { - long tmp_int; + long long tmp_int; char *endptr; src = 0; if (param == NULL) return M_OPT_MISSING_PARAM; - tmp_int = strtol(param, &endptr, 10); + tmp_int = strtoll(param, &endptr, 10); if (*endptr) - tmp_int = strtol(param, &endptr, 0); + tmp_int = strtoll(param, &endptr, 0); if (*endptr) { mp_msg(MSGT_CFGPARSER, MSGL_ERR, "The %s option must be an integer: %s\n",name, param); return M_OPT_INVALID; From subversion at mplayerhq.hu Mon Mar 2 12:17:50 2009 From: subversion at mplayerhq.hu (reimar) Date: Mon, 2 Mar 2009 12:17:50 +0100 (CET) Subject: [MPlayer-cvslog] r28794 - in trunk: m_option.c m_option.h Message-ID: <20090302111750.B0D6C4E080@natsuki.mplayerhq.hu> Author: reimar Date: Mon Mar 2 12:17:50 2009 New Revision: 28794 Log: Add a 64 bit integer type to the suboption parser. Modified: trunk/m_option.c trunk/m_option.h Modified: trunk/m_option.c ============================================================================== --- trunk/m_option.c Mon Mar 2 12:10:11 2009 (r28793) +++ trunk/m_option.c Mon Mar 2 12:17:50 2009 (r28794) @@ -162,13 +162,20 @@ static int parse_int(const m_option_t* o return M_OPT_OUT_OF_RANGE; } - if(dst) VAL(dst) = tmp_int; + if(dst) { + if (opt->type->size == sizeof(int64_t)) + *(int64_t *)dst = tmp_int; + else + VAL(dst) = tmp_int; + } return 1; } static char* print_int(const m_option_t* opt, const void* val) { opt = NULL; + if (opt->type->size == sizeof(int64_t)) + return dup_printf("%"PRId64, *(const int64_t *)val); return dup_printf("%d",VAL(val)); } @@ -185,6 +192,19 @@ const m_option_type_t m_option_type_int NULL }; +const m_option_type_t m_option_type_int64 = { + "Integer64", + "", + sizeof(int64_t), + 0, + parse_int, + print_int, + copy_opt, + copy_opt, + NULL, + NULL +}; + // Float #undef VAL Modified: trunk/m_option.h ============================================================================== --- trunk/m_option.h Mon Mar 2 12:10:11 2009 (r28793) +++ trunk/m_option.h Mon Mar 2 12:17:50 2009 (r28794) @@ -25,6 +25,7 @@ struct m_struct_st; // Simple types extern const m_option_type_t m_option_type_flag; extern const m_option_type_t m_option_type_int; +extern const m_option_type_t m_option_type_int64; extern const m_option_type_t m_option_type_float; extern const m_option_type_t m_option_type_double; extern const m_option_type_t m_option_type_string; @@ -152,6 +153,7 @@ extern const m_obj_params_t m_span_param // FIXME: backward compatibility #define CONF_TYPE_FLAG (&m_option_type_flag) #define CONF_TYPE_INT (&m_option_type_int) +#define CONF_TYPE_INT64 (&m_option_type_int64) #define CONF_TYPE_FLOAT (&m_option_type_float) #define CONF_TYPE_DOUBLE (&m_option_type_double) #define CONF_TYPE_STRING (&m_option_type_string) From subversion at mplayerhq.hu Mon Mar 2 12:24:21 2009 From: subversion at mplayerhq.hu (reimar) Date: Mon, 2 Mar 2009 12:24:21 +0100 (CET) Subject: [MPlayer-cvslog] r28795 - in trunk: cfg-mplayer.h libvo/video_out.c libvo/video_out.h Message-ID: <20090302112421.49F9C4E005@natsuki.mplayerhq.hu> Author: reimar Date: Mon Mar 2 12:24:20 2009 New Revision: 28795 Log: Make WinID a 64 bit integer, this should avoid issues with valid Window handles on windows being interpreted as "no wid set". Modified: trunk/cfg-mplayer.h trunk/libvo/video_out.c trunk/libvo/video_out.h Modified: trunk/cfg-mplayer.h ============================================================================== --- trunk/cfg-mplayer.h Mon Mar 2 12:17:50 2009 (r28794) +++ trunk/cfg-mplayer.h Mon Mar 2 12:24:20 2009 (r28795) @@ -199,7 +199,7 @@ const m_option_t mplayer_opts[]={ {"adapter", &vo_adapter_num, CONF_TYPE_INT, CONF_RANGE, 0, 5, NULL}, {"refreshrate",&vo_refresh_rate,CONF_TYPE_INT,CONF_RANGE, 0,100, NULL}, - {"wid", &WinID, CONF_TYPE_INT, 0, 0, 0, NULL}, + {"wid", &WinID, CONF_TYPE_INT64, 0, 0, 0, NULL}, #ifdef CONFIG_X11 // x11,xv,xmga,xvidix {"icelayer", "-icelayer has been removed. Use -fstype layer: instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, Modified: trunk/libvo/video_out.c ============================================================================== --- trunk/libvo/video_out.c Mon Mar 2 12:17:50 2009 (r28794) +++ trunk/libvo/video_out.c Mon Mar 2 12:24:20 2009 (r28795) @@ -68,7 +68,7 @@ int vo_refresh_rate=0; int vo_keepaspect=1; int vo_rootwin=0; int vo_border=1; -int WinID = -1; +int64_t WinID = -1; int vo_pts=0; // for hw decoding float vo_fps=0; Modified: trunk/libvo/video_out.h ============================================================================== --- trunk/libvo/video_out.h Mon Mar 2 12:17:50 2009 (r28794) +++ trunk/libvo/video_out.h Mon Mar 2 12:24:20 2009 (r28795) @@ -250,7 +250,7 @@ extern char *vo_subdevice; extern int vo_colorkey; -extern int WinID; +extern int64_t WinID; typedef struct { float min; From cehoyos at ag.or.at Mon Mar 2 23:41:23 2009 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Mon, 2 Mar 2009 22:41:23 +0000 (UTC) Subject: [MPlayer-cvslog] =?utf-8?q?r28766_-_trunk/libmpcodecs/vd=5Fffmpeg?= =?utf-8?q?=2Ec?= References: <20090301090301.A1D384E002@natsuki.mplayerhq.hu> Message-ID: reimar mplayerhq.hu> writes: > Create a set_format_params function that sets all the special options needed > for XvMC/VDPAU acceleration in a single place. > This should get closer to working with selecting acceleration via pix_fmt > instead of via a special codec for each method. While this fixed -vc ffvc1vdpau, this broke -vc ffmpeg12vdpau (MPEG1/2 VDPAU). Carl Eugen From subversion at mplayerhq.hu Tue Mar 3 14:38:34 2009 From: subversion at mplayerhq.hu (reimar) Date: Tue, 3 Mar 2009 14:38:34 +0100 (CET) Subject: [MPlayer-cvslog] r28801 - trunk/libmpcodecs/vd_ffmpeg.c Message-ID: <20090303133834.0FFC450084@natsuki.mplayerhq.hu> Author: reimar Date: Tue Mar 3 14:38:33 2009 New Revision: 28801 Log: Add another hack to work-around the currently completely inconsistent way in which libavcodec sets AVCodecContext::pix_fmt. Modified: trunk/libmpcodecs/vd_ffmpeg.c Modified: trunk/libmpcodecs/vd_ffmpeg.c ============================================================================== --- trunk/libmpcodecs/vd_ffmpeg.c Tue Mar 3 10:19:35 2009 (r28800) +++ trunk/libmpcodecs/vd_ffmpeg.c Tue Mar 3 14:38:33 2009 (r28801) @@ -409,7 +409,8 @@ static int init(sh_video_t *sh){ uninit(sh); return 0; } - // this is necessary in case get_format was never called + // this is necessary in case get_format was never called and init_vo is + // too late e.g. for H.264 VDPAU set_format_params(avctx, avctx->pix_fmt); mp_msg(MSGT_DECVIDEO, MSGL_V, "INFO: libavcodec init OK!\n"); return 1; //mpcodecs_config_vo(sh, sh->disp_w, sh->disp_h, IMGFMT_YV12); @@ -504,6 +505,9 @@ static int init_vo(sh_video_t *sh, enum pix_fmt != ctx->pix_fmt || !ctx->vo_initialized) { + // this is a special-case HACK for MPEG-1/2 VDPAU that uses neither get_format nor + // sets the value correctly in avcodec_open. + set_format_params(avctx, avctx->pix_fmt); mp_msg(MSGT_DECVIDEO, MSGL_V, "[ffmpeg] aspect_ratio: %f\n", aspect); if (sh->aspect == 0 || av_cmp_q(avctx->sample_aspect_ratio, From subversion at mplayerhq.hu Tue Mar 3 17:17:15 2009 From: subversion at mplayerhq.hu (diego) Date: Tue, 3 Mar 2009 17:17:15 +0100 (CET) Subject: [MPlayer-cvslog] r28802 - trunk/osdep/getch2.h Message-ID: <20090303161716.01CC7CC060@natsuki.mplayerhq.hu> Author: diego Date: Tue Mar 3 17:17:11 2009 New Revision: 28802 Log: Add back mistakenly removed copyright notice. Modified: trunk/osdep/getch2.h Modified: trunk/osdep/getch2.h ============================================================================== --- trunk/osdep/getch2.h Tue Mar 3 14:38:33 2009 (r28801) +++ trunk/osdep/getch2.h Tue Mar 3 17:17:11 2009 (r28802) @@ -2,6 +2,8 @@ * GyS-TermIO v2.0 (for GySmail v3) * a very small replacement of ncurses library * + * copyright (C) 1999 A'rpi/ESP-team + * * This file is part of MPlayer. * * MPlayer is free software; you can redistribute it and/or modify From diego at biurrun.de Tue Mar 3 17:17:46 2009 From: diego at biurrun.de (Diego Biurrun) Date: Tue, 3 Mar 2009 17:17:46 +0100 Subject: [MPlayer-cvslog] r28779 - in trunk/osdep: getch2-win.c getch2.c getch2.h gettimeofday.c glob-win.c glob.h keycodes.h macosx_finder_args.cmmap_anon.cmmap_anon.h mplayer.rc setenv.c shmem.c shmem.h strsep.c swab.c ... In-Reply-To: References: <20090301131326.4D84E4E0B7@natsuki.mplayerhq.hu> Message-ID: <20090303161746.GB2289@biurrun.de> On Sun, Mar 01, 2009 at 03:04:39PM +0000, Carl Eugen Hoyos wrote: > > diego mplayerhq.hu> writes: > > > --- trunk/osdep/getch2.h Sun Mar 1 13:25:31 2009 (r28778) > > +++ trunk/osdep/getch2.h Sun Mar 1 14:13:25 2009 (r28779) > > @@ -1,5 +1,23 @@ > > -/* GyS-TermIO v2.0 (for GySmail v3) (C) 1999 A'rpi/ESP-team */ > > -/* a very small replacement of ncurses library */ > > +/* > > + * GyS-TermIO v2.0 (for GySmail v3) > > + * a very small replacement of ncurses library > > + * > > + * This file is part of MPlayer. > > + * > > + * MPlayer is free software; you can redistribute it and/or modify > > The copyright notice disappeared in this file, afaics. > I don't believe this was intended. Indeed, thanks for pointing this out. Diego From subversion at mplayerhq.hu Tue Mar 3 19:12:03 2009 From: subversion at mplayerhq.hu (reimar) Date: Tue, 3 Mar 2009 19:12:03 +0100 (CET) Subject: [MPlayer-cvslog] r28803 - trunk/m_option.c Message-ID: <20090303181203.A40873B5CE@natsuki.mplayerhq.hu> Author: reimar Date: Tue Mar 3 19:12:03 2009 New Revision: 28803 Log: 100l, remove a pointless opt = NULL assignment that made print_int crash since r28794 Modified: trunk/m_option.c Modified: trunk/m_option.c ============================================================================== --- trunk/m_option.c Tue Mar 3 17:17:11 2009 (r28802) +++ trunk/m_option.c Tue Mar 3 19:12:03 2009 (r28803) @@ -173,7 +173,6 @@ static int parse_int(const m_option_t* o } static char* print_int(const m_option_t* opt, const void* val) { - opt = NULL; if (opt->type->size == sizeof(int64_t)) return dup_printf("%"PRId64, *(const int64_t *)val); return dup_printf("%d",VAL(val)); From subversion at mplayerhq.hu Wed Mar 4 09:11:42 2009 From: subversion at mplayerhq.hu (reimar) Date: Wed, 4 Mar 2009 09:11:42 +0100 (CET) Subject: [MPlayer-cvslog] r28805 - trunk/libmpdemux/demux_ts.c Message-ID: <20090304081142.DCEC93B8BF@natsuki.mplayerhq.hu> Author: reimar Date: Wed Mar 4 09:11:42 2009 New Revision: 28805 Log: Fix mp_msg call with too few arguments. Modified: trunk/libmpdemux/demux_ts.c Modified: trunk/libmpdemux/demux_ts.c ============================================================================== --- trunk/libmpdemux/demux_ts.c Tue Mar 3 20:47:23 2009 (r28804) +++ trunk/libmpdemux/demux_ts.c Wed Mar 4 09:11:42 2009 (r28805) @@ -1762,7 +1762,8 @@ static int parse_pat(ts_priv_t * priv, i priv->pat.progs[idx].id = progid; priv->pat.progs[idx].pmt_pid = ((base[2] & 0x1F) << 8) | base[3]; mp_msg(MSGT_DEMUX, MSGL_V, "PROG: %d (%d-th of %d), PMT: %d\n", priv->pat.progs[idx].id, i+1, entries, priv->pat.progs[idx].pmt_pid); - mp_msg(MSGT_IDENTIFY, MSGL_V, "PROGRAM_ID=%d (0x%02X), PMT_PID: %d(0x%02X)\n", progid, priv->pat.progs[idx].pmt_pid ); + mp_msg(MSGT_IDENTIFY, MSGL_V, "PROGRAM_ID=%d (0x%02X), PMT_PID: %d(0x%02X)\n", + progid, progid, priv->pat.progs[idx].pmt_pid, priv->pat.progs[idx].pmt_pid); } return 1; From subversion at mplayerhq.hu Wed Mar 4 09:37:55 2009 From: subversion at mplayerhq.hu (reimar) Date: Wed, 4 Mar 2009 09:37:55 +0100 (CET) Subject: [MPlayer-cvslog] r28806 - trunk/libvo/x11_common.c Message-ID: <20090304083755.3EADE4E002@natsuki.mplayerhq.hu> Author: reimar Date: Wed Mar 4 09:37:54 2009 New Revision: 28806 Log: Make sure vo_x11_create_vo_window sets vo_dwidth and vo_dheight right when we were in fullscreen mode and stay there. Modified: trunk/libvo/x11_common.c Modified: trunk/libvo/x11_common.c ============================================================================== --- trunk/libvo/x11_common.c Wed Mar 4 09:11:42 2009 (r28805) +++ trunk/libvo/x11_common.c Wed Mar 4 09:37:54 2009 (r28806) @@ -1135,6 +1135,12 @@ void vo_x11_create_vo_window(XVisualInfo vo_x11_nofs_sizepos(vo_dx, vo_dy, width, height); if (!!vo_fs != !!(flags & VOFLAG_FULLSCREEN)) vo_x11_fullscreen(); + else if (vo_fs) { + // if we are already in fullscreen do not switch back and forth, just + // set the size values right. + vo_dwidth = vo_screenwidth; + vo_dheight = vo_screenheight; + } final: if (vo_gc != None) XFreeGC(mDisplay, vo_gc); From subversion at mplayerhq.hu Wed Mar 4 20:37:07 2009 From: subversion at mplayerhq.hu (reimar) Date: Wed, 4 Mar 2009 20:37:07 +0100 (CET) Subject: [MPlayer-cvslog] r28809 - trunk/libvo/vo_vdpau.c Message-ID: <20090304193707.8F8C43B869@natsuki.mplayerhq.hu> Author: reimar Date: Wed Mar 4 20:37:07 2009 New Revision: 28809 Log: Make sure all output_surfaces are initialized in preinit. Patch by Dan Oscarsson [Dan Oscarsson (at) tietoenator com] Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Wed Mar 4 20:12:49 2009 (r28808) +++ trunk/libvo/vo_vdpau.c Wed Mar 4 20:37:07 2009 (r28809) @@ -1010,7 +1010,7 @@ static int preinit(const char *arg) for (i = 0; i < MAX_VIDEO_SURFACES; i++) surface_render[i].surface = VDP_INVALID_HANDLE; video_mixer = VDP_INVALID_HANDLE; - for (i = 0; i < NUM_OUTPUT_SURFACES; i++) + for (i = 0; i <= NUM_OUTPUT_SURFACES; i++) output_surfaces[i] = VDP_INVALID_HANDLE; vdp_flip_queue = VDP_INVALID_HANDLE; output_surface_width = output_surface_height = -1; From subversion at mplayerhq.hu Thu Mar 5 13:25:11 2009 From: subversion at mplayerhq.hu (reimar) Date: Thu, 5 Mar 2009 13:25:11 +0100 (CET) Subject: [MPlayer-cvslog] r28811 - trunk/libao2/ao_win32.c Message-ID: <20090305122511.97CBD3B543@natsuki.mplayerhq.hu> Author: reimar Date: Thu Mar 5 13:25:10 2009 New Revision: 28811 Log: full_buffers and buffered_bytes must be volatile because they are used from different threads, hopefully this fixes an uninit hang. The code still relies on luck for thread-safety though. Modified: trunk/libao2/ao_win32.c Modified: trunk/libao2/ao_win32.c ============================================================================== --- trunk/libao2/ao_win32.c Thu Mar 5 08:00:45 2009 (r28810) +++ trunk/libao2/ao_win32.c Thu Mar 5 13:25:10 2009 (r28811) @@ -88,8 +88,8 @@ static WAVEHDR* waveBlocks; static HWAVEOUT hWaveOut; //handle to the waveout device static unsigned int buf_write=0; static unsigned int buf_write_pos=0; -static int full_buffers=0; -static int buffered_bytes=0; +static volatile int full_buffers=0; +static volatile int buffered_bytes=0; static ao_info_t info = From subversion at mplayerhq.hu Thu Mar 5 20:00:37 2009 From: subversion at mplayerhq.hu (diego) Date: Thu, 5 Mar 2009 20:00:37 +0100 (CET) Subject: [MPlayer-cvslog] r28812 - trunk/DOCS/tech/svn-howto.txt Message-ID: <20090305190037.375E93B5F1@natsuki.mplayerhq.hu> Author: diego Date: Thu Mar 5 20:00:36 2009 New Revision: 28812 Log: mphq now runs Subversion 1.5. Modified: trunk/DOCS/tech/svn-howto.txt Modified: trunk/DOCS/tech/svn-howto.txt ============================================================================== --- trunk/DOCS/tech/svn-howto.txt Thu Mar 5 13:25:10 2009 (r28811) +++ trunk/DOCS/tech/svn-howto.txt Thu Mar 5 20:00:36 2009 (r28812) @@ -36,8 +36,8 @@ I. BASICS: 0. Get Subversion: - The MPlayer project server runs Subversion 1.4. For optimal compatibility - you should use version 1.4 or later. + The MPlayer project server runs Subversion 1.5. For optimal compatibility + you should use version 1.5 or later. 1. Checking out the source tree: From subversion at mplayerhq.hu Thu Mar 5 21:05:56 2009 From: subversion at mplayerhq.hu (greg) Date: Thu, 5 Mar 2009 21:05:56 +0100 (CET) Subject: [MPlayer-cvslog] r28814 - trunk/libass/ass_render.c Message-ID: <20090305200556.C64AA3B5D6@natsuki.mplayerhq.hu> Author: greg Date: Thu Mar 5 21:05:56 2009 New Revision: 28814 Log: Ignore PlayResX/Y aspect ratio for font aspect ratio. Modified: trunk/libass/ass_render.c Modified: trunk/libass/ass_render.c ============================================================================== --- trunk/libass/ass_render.c Thu Mar 5 20:46:08 2009 (r28813) +++ trunk/libass/ass_render.c Thu Mar 5 21:05:56 2009 (r28814) @@ -2228,10 +2228,7 @@ static int ass_start_frame(ass_renderer_ frame_context.orig_height / frame_context.track->PlayResY; frame_context.border_scale = ((double)frame_context.orig_height) / frame_context.track->PlayResY; - if (frame_context.orig_width * track->PlayResY == frame_context.orig_height * track->PlayResX) - frame_context.font_scale_x = 1.; - else - frame_context.font_scale_x = ((double)(frame_context.orig_width * track->PlayResY)) / (frame_context.orig_height * track->PlayResX); + frame_context.font_scale_x = 1.; priv->prev_images_root = priv->images_root; priv->images_root = 0; From diego at biurrun.de Thu Mar 5 21:09:54 2009 From: diego at biurrun.de (Diego Biurrun) Date: Thu, 5 Mar 2009 21:09:54 +0100 Subject: [MPlayer-cvslog] r28814 - trunk/libass/ass_render.c In-Reply-To: <20090305200556.C64AA3B5D6@natsuki.mplayerhq.hu> References: <20090305200556.C64AA3B5D6@natsuki.mplayerhq.hu> Message-ID: <20090305200954.GC2373@biurrun.de> On Thu, Mar 05, 2009 at 09:05:56PM +0100, greg wrote: > Author: greg > Date: Thu Mar 5 21:05:56 2009 > New Revision: 28814 > > Log: > Ignore PlayResX/Y aspect ratio for font aspect ratio. Congratulations for your first commit Gregori, welcome aboard. You should eventually add yourself to the AUTHORS file. Diego From subversion at mplayerhq.hu Thu Mar 5 21:25:54 2009 From: subversion at mplayerhq.hu (diego) Date: Thu, 5 Mar 2009 21:25:54 +0100 (CET) Subject: [MPlayer-cvslog] r28815 - trunk/Makefile Message-ID: <20090305202554.4F4E93B5E3@natsuki.mplayerhq.hu> Author: diego Date: Thu Mar 5 21:25:54 2009 New Revision: 28815 Log: Simplify some vidix dhahelper build commands with automatic make variables. Modified: trunk/Makefile Modified: trunk/Makefile ============================================================================== --- trunk/Makefile Thu Mar 5 21:05:56 2009 (r28814) +++ trunk/Makefile Thu Mar 5 21:25:54 2009 (r28815) @@ -1098,18 +1098,17 @@ vidix/dhahelperwin/dhahelper-rc.o: vidix vidix/dhahelperwin/base.tmp: vidix/dhahelperwin/dhahelper.o vidix/dhahelperwin/dhahelper-rc.o $(CC) -Wl,--base-file,$@ -Wl,--entry,_DriverEntry at 8 -nostartfiles \ - -nostdlib -o vidix/dhahelperwin/junk.tmp $^ -lntoskrnl - -rm -f vidix/dhahelperwin/junk.tmp + -nostdlib -o $(@D)/junk.tmp $^ -lntoskrnl + -rm -f $(@D)/junk.tmp vidix/dhahelperwin/temp.exp: vidix/dhahelperwin/base.tmp - dlltool --dllname vidix/dhahelperwin/dhahelper.sys --base-file $< --output-exp $@ + dlltool --dllname $(@D)/dhahelper.sys --base-file $< --output-exp $@ vidix/dhahelperwin/dhahelper.sys: vidix/dhahelperwin/temp.exp vidix/dhahelperwin/dhahelper.o vidix/dhahelperwin/dhahelper-rc.o $(CC) -Wl,--subsystem,native -Wl,--image-base,0x10000 \ -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 \ -Wl,--entry,_DriverEntry at 8 -Wl,$< -mdll -nostartfiles -nostdlib \ - -o $@ vidix/dhahelperwin/dhahelper.o \ - vidix/dhahelperwin/dhahelper-rc.o -lntoskrnl + -o $@ $(@:.sys=.o) $(@:.sys=-rc.o) -lntoskrnl strip $@ install-dhahelperwin: From subversion at mplayerhq.hu Thu Mar 5 21:36:35 2009 From: subversion at mplayerhq.hu (greg) Date: Thu, 5 Mar 2009 21:36:35 +0100 (CET) Subject: [MPlayer-cvslog] r28816 - trunk/libass/ass_bitmap.c Message-ID: <20090305203635.6D2DE3B61A@natsuki.mplayerhq.hu> Author: greg Date: Thu Mar 5 21:36:35 2009 New Revision: 28816 Log: Hack: half-merge glyph border with outline to avoid ugly anti-aliasing in certain situations. Modified: trunk/libass/ass_bitmap.c Modified: trunk/libass/ass_bitmap.c ============================================================================== --- trunk/libass/ass_bitmap.c Thu Mar 5 21:25:54 2009 (r28815) +++ trunk/libass/ass_bitmap.c Thu Mar 5 21:36:35 2009 (r28816) @@ -243,7 +243,7 @@ static bitmap_t* fix_outline_and_shadow( unsigned char c_g, c_o; c_g = g[x]; c_o = o[x]; - o[x] = (c_o > c_g) ? c_o : 0; + o[x] = (c_o > c_g) ? c_o - (c_g/2) : 0; s[x] = (c_o < 0xFF - c_g) ? c_o + c_g : 0xFF; } g += bm_g->w; From subversion at mplayerhq.hu Thu Mar 5 21:36:39 2009 From: subversion at mplayerhq.hu (greg) Date: Thu, 5 Mar 2009 21:36:39 +0100 (CET) Subject: [MPlayer-cvslog] r28817 - trunk/libass/ass_render.c Message-ID: <20090305203639.92EB33B620@natsuki.mplayerhq.hu> Author: greg Date: Thu Mar 5 21:36:39 2009 New Revision: 28817 Log: Support a vsfilter special case: If PlayResX or Y is 1280/1024 respectively and the other PlayRes attribute isn't provided, use 1280/1024 for it. Modified: trunk/libass/ass_render.c Modified: trunk/libass/ass_render.c ============================================================================== --- trunk/libass/ass_render.c Thu Mar 5 21:36:35 2009 (r28816) +++ trunk/libass/ass_render.c Thu Mar 5 21:36:39 2009 (r28817) @@ -224,9 +224,15 @@ static void ass_lazy_track_init(void) } else { double orig_aspect = (global_settings->aspect * frame_context.height * frame_context.orig_width) / frame_context.orig_height / frame_context.width; - if (!track->PlayResY) { + if (!track->PlayResY && track->PlayResX == 1280) { + track->PlayResY = 1024; + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_PlayResYUndefinedSettingY, track->PlayResY); + } else if (!track->PlayResY) { track->PlayResY = track->PlayResX / orig_aspect + .5; mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_PlayResYUndefinedSettingY, track->PlayResY); + } else if (!track->PlayResX && track->PlayResY == 1024) { + track->PlayResX = 1280; + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_PlayResXUndefinedSettingX, track->PlayResX); } else if (!track->PlayResX) { track->PlayResX = track->PlayResY * orig_aspect + .5; mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_PlayResXUndefinedSettingX, track->PlayResX); From subversion at mplayerhq.hu Thu Mar 5 21:36:42 2009 From: subversion at mplayerhq.hu (greg) Date: Thu, 5 Mar 2009 21:36:42 +0100 (CET) Subject: [MPlayer-cvslog] r28818 - trunk/libass/ass_render.c Message-ID: <20090305203642.63ACE3B629@natsuki.mplayerhq.hu> Author: greg Date: Thu Mar 5 21:36:41 2009 New Revision: 28818 Log: Round shadow displacement to nearest int. Use double for shadow displacement parameter. Modified: trunk/libass/ass_render.c Modified: trunk/libass/ass_render.c ============================================================================== --- trunk/libass/ass_render.c Thu Mar 5 21:36:39 2009 (r28817) +++ trunk/libass/ass_render.c Thu Mar 5 21:36:41 2009 (r28818) @@ -45,6 +45,7 @@ #define MAX_LINES 300 #define BE_RADIUS 1.5 #define BLUR_MAX_RADIUS 50.0 +#define ROUND(x) ((int) ((x) + .5)) static int last_render_id = 0; @@ -116,7 +117,7 @@ typedef struct glyph_info_s { // int height; int be; // blur edges double blur; // gaussian blur - int shadow; + double shadow; double frx, fry, frz; // rotation bitmap_hash_key_t hash_key; @@ -165,7 +166,7 @@ typedef struct render_context_s { uint32_t fade; // alpha from \fad char be; // blur edges double blur; // gaussian blur - int shadow; + double shadow; int drawing_mode; // not implemented; when != 0 text is discarded, except for style override tags effect_t effect_type; @@ -421,8 +422,8 @@ static ass_image_t* render_text(text_inf if ((info->symbol == 0) || (info->symbol == '\n') || !info->bm_s || (info->shadow == 0)) continue; - pen_x = dst_x + info->pos.x + info->shadow; - pen_y = dst_y + info->pos.y + info->shadow; + pen_x = dst_x + info->pos.x + ROUND(info->shadow); + pen_y = dst_y + info->pos.y + ROUND(info->shadow); bm = info->bm_s; tail = render_glyph(bm, pen_x, pen_y, info->c[3], 0, 1000000, tail); From subversion at mplayerhq.hu Thu Mar 5 21:36:45 2009 From: subversion at mplayerhq.hu (greg) Date: Thu, 5 Mar 2009 21:36:45 +0100 (CET) Subject: [MPlayer-cvslog] r28819 - trunk/libass/ass_render.c Message-ID: <20090305203645.3407B3B628@natsuki.mplayerhq.hu> Author: greg Date: Thu Mar 5 21:36:44 2009 New Revision: 28819 Log: Scale shadow displacement and blur size like border size. Modified: trunk/libass/ass_render.c Modified: trunk/libass/ass_render.c ============================================================================== --- trunk/libass/ass_render.c Thu Mar 5 21:36:41 2009 (r28818) +++ trunk/libass/ass_render.c Thu Mar 5 21:36:44 2009 (r28819) @@ -422,8 +422,8 @@ static ass_image_t* render_text(text_inf if ((info->symbol == 0) || (info->symbol == '\n') || !info->bm_s || (info->shadow == 0)) continue; - pen_x = dst_x + info->pos.x + ROUND(info->shadow); - pen_y = dst_y + info->pos.y + ROUND(info->shadow); + pen_x = dst_x + info->pos.x + ROUND(info->shadow * frame_context.border_scale); + pen_y = dst_y + info->pos.y + ROUND(info->shadow * frame_context.border_scale); bm = info->bm_s; tail = render_glyph(bm, pen_x, pen_y, info->c[3], 0, 1000000, tail); @@ -1397,7 +1397,7 @@ static void get_bitmap_glyph(glyph_info_ ass_renderer->synth_priv_blur, info->glyph, info->outline_glyph, &info->bm, &info->bm_o, - &info->bm_s, info->be, info->blur); + &info->bm_s, info->be, info->blur * frame_context.border_scale); if (error) info->symbol = 0; From subversion at mplayerhq.hu Thu Mar 5 21:36:48 2009 From: subversion at mplayerhq.hu (greg) Date: Thu, 5 Mar 2009 21:36:48 +0100 (CET) Subject: [MPlayer-cvslog] r28820 - in trunk/libass: ass.c ass_render.c ass_types.h ass_utils.c ass_utils.h Message-ID: <20090305203648.B4D6F4E032@natsuki.mplayerhq.hu> Author: greg Date: Thu Mar 5 21:36:48 2009 New Revision: 28820 Log: Support ScaledBorderAndShadow property. Modified: trunk/libass/ass.c trunk/libass/ass_render.c trunk/libass/ass_types.h trunk/libass/ass_utils.c trunk/libass/ass_utils.h Modified: trunk/libass/ass.c ============================================================================== --- trunk/libass/ass.c Thu Mar 5 21:36:44 2009 (r28819) +++ trunk/libass/ass.c Thu Mar 5 21:36:48 2009 (r28820) @@ -520,6 +520,8 @@ static int process_info_line(ass_track_t track->Timer = atof(str + 6); } else if (!strncmp(str,"WrapStyle:", 10)) { track->WrapStyle = atoi(str + 10); + } else if (!strncmp(str, "ScaledBorderAndShadow:", 22)) { + track->ScaledBorderAndShadow = parse_bool(str + 22); } return 0; } Modified: trunk/libass/ass_render.c ============================================================================== --- trunk/libass/ass_render.c Thu Mar 5 21:36:44 2009 (r28819) +++ trunk/libass/ass_render.c Thu Mar 5 21:36:48 2009 (r28820) @@ -2233,7 +2233,10 @@ static int ass_start_frame(ass_renderer_ frame_context.font_scale = global_settings->font_size_coeff * frame_context.orig_height / frame_context.track->PlayResY; - frame_context.border_scale = ((double)frame_context.orig_height) / frame_context.track->PlayResY; + if (frame_context.track->ScaledBorderAndShadow) + frame_context.border_scale = ((double)frame_context.orig_height) / frame_context.track->PlayResY; + else + frame_context.border_scale = 1.; frame_context.font_scale_x = 1.; Modified: trunk/libass/ass_types.h ============================================================================== --- trunk/libass/ass_types.h Thu Mar 5 21:36:44 2009 (r28819) +++ trunk/libass/ass_types.h Thu Mar 5 21:36:48 2009 (r28820) @@ -105,6 +105,7 @@ typedef struct ass_track_s { int PlayResY; double Timer; int WrapStyle; + char ScaledBorderAndShadow; int default_style; // index of default style Modified: trunk/libass/ass_utils.c ============================================================================== --- trunk/libass/ass_utils.c Thu Mar 5 21:36:44 2009 (r28819) +++ trunk/libass/ass_utils.c Thu Mar 5 21:36:48 2009 (r28820) @@ -96,6 +96,17 @@ int strtocolor(char** q, uint32_t* res) return result; } +// Return a boolean value for a string +char parse_bool(char* str) { + while (*str == ' ' || *str == '\t') + str++; + if (!strncasecmp(str, "yes", 3)) + return 1; + else if (strtol(str, NULL, 10) > 0) + return 1; + return 0; +} + #if 0 static void sprint_tag(uint32_t tag, char* dst) { Modified: trunk/libass/ass_utils.h ============================================================================== --- trunk/libass/ass_utils.h Thu Mar 5 21:36:44 2009 (r28819) +++ trunk/libass/ass_utils.h Thu Mar 5 21:36:48 2009 (r28820) @@ -30,6 +30,7 @@ int mystrtoll(char** p, long long* res); int mystrtou32(char** p, int base, uint32_t* res); int mystrtod(char** p, double* res); int strtocolor(char** q, uint32_t* res); +char parse_bool(char* str); static inline int d6_to_int(int x) { return (x + 32) >> 6; From subversion at mplayerhq.hu Thu Mar 5 21:36:52 2009 From: subversion at mplayerhq.hu (greg) Date: Thu, 5 Mar 2009 21:36:52 +0100 (CET) Subject: [MPlayer-cvslog] r28821 - trunk/libass/ass.c Message-ID: <20090305203653.0E3A13B64C@natsuki.mplayerhq.hu> Author: greg Date: Thu Mar 5 21:36:52 2009 New Revision: 28821 Log: Style override for ScaledBorderAndShadow. Modified: trunk/libass/ass.c Modified: trunk/libass/ass.c ============================================================================== --- trunk/libass/ass.c Thu Mar 5 21:36:48 2009 (r28820) +++ trunk/libass/ass.c Thu Mar 5 21:36:52 2009 (r28821) @@ -347,6 +347,8 @@ void process_force_style(ass_track_t* tr track->Timer = atof(token); else if(!strcasecmp(*fs, "WrapStyle")) track->WrapStyle = atoi(token); + else if(!strcasecmp(*fs, "ScaledBorderAndShadow")) + track->ScaledBorderAndShadow = parse_bool(token); dt = strrchr(*fs, '.'); if (dt) { From subversion at mplayerhq.hu Thu Mar 5 21:36:56 2009 From: subversion at mplayerhq.hu (greg) Date: Thu, 5 Mar 2009 21:36:56 +0100 (CET) Subject: [MPlayer-cvslog] r28822 - trunk/libass/ass_render.c Message-ID: <20090305203656.B449C3B64F@natsuki.mplayerhq.hu> Author: greg Date: Thu Mar 5 21:36:56 2009 New Revision: 28822 Log: Support for subpixel accuracy of 3 bits for \pos and \move. Also, restrict advance subpixel accuracy to 3 bits to reduce cache bloat. Modified: trunk/libass/ass_render.c Modified: trunk/libass/ass_render.c ============================================================================== --- trunk/libass/ass_render.c Thu Mar 5 21:36:52 2009 (r28821) +++ trunk/libass/ass_render.c Thu Mar 5 21:36:56 2009 (r28822) @@ -474,14 +474,14 @@ static int x2scr(double x) { return x*frame_context.orig_width_nocrop / frame_context.track->PlayResX + FFMAX(global_settings->left_margin, 0); } -static int x2scr_pos(double x) { +static double x2scr_pos(double x) { return x*frame_context.orig_width / frame_context.track->PlayResX + global_settings->left_margin; } /** * \brief Mapping between script and screen coordinates */ -static int y2scr(double y) { +static double y2scr(double y) { return y * frame_context.orig_height_nocrop / frame_context.track->PlayResY + FFMAX(global_settings->top_margin, 0); } @@ -787,29 +787,29 @@ static char* parse_tag(char* p, double p val = -1.; // reset to default change_border(val); } else if (mystrcmp(&p, "move")) { - int x1, x2, y1, y2; + double x1, x2, y1, y2; long long t1, t2, delta_t, t; double x, y; double k; skip('('); - mystrtoi(&p, &x1); + mystrtod(&p, &x1); skip(','); - mystrtoi(&p, &y1); + mystrtod(&p, &y1); skip(','); - mystrtoi(&p, &x2); + mystrtod(&p, &x2); skip(','); - mystrtoi(&p, &y2); + mystrtod(&p, &y2); if (*p == ',') { skip(','); mystrtoll(&p, &t1); skip(','); mystrtoll(&p, &t2); - mp_msg(MSGT_ASS, MSGL_DBG2, "movement6: (%d, %d) -> (%d, %d), (%" PRId64 " .. %" PRId64 ")\n", + mp_msg(MSGT_ASS, MSGL_DBG2, "movement6: (%f, %f) -> (%f, %f), (%" PRId64 " .. %" PRId64 ")\n", x1, y1, x2, y2, (int64_t)t1, (int64_t)t2); } else { t1 = 0; t2 = render_context.event->Duration; - mp_msg(MSGT_ASS, MSGL_DBG2, "movement: (%d, %d) -> (%d, %d)\n", x1, y1, x2, y2); + mp_msg(MSGT_ASS, MSGL_DBG2, "movement: (%f, %f) -> (%f, %f)\n", x1, y1, x2, y2); } skip(')'); delta_t = t2 - t1; @@ -895,13 +895,13 @@ static char* parse_tag(char* p, double p else render_context.alignment = render_context.style->Alignment; } else if (mystrcmp(&p, "pos")) { - int v1, v2; + double v1, v2; skip('('); - mystrtoi(&p, &v1); + mystrtod(&p, &v1); skip(','); - mystrtoi(&p, &v2); + mystrtod(&p, &v2); skip(')'); - mp_msg(MSGT_ASS, MSGL_DBG2, "pos(%d, %d)\n", v1, v2); + mp_msg(MSGT_ASS, MSGL_DBG2, "pos(%f, %f)\n", v1, v2); if (render_context.evt_type != EVENT_POSITIONED) { render_context.evt_type = EVENT_POSITIONED; render_context.detect_collisions = 0; @@ -1859,8 +1859,13 @@ static int ass_render_event(ass_event_t* pen.y += delta.y * render_context.scale_y; } - shift.x = pen.x & 63; - shift.y = pen.y & 63; + shift.x = pen.x & 56; + shift.y = pen.y & 56; + + if (render_context.evt_type == EVENT_POSITIONED) { + shift.x += double_to_d6(x2scr_pos(render_context.pos_x)) & 56; + shift.y -= double_to_d6(y2scr(render_context.pos_y)) & 56; + } ass_font_set_transform(render_context.font, render_context.scale_x * frame_context.font_scale_x, From subversion at mplayerhq.hu Thu Mar 5 21:36:59 2009 From: subversion at mplayerhq.hu (greg) Date: Thu, 5 Mar 2009 21:36:59 +0100 (CET) Subject: [MPlayer-cvslog] r28823 - trunk/libass/ass_render.c Message-ID: <20090305203659.88F823B631@natsuki.mplayerhq.hu> Author: greg Date: Thu Mar 5 21:36:59 2009 New Revision: 28823 Log: Fix positioned events' y-position when pan-and-scan is used. Modified: trunk/libass/ass_render.c Modified: trunk/libass/ass_render.c ============================================================================== --- trunk/libass/ass_render.c Thu Mar 5 21:36:56 2009 (r28822) +++ trunk/libass/ass_render.c Thu Mar 5 21:36:59 2009 (r28823) @@ -485,6 +485,11 @@ static double y2scr(double y) { return y * frame_context.orig_height_nocrop / frame_context.track->PlayResY + FFMAX(global_settings->top_margin, 0); } +static double y2scr_pos(double y) { + return y * frame_context.orig_height / frame_context.track->PlayResY + + global_settings->top_margin; +} + // the same for toptitles static int y2scr_top(double y) { if (global_settings->use_margins) @@ -1864,7 +1869,7 @@ static int ass_render_event(ass_event_t* if (render_context.evt_type == EVENT_POSITIONED) { shift.x += double_to_d6(x2scr_pos(render_context.pos_x)) & 56; - shift.y -= double_to_d6(y2scr(render_context.pos_y)) & 56; + shift.y -= double_to_d6(y2scr_pos(render_context.pos_y)) & 56; } ass_font_set_transform(render_context.font, @@ -2031,7 +2036,7 @@ static int ass_render_event(ass_event_t* mp_msg(MSGT_ASS, MSGL_DBG2, "positioned event at %f, %f\n", render_context.pos_x, render_context.pos_y); get_base_point(bbox, alignment, &base_x, &base_y); device_x = x2scr_pos(render_context.pos_x) - base_x; - device_y = y2scr(render_context.pos_y) - base_y; + device_y = y2scr_pos(render_context.pos_y) - base_y; } // fix clip coordinates (they depend on alignment) From subversion at mplayerhq.hu Thu Mar 5 21:47:34 2009 From: subversion at mplayerhq.hu (greg) Date: Thu, 5 Mar 2009 21:47:34 +0100 (CET) Subject: [MPlayer-cvslog] r28824 - in trunk/libass: ass_cache.c ass_cache.h ass_render.c Message-ID: <20090305204735.245534E032@natsuki.mplayerhq.hu> Author: greg Date: Thu Mar 5 21:47:33 2009 New Revision: 28824 Log: Combine adjacent overlapping, translucent glyph borders and shadows to avoid luminance build-up, which looks ugly. The resulting, modified bitmaps are stored in separate bitmap cache. Modified: trunk/libass/ass_cache.c trunk/libass/ass_cache.h trunk/libass/ass_render.c Modified: trunk/libass/ass_cache.c ============================================================================== --- trunk/libass/ass_cache.c Thu Mar 5 21:36:59 2009 (r28823) +++ trunk/libass/ass_cache.c Thu Mar 5 21:47:33 2009 (r28824) @@ -324,3 +324,53 @@ void ass_glyph_cache_reset(void) ass_glyph_cache_done(); ass_glyph_cache_init(); } + + +//--------------------------------- +// composite cache + +hashmap_t* composite_cache; + +static void composite_hash_dtor(void* key, size_t key_size, void* value, size_t value_size) +{ + composite_hash_val_t* v = value; + free(v->a); + free(v->b); + free(key); + free(value); +} + +void* cache_add_composite(composite_hash_key_t* key, composite_hash_val_t* val) +{ + return hashmap_insert(composite_cache, key, val); +} + +/** + * \brief Get a composite bitmap from composite cache. + * \param key hash key + * \return requested hash val or 0 if not found +*/ +composite_hash_val_t* cache_find_composite(composite_hash_key_t* key) +{ + return hashmap_find(composite_cache, key); +} + +void ass_composite_cache_init(void) +{ + composite_cache = hashmap_init(sizeof(composite_hash_key_t), + sizeof(composite_hash_val_t), + 0xFFFF + 13, + composite_hash_dtor, NULL, NULL); +} + +void ass_composite_cache_done(void) +{ + hashmap_done(composite_cache); +} + +void ass_composite_cache_reset(void) +{ + ass_composite_cache_done(); + ass_composite_cache_init(); +} + Modified: trunk/libass/ass_cache.h ============================================================================== --- trunk/libass/ass_cache.h Thu Mar 5 21:36:59 2009 (r28823) +++ trunk/libass/ass_cache.h Thu Mar 5 21:47:33 2009 (r28824) @@ -65,6 +65,27 @@ bitmap_hash_val_t* cache_find_bitmap(bit void ass_bitmap_cache_reset(void); void ass_bitmap_cache_done(void); + +// Cache for composited bitmaps +typedef struct composite_hash_key_s { + int aw, ah, bw, bh; + int ax, ay, bx, by; + bitmap_hash_key_t a; + bitmap_hash_key_t b; +} composite_hash_key_t; + +typedef struct composite_hash_val_s { + unsigned char* a; + unsigned char* b; +} composite_hash_val_t; + +void ass_composite_cache_init(void); +void* cache_add_composite(composite_hash_key_t* key, composite_hash_val_t* val); +composite_hash_val_t* cache_find_composite(composite_hash_key_t* key); +void ass_composite_cache_reset(void); +void ass_composite_cache_done(void); + + // describes an outline glyph typedef struct glyph_hash_key_s { ass_font_t* font; Modified: trunk/libass/ass_render.c ============================================================================== --- trunk/libass/ass_render.c Thu Mar 5 21:36:59 2009 (r28823) +++ trunk/libass/ass_render.c Thu Mar 5 21:47:33 2009 (r28824) @@ -279,6 +279,7 @@ ass_renderer_t* ass_renderer_init(ass_li ass_font_cache_init(); ass_bitmap_cache_init(); + ass_composite_cache_init(); ass_glyph_cache_init(); text_info.glyphs = calloc(MAX_GLYPHS, sizeof(glyph_info_t)); @@ -294,6 +295,7 @@ void ass_renderer_done(ass_renderer_t* p { ass_font_cache_done(); ass_bitmap_cache_done(); + ass_composite_cache_done(); ass_glyph_cache_done(); if (render_context.stroker) { FT_Stroker_Done(render_context.stroker); @@ -406,6 +408,93 @@ static ass_image_t** render_glyph(bitmap } /** + * \brief Calculate overlapping area of two consecutive bitmaps and in case they + * overlap, composite them together + * Mainly useful for translucent glyphs and especially borders, to avoid the + * luminance adding up where they overlap (which looks ugly) + */ +static void render_overlap(ass_image_t** last_tail, ass_image_t** tail, bitmap_hash_key_t *last_hash, bitmap_hash_key_t* hash) { + int left, top, bottom, right; + int old_left, old_top, w, h, cur_left, cur_top; + int x, y, opos, cpos; + char m; + composite_hash_key_t hk; + composite_hash_val_t *hv; + composite_hash_key_t *nhk; + int ax = (*last_tail)->dst_x; + int ay = (*last_tail)->dst_y; + int aw = (*last_tail)->w; + int ah = (*last_tail)->h; + int bx = (*tail)->dst_x; + int by = (*tail)->dst_y; + int bw = (*tail)->w; + int bh = (*tail)->h; + unsigned char* a; + unsigned char* b; + + if ((*last_tail)->bitmap == (*tail)->bitmap) + return; + + // Calculate overlap coordinates + left = (ax > bx) ? ax : bx; + top = (ay > by) ? ay : by; + right = ((ax+aw) < (bx+bw)) ? (ax+aw) : (bx+bw); + bottom = ((ay+ah) < (by+bh)) ? (ay+ah) : (by+bh); + if ((right <= left) || (bottom <= top)) + return; + old_left = left-(ax); + old_top = top-(ay); + w = right-left; + h = bottom-top; + cur_left = left-(bx); + cur_top = top-(by); + + // Query cache + memcpy(&hk.a, last_hash, sizeof(*last_hash)); + memcpy(&hk.b, hash, sizeof(*hash)); + hk.aw = aw; + hk.ah = ah; + hk.bw = bw; + hk.bh = bh; + hk.ax = ax; + hk.ay = ay; + hk.bx = bx; + hk.by = by; + hv = cache_find_composite(&hk); + if (hv) { + (*last_tail)->bitmap = hv->a; + (*tail)->bitmap = hv->b; + return; + } + + // Allocate new bitmaps and copy over data + a = (*last_tail)->bitmap; + b = (*tail)->bitmap; + (*last_tail)->bitmap = malloc(aw*ah); + (*tail)->bitmap = malloc(bw*bh); + memcpy((*last_tail)->bitmap, a, aw*ah); + memcpy((*tail)->bitmap, b, bw*bh); + + // Composite overlapping area + for (y=0; y b[cpos]) ? a[opos] : b[cpos]; + (*last_tail)->bitmap[opos] = 0; + (*tail)->bitmap[cpos] = m; + } + + // Insert bitmaps into the cache + nhk = calloc(1, sizeof(*nhk)); + memcpy(nhk, &hk, sizeof(*nhk)); + hv = calloc(1, sizeof(*hv)); + hv->a = (*last_tail)->bitmap; + hv->b = (*tail)->bitmap; + cache_add_composite(nhk, hv); +} + +/** * \brief Convert text_info_t struct to ass_image_t list * Splits glyphs in halves when needed (for \kf karaoke). */ @@ -416,6 +505,9 @@ static ass_image_t* render_text(text_inf bitmap_t* bm; ass_image_t* head; ass_image_t** tail = &head; + ass_image_t** last_tail = 0; + ass_image_t** here_tail = 0; + bitmap_hash_key_t* last_hash = 0; for (i = 0; i < text_info->length; ++i) { glyph_info_t* info = text_info->glyphs + i; @@ -426,9 +518,15 @@ static ass_image_t* render_text(text_inf pen_y = dst_y + info->pos.y + ROUND(info->shadow * frame_context.border_scale); bm = info->bm_s; + here_tail = tail; tail = render_glyph(bm, pen_x, pen_y, info->c[3], 0, 1000000, tail); + if (last_tail && tail != here_tail && ((info->c[3] & 0xff) > 0)) + render_overlap(last_tail, here_tail, last_hash, &info->hash_key); + last_tail = here_tail; + last_hash = &info->hash_key; } + last_tail = 0; for (i = 0; i < text_info->length; ++i) { glyph_info_t* info = text_info->glyphs + i; if ((info->symbol == 0) || (info->symbol == '\n') || !info->bm_o) @@ -440,8 +538,14 @@ static ass_image_t* render_text(text_inf if ((info->effect_type == EF_KARAOKE_KO) && (info->effect_timing <= info->bbox.xMax)) { // do nothing - } else + } else { + here_tail = tail; tail = render_glyph(bm, pen_x, pen_y, info->c[2], 0, 1000000, tail); + if (last_tail && tail != here_tail && ((info->c[2] & 0xff) > 0)) + render_overlap(last_tail, here_tail, last_hash, &info->hash_key); + last_tail = here_tail; + last_hash = &info->hash_key; + } } for (i = 0; i < text_info->length; ++i) { glyph_info_t* info = text_info->glyphs + i; @@ -2121,6 +2225,7 @@ static void ass_reconfigure(ass_renderer priv->render_id = ++last_render_id; ass_glyph_cache_reset(); ass_bitmap_cache_reset(); + ass_composite_cache_reset(); ass_free_images(priv->prev_images_root); priv->prev_images_root = 0; } From Reimar.Doeffinger at stud.uni-karlsruhe.de Thu Mar 5 22:11:01 2009 From: Reimar.Doeffinger at stud.uni-karlsruhe.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Thu, 5 Mar 2009 22:11:01 +0100 Subject: [MPlayer-cvslog] r28816 - trunk/libass/ass_bitmap.c In-Reply-To: <20090305203635.6D2DE3B61A@natsuki.mplayerhq.hu> References: <20090305203635.6D2DE3B61A@natsuki.mplayerhq.hu> Message-ID: <20090305211101.GA9548@1und1.de> On Thu, Mar 05, 2009 at 09:36:35PM +0100, greg wrote: > Author: greg > Date: Thu Mar 5 21:36:35 2009 > New Revision: 28816 > > Log: > Hack: half-merge glyph border with outline to avoid ugly anti-aliasing > in certain situations. > > Modified: > trunk/libass/ass_bitmap.c > > Modified: trunk/libass/ass_bitmap.c > ============================================================================== > --- trunk/libass/ass_bitmap.c Thu Mar 5 21:25:54 2009 (r28815) > +++ trunk/libass/ass_bitmap.c Thu Mar 5 21:36:35 2009 (r28816) > @@ -243,7 +243,7 @@ static bitmap_t* fix_outline_and_shadow( > unsigned char c_g, c_o; > c_g = g[x]; > c_o = o[x]; > - o[x] = (c_o > c_g) ? c_o : 0; > + o[x] = (c_o > c_g) ? c_o - (c_g/2) : 0; IMO please document such hacks also directly in the code where they are, maybe including a hint what a proper fix would be. From subversion at mplayerhq.hu Thu Mar 5 22:16:22 2009 From: subversion at mplayerhq.hu (greg) Date: Thu, 5 Mar 2009 22:16:22 +0100 (CET) Subject: [MPlayer-cvslog] r28826 - trunk/Changelog Message-ID: <20090305211622.547A23B71C@natsuki.mplayerhq.hu> Author: greg Date: Thu Mar 5 22:16:21 2009 New Revision: 28826 Log: Update libass changelog. Modified: trunk/Changelog Modified: trunk/Changelog ============================================================================== --- trunk/Changelog Thu Mar 5 22:02:33 2009 (r28825) +++ trunk/Changelog Thu Mar 5 22:16:21 2009 (r28826) @@ -163,11 +163,16 @@ 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) - * libass fixes and updates to match VSFilter renderer * libdvdcss updated to 1.2.10, now same as upstream version * fix -endchapter support again for -dump* options * add startup volume option + libass: + * various fixes and updates to match VSFilter renderer + * support \blur tag and ScaledBordersAndShadow property + * fractional arguments and subpixel accuracy + * keep positions when pan-and-scan is used + Ports: * small crash with vo_macosx fixed * AC3/DTS passthrough for ao_macosx From subversion at mplayerhq.hu Thu Mar 5 22:27:05 2009 From: subversion at mplayerhq.hu (diego) Date: Thu, 5 Mar 2009 22:27:05 +0100 (CET) Subject: [MPlayer-cvslog] r28827 - trunk/Makefile Message-ID: <20090305212705.E9F663B754@natsuki.mplayerhq.hu> Author: diego Date: Thu Mar 5 22:27:05 2009 New Revision: 28827 Log: Simplify CFLAGS generation for individual targets. Modified: trunk/Makefile Modified: trunk/Makefile ============================================================================== --- trunk/Makefile Thu Mar 5 22:16:21 2009 (r28826) +++ trunk/Makefile Thu Mar 5 22:27:05 2009 (r28827) @@ -855,18 +855,18 @@ version.h: version.sh # Make sure all generated header files are created. $(DEPS) $(MENCODER_DEPS) $(MPLAYER_DEPS): codecs.conf.h help_mp.h version.h -libdvdcss/%.o libdvdcss/%.d: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DVERSION=\"1.2.10\" $(CFLAGS_LIBDVDCSS) -libdvdnav/%.o libdvdnav/%.d: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DHAVE_CONFIG_H -DVERSION=\"MPlayer-custom\" -libdvdread4/%.o libdvdread4/%.d: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DHAVE_CONFIG_H $(CFLAGS_LIBDVDCSS_DVDREAD) -libfaad2/%.o libfaad2/%.d: CFLAGS += -Ilibfaad2 -D_GNU_SOURCE -DHAVE_CONFIG_H $(CFLAGS_FAAD_FIXED) +libdvdcss/%: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DVERSION=\"1.2.10\" $(CFLAGS_LIBDVDCSS) +libdvdnav/%: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DHAVE_CONFIG_H -DVERSION=\"MPlayer-custom\" +libdvdread4/%: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DHAVE_CONFIG_H $(CFLAGS_LIBDVDCSS_DVDREAD) +libfaad2/%: CFLAGS += -Ilibfaad2 -D_GNU_SOURCE -DHAVE_CONFIG_H $(CFLAGS_FAAD_FIXED) -loader/% loader/%: CFLAGS += -Iloader -fno-omit-frame-pointer $(CFLAGS_NO_OMIT_LEAF_FRAME_POINTER) -#loader/%.o loader/%.d: CFLAGS += -Ddbg_printf=__vprintf -DTRACE=__vprintf -DDETAILED_OUT -loader/win32.o loader/win32.d: CFLAGS += $(CFLAGS_STACKREALIGN) +loader/%: CFLAGS += -Iloader -fno-omit-frame-pointer $(CFLAGS_NO_OMIT_LEAF_FRAME_POINTER) +#loader/%: CFLAGS += -Ddbg_printf=__vprintf -DTRACE=__vprintf -DDETAILED_OUT +loader/win32%: CFLAGS += $(CFLAGS_STACKREALIGN) -mp3lib/decode_i586.o: CFLAGS += -fomit-frame-pointer +mp3lib/decode_i586%: CFLAGS += -fomit-frame-pointer -tremor/%.o tremor/%.d: CFLAGS += $(CFLAGS_TREMOR_LOW) +tremor/%: CFLAGS += $(CFLAGS_TREMOR_LOW) vidix/%: CFLAGS += $(CFLAGS_DHAHELPER) $(CFLAGS_SVGALIB_HELPER) From subversion at mplayerhq.hu Thu Mar 5 23:07:06 2009 From: subversion at mplayerhq.hu (reimar) Date: Thu, 5 Mar 2009 23:07:06 +0100 (CET) Subject: [MPlayer-cvslog] r28828 - trunk/libao2/ao_win32.c Message-ID: <20090305220706.8A03150058@natsuki.mplayerhq.hu> Author: reimar Date: Thu Mar 5 23:07:06 2009 New Revision: 28828 Log: Sleep based on get_delay in ao_win32 uninit instead of a loop. The loop for an unknown reason could rarely cause an endless loop. Modified: trunk/libao2/ao_win32.c Modified: trunk/libao2/ao_win32.c ============================================================================== --- trunk/libao2/ao_win32.c Thu Mar 5 22:27:05 2009 (r28827) +++ trunk/libao2/ao_win32.c Thu Mar 5 23:07:06 2009 (r28828) @@ -251,7 +251,8 @@ static int init(int rate,int channels,in // close audio device static void uninit(int immed) { - if(!immed)while(buffered_bytes > 0)usec_sleep(50000); + if(!immed) + usec_sleep(get_delay() * 1000 * 1000); else buffered_bytes=0; waveOutReset(hWaveOut); waveOutClose(hWaveOut); From subversion at mplayerhq.hu Thu Mar 5 23:19:48 2009 From: subversion at mplayerhq.hu (diego) Date: Thu, 5 Mar 2009 23:19:48 +0100 (CET) Subject: [MPlayer-cvslog] r28829 - in trunk: Makefile configure Message-ID: <20090305221948.3C4AA3B171@natsuki.mplayerhq.hu> Author: diego Date: Thu Mar 5 23:19:47 2009 New Revision: 28829 Log: Only add -Ilibdvdnav to the CFLAGS of the files that require it. Modified: trunk/Makefile trunk/configure Modified: trunk/Makefile ============================================================================== --- trunk/Makefile Thu Mar 5 23:07:06 2009 (r28828) +++ trunk/Makefile Thu Mar 5 23:19:47 2009 (r28829) @@ -857,6 +857,7 @@ $(DEPS) $(MENCODER_DEPS) $(MPLAYER_DEPS) libdvdcss/%: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DVERSION=\"1.2.10\" $(CFLAGS_LIBDVDCSS) libdvdnav/%: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DHAVE_CONFIG_H -DVERSION=\"MPlayer-custom\" +libdvdnav/% stream/stream_dvdnav%: CFLAGS += $(CFLAGS_LIBDVDNAV) libdvdread4/%: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DHAVE_CONFIG_H $(CFLAGS_LIBDVDCSS_DVDREAD) libfaad2/%: CFLAGS += -Ilibfaad2 -D_GNU_SOURCE -DHAVE_CONFIG_H $(CFLAGS_FAAD_FIXED) Modified: trunk/configure ============================================================================== --- trunk/configure Thu Mar 5 23:07:06 2009 (r28828) +++ trunk/configure Thu Mar 5 23:19:47 2009 (r28829) @@ -7996,7 +7996,7 @@ if test "$_dvdnav" = yes ; then _largefiles=yes def_dvdnav='#define CONFIG_DVDNAV 1' if test "$dvdnav_internal" = yes ; then - _inc_extra="$_inc_extra -Ilibdvdnav" + cflags_libdvdnav="-Ilibdvdnav" _inputmodules="dvdnav(internal) $_inputmodules" else _inc_extra="$_inc_extra `$_dvdnavconfig --cflags`" @@ -8054,6 +8054,7 @@ CFLAGS_DHAHELPER = $cflags_dhahelper CFLAGS_FAAD_FIXED = $cflags_faad_fixed CFLAGS_LIBDVDCSS = $cflags_libdvdcss CFLAGS_LIBDVDCSS_DVDREAD = $cflags_libdvdcss_dvdread +CFLAGS_LIBDVDNAV = $cflags_libdvdnav CFLAGS_NO_OMIT_LEAF_FRAME_POINTER = $cflags_no_omit_leaf_frame_pointer CFLAGS_STACKREALIGN = $cflags_stackrealign CFLAGS_SVGALIB_HELPER = $cflags_svgalib_helper From subversion at mplayerhq.hu Fri Mar 6 00:36:29 2009 From: subversion at mplayerhq.hu (diego) Date: Fri, 6 Mar 2009 00:36:29 +0100 (CET) Subject: [MPlayer-cvslog] r28830 - trunk/version.sh Message-ID: <20090305233629.0CD033B53B@natsuki.mplayerhq.hu> Author: diego Date: Fri Mar 6 00:36:28 2009 New Revision: 28830 Log: Add support for extracting the release version number from a VERSION file. Modified: trunk/version.sh Modified: trunk/version.sh ============================================================================== --- trunk/version.sh Thu Mar 5 23:19:47 2009 (r28829) +++ trunk/version.sh Fri Mar 6 00:36:28 2009 (r28830) @@ -8,9 +8,14 @@ svn_revision=$(cat snapshot_version 2> / test $svn_revision || svn_revision=$(LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2) test $svn_revision || svn_revision=$(grep revision .svn/entries 2>/dev/null | cut -d '"' -f2) test $svn_revision || svn_revision=$(sed -n -e '/^dir$/{n;p;q;}' .svn/entries 2>/dev/null) +test $svn_revision && svn_revision=SVN-r$svn_revision test $svn_revision || svn_revision=UNKNOWN -NEW_REVISION="#define VERSION \"SVN-r${svn_revision}${extra}\"" +# releases extract the version number from the VERSION file +version=$(cat VERSION 2> /dev/null) +test $version || version=$svn_revision + +NEW_REVISION="#define VERSION \"${version}${extra}\"" OLD_REVISION=$(cat version.h 2> /dev/null) TITLE='#define MP_TITLE "%s "VERSION" (C) 2000-2009 MPlayer Team\n"' From subversion at mplayerhq.hu Fri Mar 6 01:10:17 2009 From: subversion at mplayerhq.hu (diego) Date: Fri, 6 Mar 2009 01:10:17 +0100 (CET) Subject: [MPlayer-cvslog] r28831 - trunk/libmpeg2/libmpeg2_changes.diff Message-ID: <20090306001017.CA4133B6D6@natsuki.mplayerhq.hu> Author: diego Date: Fri Mar 6 01:10:17 2009 New Revision: 28831 Log: Sync local changes file with #ifdef --> #if conversion. Modified: trunk/libmpeg2/libmpeg2_changes.diff Modified: trunk/libmpeg2/libmpeg2_changes.diff ============================================================================== --- trunk/libmpeg2/libmpeg2_changes.diff Fri Mar 6 00:36:28 2009 (r28830) +++ trunk/libmpeg2/libmpeg2_changes.diff Fri Mar 6 01:10:17 2009 (r28831) @@ -6,7 +6,8 @@ +#include "cpudetect.h" + - #if defined(ARCH_X86) || defined(ARCH_X86_64) +-#if defined(ARCH_X86) || defined(ARCH_X86_64) ++#if ARCH_X86 || ARCH_X86_64 static inline uint32_t arch_accel (uint32_t accel) { +/* Use MPlayer CPU detection instead of libmpeg2 variant. */ @@ -36,6 +37,95 @@ } #endif /* ARCH_X86 || ARCH_X86_64 */ +@@ -127,7 +150,7 @@ + } + #endif /* ARCH_X86 || ARCH_X86_64 */ + +-#if defined(ACCEL_DETECT) && (defined(ARCH_PPC) || defined(ARCH_SPARC)) ++#if defined(ACCEL_DETECT) && (ARCH_PPC || ARCH_SPARC) + #include + #include + +@@ -146,7 +169,7 @@ + } + #endif /* ACCEL_DETECT && (ARCH_PPC || ARCH_SPARC) */ + +-#ifdef ARCH_PPC ++#if ARCH_PPC + static uint32_t arch_accel (uint32_t accel) + { + #ifdef ACCEL_DETECT +@@ -183,7 +206,7 @@ + } + #endif /* ARCH_PPC */ + +-#ifdef ARCH_SPARC ++#if ARCH_SPARC + static uint32_t arch_accel (uint32_t accel) + { + if (accel & MPEG2_ACCEL_SPARC_VIS2) +@@ -229,7 +252,7 @@ + } + #endif /* ARCH_SPARC */ + +-#ifdef ARCH_ALPHA ++#if ARCH_ALPHA + static inline uint32_t arch_accel (uint32_t accel) + { + if (accel & MPEG2_ACCEL_ALPHA_MVI) +@@ -253,7 +276,7 @@ + + uint32_t mpeg2_detect_accel (uint32_t accel) + { +-#if defined (ARCH_X86) || defined (ARCH_X86_64) || defined (ARCH_PPC) || defined (ARCH_ALPHA) || defined (ARCH_SPARC) ++#if ARCH_X86 || ARCH_X86_64 || ARCH_PPC || ARCH_ALPHA || ARCH_SPARC + accel = arch_accel (accel); + #endif + return accel; +Index: libmpeg2/cpu_state.c +=================================================================== +--- libmpeg2/cpu_state.c (revision 28324) ++++ libmpeg2/cpu_state.c (revision 28325) +@@ -29,21 +29,21 @@ + #include "mpeg2.h" + #include "attributes.h" + #include "mpeg2_internal.h" +-#if defined(ARCH_X86) || defined(ARCH_X86_64) ++#if ARCH_X86 || ARCH_X86_64 + #include "mmx.h" + #endif + + void (* mpeg2_cpu_state_save) (cpu_state_t * state) = NULL; + void (* mpeg2_cpu_state_restore) (cpu_state_t * state) = NULL; + +-#if defined(ARCH_X86) || defined(ARCH_X86_64) ++#if ARCH_X86 || ARCH_X86_64 + static void state_restore_mmx (cpu_state_t * state) + { + emms (); + } + #endif + +-#ifdef ARCH_PPC ++#if ARCH_PPC + #if defined(__APPLE_CC__) /* apple */ + #define LI(a,b) "li r" #a "," #b "\n\t" + #define STVX0(a,b,c) "stvx v" #a ",0,r" #c "\n\t" +@@ -115,12 +115,12 @@ + + void mpeg2_cpu_state_init (uint32_t accel) + { +-#if defined(ARCH_X86) || defined(ARCH_X86_64) ++#if ARCH_X86 || ARCH_X86_64 + if (accel & MPEG2_ACCEL_X86_MMX) { + mpeg2_cpu_state_restore = state_restore_mmx; + } + #endif +-#ifdef ARCH_PPC ++#if ARCH_PPC + if (accel & MPEG2_ACCEL_PPC_ALTIVEC) { + mpeg2_cpu_state_save = state_save_altivec; + mpeg2_cpu_state_restore = state_restore_altivec; --- libmpeg2/decode.c 2006-06-16 20:12:26.000000000 +0200 +++ libmpeg2/decode.c 2006-06-16 20:12:50.000000000 +0200 @@ -345,6 +349,15 @@ @@ -81,7 +171,7 @@ void mpeg2_idct_init (uint32_t accel) { -#ifdef ARCH_X86 -+#ifdef HAVE_SSE2 ++#if HAVE_SSE2 if (accel & MPEG2_ACCEL_X86_SSE2) { mpeg2_idct_copy = mpeg2_idct_copy_sse2; mpeg2_idct_add = mpeg2_idct_add_sse2; @@ -103,7 +193,7 @@ } else #endif -#ifdef ARCH_PPC -+#ifdef HAVE_ALTIVEC ++#if HAVE_ALTIVEC if (accel & MPEG2_ACCEL_PPC_ALTIVEC) { mpeg2_idct_copy = mpeg2_idct_copy_altivec; mpeg2_idct_add = mpeg2_idct_add_altivec; @@ -111,7 +201,7 @@ } else #endif -#ifdef ARCH_ALPHA -+#ifdef HAVE_MVI ++#if HAVE_MVI if (accel & MPEG2_ACCEL_ALPHA_MVI) { mpeg2_idct_copy = mpeg2_idct_copy_mvi; mpeg2_idct_add = mpeg2_idct_add_mvi; @@ -123,46 +213,89 @@ int i; mpeg2_idct_copy = mpeg2_idct_copy_alpha; +Index: libmpeg2/idct_alpha.c +=================================================================== +--- libmpeg2/idct_alpha.c (revision 28324) ++++ libmpeg2/idct_alpha.c (revision 28325) +@@ -24,7 +24,7 @@ + + #include "config.h" + +-#ifdef ARCH_ALPHA ++#if ARCH_ALPHA + + #include + #include +Index: libmpeg2/idct_altivec.c +=================================================================== +--- libmpeg2/idct_altivec.c (revision 28324) ++++ libmpeg2/idct_altivec.c (revision 28325) +@@ -23,7 +23,7 @@ + + #include "config.h" + +-#ifdef ARCH_PPC ++#if ARCH_PPC + + #ifdef HAVE_ALTIVEC_H + #include +Index: libmpeg2/idct_mmx.c +=================================================================== +--- libmpeg2/idct_mmx.c (revision 28324) ++++ libmpeg2/idct_mmx.c (revision 28325) +@@ -23,7 +23,7 @@ + + #include "config.h" + +-#if defined(ARCH_X86) || defined(ARCH_X86_64) ++#if ARCH_X86 || ARCH_X86_64 + + #include + --- libmpeg2/motion_comp.c 2006-06-16 20:12:26.000000000 +0200 +++ libmpeg2/motion_comp.c 2006-06-16 20:12:50.000000000 +0200 -@@ -33,16 +37,22 @@ +@@ -33,34 +37,40 @@ void mpeg2_mc_init (uint32_t accel) { -#ifdef ARCH_X86 -+#ifdef HAVE_MMX2 ++#if HAVE_MMX2 if (accel & MPEG2_ACCEL_X86_MMXEXT) mpeg2_mc = mpeg2_mc_mmxext; - else if (accel & MPEG2_ACCEL_X86_3DNOW) + else +#endif -+#ifdef HAVE_AMD3DNOW ++#if HAVE_AMD3DNOW + if (accel & MPEG2_ACCEL_X86_3DNOW) mpeg2_mc = mpeg2_mc_3dnow; - else if (accel & MPEG2_ACCEL_X86_MMX) + else +#endif -+#ifdef HAVE_MMX ++#if HAVE_MMX + if (accel & MPEG2_ACCEL_X86_MMX) mpeg2_mc = mpeg2_mc_mmx; else #endif -#ifdef ARCH_PPC -+#ifdef HAVE_ALTIVEC ++#if HAVE_ALTIVEC if (accel & MPEG2_ACCEL_PPC_ALTIVEC) mpeg2_mc = mpeg2_mc_altivec; else -@@ -52,15 +62,15 @@ + #endif +-#ifdef ARCH_ALPHA ++#if ARCH_ALPHA + if (accel & MPEG2_ACCEL_ALPHA) mpeg2_mc = mpeg2_mc_alpha; else #endif -#ifdef ARCH_SPARC -+#ifdef HAVE_VIS ++#if HAVE_VIS if (accel & MPEG2_ACCEL_SPARC_VIS) mpeg2_mc = mpeg2_mc_vis; else #endif - #ifdef ARCH_ARM +-#ifdef ARCH_ARM ++#if ARCH_ARM - if (accel & MPEG2_ACCEL_ARM) { + if (accel & MPEG2_ACCEL_ARM) mpeg2_mc = mpeg2_mc_arm; @@ -171,6 +304,71 @@ #endif mpeg2_mc = mpeg2_mc_c; } +Index: libmpeg2/motion_comp_alpha.c +=================================================================== +--- libmpeg2/motion_comp_alpha.c (revision 28324) ++++ libmpeg2/motion_comp_alpha.c (revision 28325) +@@ -22,7 +22,7 @@ + + #include "config.h" + +-#ifdef ARCH_ALPHA ++#if ARCH_ALPHA + + #include + +Index: libmpeg2/motion_comp_altivec.c +=================================================================== +--- libmpeg2/motion_comp_altivec.c (revision 28324) ++++ libmpeg2/motion_comp_altivec.c (revision 28325) +@@ -23,7 +23,7 @@ + + #include "config.h" + +-#ifdef ARCH_PPC ++#if ARCH_PPC + + #ifdef HAVE_ALTIVEC_H + #include +Index: libmpeg2/motion_comp_arm.c +=================================================================== +--- libmpeg2/motion_comp_arm.c (revision 28324) ++++ libmpeg2/motion_comp_arm.c (revision 28325) +@@ -22,7 +22,7 @@ + + #include "config.h" + +-#ifdef ARCH_ARM ++#if ARCH_ARM + + #include + +Index: libmpeg2/motion_comp_mmx.c +=================================================================== +--- libmpeg2/motion_comp_mmx.c (revision 28324) ++++ libmpeg2/motion_comp_mmx.c (revision 28325) +@@ -23,7 +23,7 @@ + + #include "config.h" + +-#if defined(ARCH_X86) || defined(ARCH_X86_64) ++#if ARCH_X86 || ARCH_X86_64 + + #include + +Index: libmpeg2/motion_comp_vis.c +=================================================================== +--- libmpeg2/motion_comp_vis.c (revision 28324) ++++ libmpeg2/motion_comp_vis.c (revision 28325) +@@ -22,7 +22,7 @@ + + #include "config.h" + +-#ifdef ARCH_SPARC ++#if ARCH_SPARC + + #include + --- libmpeg2/mpeg2_internal.h 2006-06-16 20:12:26.000000000 +0200 +++ libmpeg2/mpeg2_internal.h 2006-06-16 20:12:50.000000000 +0200 @@ -152,6 +156,11 @@ @@ -195,6 +393,15 @@ }; typedef struct { +@@ -226,7 +238,7 @@ + }; + + typedef struct { +-#ifdef ARCH_PPC ++#if ARCH_PPC + uint8_t regv[12*16]; + #endif + int dummy; --- libmpeg2/slice.c 2006-06-16 20:12:26.000000000 +0200 +++ libmpeg2/slice.c 2006-06-16 20:12:50.000000000 +0200 @@ -142,6 +146,7 @@ From subversion at mplayerhq.hu Fri Mar 6 01:41:10 2009 From: subversion at mplayerhq.hu (diego) Date: Fri, 6 Mar 2009 01:41:10 +0100 (CET) Subject: [MPlayer-cvslog] r28832 - in trunk/liba52: a52.h liba52_changes.diff Message-ID: <20090306004110.388905402D@natsuki.mplayerhq.hu> Author: diego Date: Fri Mar 6 01:41:09 2009 New Revision: 28832 Log: Sync local changes file with #ifdef --> #if conversion. Modified: trunk/liba52/a52.h trunk/liba52/liba52_changes.diff Modified: trunk/liba52/a52.h ============================================================================== --- trunk/liba52/a52.h Fri Mar 6 01:10:17 2009 (r28831) +++ trunk/liba52/a52.h Fri Mar 6 01:41:09 2009 (r28832) @@ -28,6 +28,9 @@ #ifndef A52_H #define A52_H +#include +#include "mm_accel.h" + #ifndef LIBA52_DOUBLE typedef float sample_t; #else Modified: trunk/liba52/liba52_changes.diff ============================================================================== --- trunk/liba52/liba52_changes.diff Fri Mar 6 01:10:17 2009 (r28831) +++ trunk/liba52/liba52_changes.diff Fri Mar 6 01:41:09 2009 (r28832) @@ -1,6 +1,6 @@ --- include/a52.h 2006-06-12 15:04:57.000000000 +0200 +++ liba52/a52.h 2006-06-05 02:23:02.000000000 +0200 -@@ -63,4 +63,9 @@ +@@ -59,4 +66,9 @@ int a52_block (a52_state_t * state); void a52_free (a52_state_t * state); @@ -12,11 +12,11 @@ #endif /* A52_H */ --- liba52/a52_internal.h 2006-06-12 15:05:07.000000000 +0200 +++ liba52/a52_internal.h 2006-06-05 02:23:02.000000000 +0200 -@@ -107,18 +107,34 @@ +@@ -103,18 +107,34 @@ #define DELTA_BIT_NONE (2) #define DELTA_BIT_RESERVED (3) -+#ifdef ARCH_X86_64 ++#if ARCH_X86_64 +# define REG_a "rax" +# define REG_d "rdx" +# define REG_S "rsi" @@ -52,7 +52,7 @@ +void imdct_do_512 (sample_t * data, sample_t * delay, sample_t bias); --- liba52/bitstream.c 2006-06-12 15:05:07.000000000 +0200 +++ liba52/bitstream.c 2006-06-05 02:23:02.000000000 +0200 -@@ -35,6 +35,10 @@ +@@ -31,6 +35,10 @@ #define BUFFER_SIZE 4096 @@ -63,7 +63,7 @@ void a52_bitstream_set_ptr (a52_state_t * state, uint8_t * buf) { int align; -@@ -42,6 +46,9 @@ +@@ -38,6 +46,9 @@ align = (long)buf & 3; state->buffer_start = (uint32_t *) (buf - align); state->bits_left = 0; @@ -75,7 +75,7 @@ --- liba52/bitstream.h 2006-06-12 15:05:07.000000000 +0200 +++ liba52/bitstream.h 2006-06-05 02:23:02.000000000 +0200 -@@ -25,6 +25,42 @@ +@@ -21,6 +25,42 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -91,7 +91,7 @@ +#define ALT_BITSTREAM_READER + +/* used to avoid misaligned exceptions on some archs (alpha, ...) */ -+#if defined (ARCH_X86) || defined(HAVE_ARMV6) ++#if ARCH_X86 || HAVE_ARMV6 +# define unaligned32(a) (*(uint32_t*)(a)) +#else +# ifdef __GNUC__ @@ -118,7 +118,7 @@ /* (stolen from the kernel) */ #ifdef WORDS_BIGENDIAN -@@ -32,7 +74,7 @@ +@@ -28,7 +68,7 @@ #else @@ -127,7 +127,7 @@ # define swab32(x) __i386_swab32(x) static inline const uint32_t __i386_swab32(uint32_t x) -@@ -43,19 +85,34 @@ +@@ -39,19 +79,34 @@ # else @@ -166,7 +166,7 @@ uint32_t result; if (num_bits < state->bits_left) { -@@ -65,10 +122,29 @@ +@@ -61,10 +116,29 @@ } return a52_bitstream_get_bh (state, num_bits); @@ -196,7 +196,7 @@ int32_t result; if (num_bits < state->bits_left) { -@@ -78,4 +154,5 @@ +@@ -74,4 +148,5 @@ } return a52_bitstream_get_bh_2 (state, num_bits); @@ -204,7 +204,7 @@ } --- liba52/downmix.c 2006-06-12 15:17:53.000000000 +0200 +++ liba52/downmix.c 2006-06-05 02:23:02.000000000 +0200 -@@ -23,18 +23,46 @@ +@@ -19,18 +23,46 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -241,7 +241,7 @@ +{ + a52_upmix= upmix_C; + a52_downmix= downmix_C; -+#if defined(ARCH_X86) || defined(ARCH_X86_64) ++#if ARCH_X86 || ARCH_X86_64 + if(mm_accel & MM_ACCEL_X86_MMX) a52_upmix= upmix_MMX; + if(mm_accel & MM_ACCEL_X86_SSE) a52_downmix= downmix_SSE; + if(mm_accel & MM_ACCEL_X86_3DNOW) a52_downmix= downmix_3dnow; @@ -251,7 +251,7 @@ int a52_downmix_init (int input, int flags, sample_t * level, sample_t clev, sample_t slev) { -@@ -451,7 +479,7 @@ +@@ -447,7 +479,7 @@ samples[i] = 0; } @@ -260,7 +260,7 @@ sample_t clev, sample_t slev) { switch (CONVERT (acmod, output & A52_CHANNEL_MASK)) { -@@ -563,7 +591,7 @@ +@@ -559,7 +591,7 @@ break; case CONVERT (A52_3F2R, A52_2F1R): @@ -269,7 +269,7 @@ move2to1 (samples + 768, samples + 512, bias); break; -@@ -587,12 +615,12 @@ +@@ -583,12 +615,12 @@ break; case CONVERT (A52_3F1R, A52_3F2R): @@ -284,12 +284,12 @@ { switch (CONVERT (acmod, output & A52_CHANNEL_MASK)) { -@@ -657,3 +685,1104 @@ +@@ -653,3 +685,1104 @@ goto mix_31to21; } } + -+#if defined(ARCH_X86) || defined(ARCH_X86_64) ++#if ARCH_X86 || ARCH_X86_64 +static void mix2to1_SSE (sample_t * dest, sample_t * src, sample_t bias) +{ + __asm__ volatile( @@ -1391,7 +1391,7 @@ +#endif // ARCH_X86 || ARCH_X86_64 --- liba52/imdct.c 2008-02-19 00:18:33.000000000 +0100 +++ liba52/imdct.c 2008-02-19 00:16:40.000000000 +0100 -@@ -26,6 +26,11 @@ +@@ -22,6 +26,11 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -1403,7 +1403,7 @@ */ #include "config.h" -@@ -43,12 +48,49 @@ +@@ -39,12 +48,50 @@ #include "a52.h" #include "a52_internal.h" #include "mm_accel.h" @@ -1413,6 +1413,7 @@ + +#ifdef RUNTIME_CPUDETECT +#undef HAVE_AMD3DNOWEXT ++#define HAVE_AMD3DNOWEXT 0 +#endif typedef struct complex_s { @@ -1453,7 +1454,7 @@ static uint8_t fftorder[] = { 0,128, 64,192, 32,160,224, 96, 16,144, 80,208,240,112, 48,176, 8,136, 72,200, 40,168,232,104,248,120, 56,184, 24,152,216, 88, -@@ -60,6 +102,40 @@ +@@ -56,6 +103,40 @@ 6,134, 70,198, 38,166,230,102,246,118, 54,182, 22,150,214, 86 }; @@ -1473,7 +1474,7 @@ +static sample_t __attribute__((aligned(16))) xcos1[128]; +static sample_t __attribute__((aligned(16))) xsin1[128]; + -+#if defined(ARCH_X86) || defined(ARCH_X86_64) ++#if ARCH_X86 || ARCH_X86_64 +// NOTE: SSE needs 16byte alignment or it will segfault +// +static float __attribute__((aligned(16))) sseSinCos1c[256]; @@ -1494,7 +1495,7 @@ /* Root values for IFFT */ static sample_t roots16[3]; static sample_t roots32[7]; -@@ -245,7 +321,7 @@ +@@ -241,7 +322,7 @@ ifft_pass (buf, roots128 - 32, 32); } @@ -1503,11 +1504,11 @@ { int i, k; sample_t t_r, t_i, a_r, a_i, b_r, b_i, w_1, w_2; -@@ -289,6 +365,701 @@ +@@ -285,6 +366,702 @@ } } -+#ifdef HAVE_ALTIVEC ++#if HAVE_ALTIVEC + +#ifdef HAVE_ALTIVEC_H +#include @@ -1852,10 +1853,9 @@ + +// Stuff below this line is borrowed from libac3 +#include "srfftp.h" -+#if defined(ARCH_X86) || defined(ARCH_X86_64) -+#ifndef HAVE_AMD3DNOW ++#if ARCH_X86 || ARCH_X86_64 ++#undef HAVE_AMD3DNOW +#define HAVE_AMD3DNOW 1 -+#endif +#include "srfftp_3dnow.h" + +const i_cmplx_t x_plus_minus_3dnow __attribute__ ((aligned (8))) = {{ 0x00000000UL, 0x80000000UL }}; @@ -1863,8 +1863,10 @@ +const complex_t HSQRT2_3DNOW __attribute__ ((aligned (8))) = { 0.707106781188, 0.707106781188 }; + +#undef HAVE_AMD3DNOWEXT ++#define HAVE_AMD3DNOWEXT 0 +#include "imdct_3dnow.h" -+#define HAVE_AMD3DNOWEXT ++#undef HAVE_AMD3DNOWEXT ++#define HAVE_AMD3DNOWEXT 1 +#include "imdct_3dnow.h" + +void @@ -2205,7 +2207,7 @@ void a52_imdct_256(sample_t * data, sample_t * delay, sample_t bias) { int i, k; -@@ -368,7 +1145,7 @@ +@@ -364,7 +1141,7 @@ void a52_imdct_init (uint32_t mm_accel) { @@ -2214,7 +2216,7 @@ double sum; /* compute imdct window - kaiser-bessel derived window, alpha = 5.0 */ -@@ -420,6 +1197,99 @@ +@@ -416,6 +1193,99 @@ post2[i].real = cos ((M_PI / 128) * (i + 0.5)); post2[i].imag = sin ((M_PI / 128) * (i + 0.5)); } @@ -2229,7 +2231,7 @@ + w[i][k].imag = sin (-M_PI * k / j); + } + } -+#if defined(ARCH_X86) || defined(ARCH_X86_64) ++#if ARCH_X86 || ARCH_X86_64 + for (i = 0; i < 128; i++) { + sseSinCos1c[2*i+0]= xcos1[i]; + sseSinCos1c[2*i+1]= -xcos1[i]; @@ -2283,7 +2285,7 @@ + ifft128 = ifft128_c; + ifft64 = ifft64_c; + -+#if defined(ARCH_X86) || defined(ARCH_X86_64) ++#if ARCH_X86 || ARCH_X86_64 + if(mm_accel & MM_ACCEL_X86_SSE) + { + fprintf (stderr, "Using SSE optimized IMDCT transform\n"); @@ -2303,7 +2305,7 @@ + } + else +#endif // ARCH_X86 || ARCH_X86_64 -+#ifdef HAVE_ALTIVEC ++#if HAVE_ALTIVEC + if (mm_accel & MM_ACCEL_PPC_ALTIVEC) + { + fprintf(stderr, "Using AltiVec optimized IMDCT transform\n"); @@ -2314,7 +2316,7 @@ #ifdef LIBA52_DJBFFT if (mm_accel & MM_ACCEL_DJBFFT) { -@@ -430,7 +1300,5 @@ +@@ -426,7 +1296,5 @@ #endif { fprintf (stderr, "No accelerated IMDCT transform found\n"); @@ -2324,7 +2326,7 @@ } --- include/mm_accel.h 2006-06-12 15:05:00.000000000 +0200 +++ liba52/mm_accel.h 2006-06-05 02:23:04.000000000 +0200 -@@ -34,7 +34,12 @@ +@@ -30,7 +34,12 @@ /* x86 accelerations */ #define MM_ACCEL_X86_MMX 0x80000000 #define MM_ACCEL_X86_3DNOW 0x40000000 @@ -2339,7 +2341,7 @@ --- liba52/parse.c 2006-12-05 08:08:01.000000000 +0100 +++ liba52/parse.c 2006-12-05 08:08:44.000000000 +0100 -@@ -28,6 +28,7 @@ +@@ -24,6 +28,7 @@ #include "config.h" #include @@ -2347,7 +2349,7 @@ #include #include -@@ -35,13 +36,12 @@ +@@ -31,13 +36,12 @@ #include "a52_internal.h" #include "bitstream.h" #include "tables.h" @@ -2364,7 +2366,7 @@ #endif typedef struct { -@@ -64,7 +64,16 @@ +@@ -60,7 +64,16 @@ if (state == NULL) return NULL; @@ -2381,7 +2383,7 @@ if (state->samples == NULL) { free (state); return NULL; -@@ -78,6 +87,7 @@ +@@ -74,6 +87,7 @@ state->lfsr_state = 1; a52_imdct_init (mm_accel); @@ -2389,7 +2391,7 @@ return state; } -@@ -145,7 +155,7 @@ +@@ -141,7 +155,7 @@ state->acmod = acmod = buf[6] >> 5; a52_bitstream_set_ptr (state, buf + 6); @@ -2398,7 +2400,7 @@ if ((acmod == 2) && (bitstream_get (state, 2) == 2)) /* dsurmod */ acmod = A52_DOLBY; -@@ -176,28 +186,28 @@ +@@ -172,28 +186,28 @@ chaninfo = !acmod; do { @@ -2435,7 +2437,7 @@ } while (addbsil--); } -@@ -684,7 +694,7 @@ +@@ -680,7 +694,7 @@ state->fbw_expbap[i].exp[0], state->fbw_expbap[i].exp + 1)) return 1; @@ -2444,7 +2446,7 @@ } if (lfeexpstr != EXP_REUSE) { do_bit_alloc |= 32; -@@ -759,7 +769,7 @@ +@@ -755,7 +769,7 @@ if (bitstream_get (state, 1)) { /* skiple */ i = bitstream_get (state, 9); /* skipl */ while (i--) @@ -2453,7 +2455,7 @@ } samples = state->samples; -@@ -900,6 +910,10 @@ +@@ -896,6 +910,10 @@ void a52_free (a52_state_t * state) { From subversion at mplayerhq.hu Fri Mar 6 01:47:04 2009 From: subversion at mplayerhq.hu (diego) Date: Fri, 6 Mar 2009 01:47:04 +0100 (CET) Subject: [MPlayer-cvslog] r28833 - trunk/tremor/tremor.diff Message-ID: <20090306004704.161EE54041@natsuki.mplayerhq.hu> Author: diego Date: Fri Mar 6 01:47:03 2009 New Revision: 28833 Log: Sync latest set of changes. Modified: trunk/tremor/tremor.diff Modified: trunk/tremor/tremor.diff ============================================================================== --- trunk/tremor/tremor.diff Fri Mar 6 01:41:09 2009 (r28832) +++ trunk/tremor/tremor.diff Fri Mar 6 01:47:03 2009 (r28833) @@ -166,3 +166,13 @@ +#endif /* 0 */ + #endif /* _OS_TYPES_H */ +--- mapping0.c (revision 28274) ++++ mapping0.c (revision 28275) +@@ -19,6 +20,7 @@ + #include + #include + #include "ogg.h" ++#include "os.h" + #include "ivorbiscodec.h" + #include "mdct.h" + #include "codec_internal.h" From subversion at mplayerhq.hu Fri Mar 6 02:17:06 2009 From: subversion at mplayerhq.hu (greg) Date: Fri, 6 Mar 2009 02:17:06 +0100 (CET) Subject: [MPlayer-cvslog] r28834 - in trunk/libass: ass_bitmap.c ass_bitmap.h ass_render.c Message-ID: <20090306011706.B1FCE3B733@natsuki.mplayerhq.hu> Author: greg Date: Fri Mar 6 02:17:05 2009 New Revision: 28834 Log: Use blur with kernel [[1,2,1], [2,4,2], [1,2,1]] for \be. This is faster than gaussian blur and similar to vsfilter. Modified: trunk/libass/ass_bitmap.c trunk/libass/ass_bitmap.h trunk/libass/ass_render.c Modified: trunk/libass/ass_bitmap.c ============================================================================== --- trunk/libass/ass_bitmap.c Fri Mar 6 01:47:03 2009 (r28833) +++ trunk/libass/ass_bitmap.c Fri Mar 6 02:17:05 2009 (r28834) @@ -255,11 +255,38 @@ static bitmap_t* fix_outline_and_shadow( return bm_s; } -int glyph_to_bitmap(ass_synth_priv_t* priv, ass_synth_priv_t* priv_blur, +/** + * \brief Blur with [[1,2,1]. [2,4,2], [1,2,1]] kernel + * This blur is the same as the one employed by vsfilter. + */ +static void be_blur(unsigned char *buf, int w, int h) { + unsigned int x, y; + unsigned int old_sum, new_sum; + + for (y=0; y> 2; + old_sum = new_sum; + } + } + + for (x=0; x> 2; + old_sum = new_sum; + } + } +} + +int glyph_to_bitmap(ass_synth_priv_t* priv_blur, FT_Glyph glyph, FT_Glyph outline_glyph, bitmap_t** bm_g, bitmap_t** bm_o, bitmap_t** bm_s, int be, double blur_radius) { - int bord = be ? (be+1) : 0; + int bord = be ? (be/4+1) : 0; blur_radius *= 2; bord = (blur_radius > 0.0) ? blur_radius : bord; @@ -279,19 +306,16 @@ int glyph_to_bitmap(ass_synth_priv_t* pr return 1; } } - if (*bm_o) { - resize_tmp(priv, (*bm_o)->w, (*bm_o)->h); + if (*bm_o) resize_tmp(priv_blur, (*bm_o)->w, (*bm_o)->h); - } - resize_tmp(priv, (*bm_g)->w, (*bm_g)->h); resize_tmp(priv_blur, (*bm_g)->w, (*bm_g)->h); if (be) { while (be--) { if (*bm_o) - blur((*bm_o)->buffer, priv->tmp, (*bm_o)->w, (*bm_o)->h, (*bm_o)->w, (int*)priv->gt2, priv->g_r, priv->g_w); + be_blur((*bm_o)->buffer, (*bm_o)->w, (*bm_o)->h); else - blur((*bm_g)->buffer, priv->tmp, (*bm_g)->w, (*bm_g)->h, (*bm_g)->w, (int*)priv->gt2, priv->g_r, priv->g_w); + be_blur((*bm_g)->buffer, (*bm_g)->w, (*bm_g)->h); } } else { if (blur_radius > 0.0) { Modified: trunk/libass/ass_bitmap.h ============================================================================== --- trunk/libass/ass_bitmap.h Fri Mar 6 01:47:03 2009 (r28833) +++ trunk/libass/ass_bitmap.h Fri Mar 6 02:17:05 2009 (r28834) @@ -46,7 +46,7 @@ typedef struct bitmap_s { * \param bm_g out: pointer to the bitmap of glyph shadow is returned here * \param be 1 = produces blurred bitmaps, 0 = normal bitmaps */ -int glyph_to_bitmap(ass_synth_priv_t* priv, ass_synth_priv_t* priv_blur, FT_Glyph glyph, FT_Glyph outline_glyph, bitmap_t** bm_g, bitmap_t** bm_o, bitmap_t** bm_s, int be, double blur_radius); +int glyph_to_bitmap(ass_synth_priv_t* priv_blur, FT_Glyph glyph, FT_Glyph outline_glyph, bitmap_t** bm_g, bitmap_t** bm_o, bitmap_t** bm_s, int be, double blur_radius); void ass_free_bitmap(bitmap_t* bm); Modified: trunk/libass/ass_render.c ============================================================================== --- trunk/libass/ass_render.c Fri Mar 6 01:47:03 2009 (r28833) +++ trunk/libass/ass_render.c Fri Mar 6 02:17:05 2009 (r28834) @@ -43,7 +43,6 @@ #define MAX_GLYPHS 3000 #define MAX_LINES 300 -#define BE_RADIUS 1.5 #define BLUR_MAX_RADIUS 50.0 #define ROUND(x) ((int) ((x) + .5)) @@ -83,7 +82,6 @@ struct ass_renderer_s { ass_settings_t settings; int render_id; ass_synth_priv_t* synth_priv; - ass_synth_priv_t* synth_priv_blur; ass_image_t* images_root; // rendering result is stored here ass_image_t* prev_images_root; @@ -270,8 +268,7 @@ ass_renderer_t* ass_renderer_init(ass_li goto ass_init_exit; } - priv->synth_priv = ass_synth_init(BE_RADIUS); - priv->synth_priv_blur = ass_synth_init(BLUR_MAX_RADIUS); + priv->synth_priv = ass_synth_init(BLUR_MAX_RADIUS); priv->library = library; priv->ftlibrary = ft; @@ -1503,7 +1500,6 @@ static void get_bitmap_glyph(glyph_info_ // render glyph error = glyph_to_bitmap(ass_renderer->synth_priv, - ass_renderer->synth_priv_blur, info->glyph, info->outline_glyph, &info->bm, &info->bm_o, &info->bm_s, info->be, info->blur * frame_context.border_scale); From subversion at mplayerhq.hu Fri Mar 6 02:26:47 2009 From: subversion at mplayerhq.hu (greg) Date: Fri, 6 Mar 2009 02:26:47 +0100 (CET) Subject: [MPlayer-cvslog] r28835 - trunk/libass/ass_render.c Message-ID: <20090306012649.7576B54078@natsuki.mplayerhq.hu> Author: greg Date: Fri Mar 6 02:26:44 2009 New Revision: 28835 Log: Replace magic numbers (for subpixel accuracy masking) with a define. Modified: trunk/libass/ass_render.c Modified: trunk/libass/ass_render.c ============================================================================== --- trunk/libass/ass_render.c Fri Mar 6 02:17:05 2009 (r28834) +++ trunk/libass/ass_render.c Fri Mar 6 02:26:44 2009 (r28835) @@ -45,6 +45,7 @@ #define MAX_LINES 300 #define BLUR_MAX_RADIUS 50.0 #define ROUND(x) ((int) ((x) + .5)) +#define SUBPIXEL_MASK 56 // d6 bitmask for subpixel accuracy adjustment static int last_render_id = 0; @@ -1964,12 +1965,12 @@ static int ass_render_event(ass_event_t* pen.y += delta.y * render_context.scale_y; } - shift.x = pen.x & 56; - shift.y = pen.y & 56; + shift.x = pen.x & SUBPIXEL_MASK; + shift.y = pen.y & SUBPIXEL_MASK; if (render_context.evt_type == EVENT_POSITIONED) { - shift.x += double_to_d6(x2scr_pos(render_context.pos_x)) & 56; - shift.y -= double_to_d6(y2scr_pos(render_context.pos_y)) & 56; + shift.x += double_to_d6(x2scr_pos(render_context.pos_x)) & SUBPIXEL_MASK; + shift.y -= double_to_d6(y2scr_pos(render_context.pos_y)) & SUBPIXEL_MASK; } ass_font_set_transform(render_context.font, From Reimar.Doeffinger at gmx.de Fri Mar 6 10:11:19 2009 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Fri, 6 Mar 2009 10:11:19 +0100 Subject: [MPlayer-cvslog] r28834 - in trunk/libass: ass_bitmap.c ass_bitmap.h ass_render.c In-Reply-To: <20090306011706.B1FCE3B733@natsuki.mplayerhq.hu> References: <20090306011706.B1FCE3B733@natsuki.mplayerhq.hu> Message-ID: <20090306091119.GB4008@1und1.de> On Fri, Mar 06, 2009 at 02:17:06AM +0100, greg wrote: > -int glyph_to_bitmap(ass_synth_priv_t* priv, ass_synth_priv_t* priv_blur, > +/** > + * \brief Blur with [[1,2,1]. [2,4,2], [1,2,1]] kernel > + * This blur is the same as the one employed by vsfilter. > + */ > +static void be_blur(unsigned char *buf, int w, int h) { > + unsigned int x, y; > + unsigned int old_sum, new_sum; > + > + for (y=0; y + old_sum = 2 * buf[0]; That is wrong, it must be buf[y*w], same for y-interpolation but it must be buf[x] there. I'd consider using pointer arithmetic though, like uint8_t *p = buf + y*w; uint8_t *p_end = p + w - 1; for (; p < p_end; p++) { new_sum = p[0] + p[1]; p[0] = ... } > + for (x=0; x + new_sum = buf[y*w+x] + buf[y*w+x+1]; > + buf[y*w+x] = (old_sum + new_sum) >> 2; > + old_sum = new_sum; > + } missing the right border, e.g. (to be symmetric with left border): buf[y*w+x] = (old_sum + 2*buf[y*w+x]) >> 2; (x == w - 1 here, feel free to explicitly write w-1, I just considered using x more readable). Same for the lower border of course. All this brings me to the point: you should send new versions of patches under discussion first, not commit directly. From subversion at mplayerhq.hu Fri Mar 6 10:20:10 2009 From: subversion at mplayerhq.hu (greg) Date: Fri, 6 Mar 2009 10:20:10 +0100 (CET) Subject: [MPlayer-cvslog] r28836 - trunk/libass/ass_render.c Message-ID: <20090306092010.241134E04E@natsuki.mplayerhq.hu> Author: greg Date: Fri Mar 6 10:20:09 2009 New Revision: 28836 Log: Raise max. number of \be applications to 100, introduce #define for it. Modified: trunk/libass/ass_render.c Modified: trunk/libass/ass_render.c ============================================================================== --- trunk/libass/ass_render.c Fri Mar 6 02:26:44 2009 (r28835) +++ trunk/libass/ass_render.c Fri Mar 6 10:20:09 2009 (r28836) @@ -44,6 +44,7 @@ #define MAX_GLYPHS 3000 #define MAX_LINES 300 #define BLUR_MAX_RADIUS 50.0 +#define MAX_BE 100 #define ROUND(x) ((int) ((x) + .5)) #define SUBPIXEL_MASK 56 // d6 bitmask for subpixel accuracy adjustment @@ -1158,9 +1159,9 @@ static char* parse_tag(char* p, double p } else if (mystrcmp(&p, "be")) { int val; if (mystrtoi(&p, &val)) { - // Clamp to 10, since high values need excessive CPU + // Clamp to a safe upper limit, since high values need excessive CPU val = (val < 0) ? 0 : val; - val = (val > 10) ? 10 : val; + val = (val > MAX_BE) ? MAX_BE : val; render_context.be = val; } else render_context.be = 0; From subversion at mplayerhq.hu Fri Mar 6 10:20:15 2009 From: subversion at mplayerhq.hu (greg) Date: Fri, 6 Mar 2009 10:20:15 +0100 (CET) Subject: [MPlayer-cvslog] r28837 - trunk/libass/ass_bitmap.c Message-ID: <20090306092015.56F244E04E@natsuki.mplayerhq.hu> Author: greg Date: Fri Mar 6 10:20:14 2009 New Revision: 28837 Log: Fix \be blur start position. Modified: trunk/libass/ass_bitmap.c Modified: trunk/libass/ass_bitmap.c ============================================================================== --- trunk/libass/ass_bitmap.c Fri Mar 6 10:20:09 2009 (r28836) +++ trunk/libass/ass_bitmap.c Fri Mar 6 10:20:14 2009 (r28837) @@ -264,7 +264,7 @@ static void be_blur(unsigned char *buf, unsigned int old_sum, new_sum; for (y=0; y> 2; @@ -273,7 +273,7 @@ static void be_blur(unsigned char *buf, } for (x=0; x> 2; From subversion at mplayerhq.hu Fri Mar 6 11:33:35 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 11:33:35 +0100 (CET) Subject: [MPlayer-cvslog] r28838 - trunk/libvo/vo_gl.c Message-ID: <20090306103335.EECE03B5D6@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 6 11:33:35 2009 New Revision: 28838 Log: DO not rely on draw_osd to render the EOSD, instead draw it already at the end of genOSD. Modified: trunk/libvo/vo_gl.c Modified: trunk/libvo/vo_gl.c ============================================================================== --- trunk/libvo/vo_gl.c Fri Mar 6 10:20:14 2009 (r28837) +++ trunk/libvo/vo_gl.c Fri Mar 6 11:33:35 2009 (r28838) @@ -284,6 +284,8 @@ static void clearEOSD(void) { eosdtex = NULL; } +static void do_render_osd(int); + /** * \brief construct display list from ass image list * \param img image list to create OSD from. @@ -299,7 +301,7 @@ static void genEOSD(mp_eosd_images_t *im ass_image_t *i; if (imgs->changed == 0) // there are elements, but they are unchanged - return; + goto call_render; if (img && imgs->changed == 1) // there are elements, but they just moved goto skip_upload; @@ -384,6 +386,8 @@ skip_upload: } glEndList(); BindTexture(gl_target, 0); +call_render: + if (vo_doublebuffering) do_render_osd(2); } /** @@ -630,8 +634,6 @@ static void create_osd_texture(int x0, i osdtexCnt++; } -static void do_render_osd(void); - static void draw_osd(void) { if (!use_osd) return; @@ -643,7 +645,7 @@ static void draw_osd(void) vo_draw_text_ext(osd_w, osd_h, ass_border_x, ass_border_y, ass_border_x, ass_border_y, image_width, image_height, create_osd_texture); } - if (vo_doublebuffering) do_render_osd(); + if (vo_doublebuffering) do_render_osd(1); } static void do_render(void) { @@ -662,8 +664,11 @@ static void do_render(void) { glDisableYUVConversion(gl_target, yuvconvtype); } -static void do_render_osd(void) { - if (osdtexCnt > 0 || eosdDispList) { +/** + * \param type bit 0: render OSD, bit 1: render EOSD + */ +static void do_render_osd(int type) { + if (((type & 1) && osdtexCnt > 0) || ((type & 2) && eosdDispList)) { // set special rendering parameters if (!scaled_osd) { glMatrixMode(GL_PROJECTION); @@ -672,11 +677,11 @@ static void do_render_osd(void) { glOrtho(0, vo_dwidth, vo_dheight, 0, -1, 1); } glEnable(GL_BLEND); - if (eosdDispList) { + if ((type & 2) && eosdDispList) { glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glCallList(eosdDispList); } - if (osdtexCnt > 0) { + if ((type & 1) && osdtexCnt > 0) { glColor4ub((osd_color >> 16) & 0xff, (osd_color >> 8) & 0xff, osd_color & 0xff, 0xff - (osd_color >> 24)); // draw OSD #ifndef FAST_OSD @@ -702,14 +707,14 @@ static void flip_page(void) { glClear(GL_COLOR_BUFFER_BIT); } else { do_render(); - do_render_osd(); + do_render_osd(3); if (use_glFinish) glFinish(); else glFlush(); } } static void redraw(void) { - if (vo_doublebuffering) { do_render(); do_render_osd(); } + if (vo_doublebuffering) { do_render(); do_render_osd(3); } flip_page(); } From subversion at mplayerhq.hu Fri Mar 6 11:38:28 2009 From: subversion at mplayerhq.hu (greg) Date: Fri, 6 Mar 2009 11:38:28 +0100 (CET) Subject: [MPlayer-cvslog] r28839 - trunk/libvo/vo_vdpau.c Message-ID: <20090306103828.4B20C3B5D3@natsuki.mplayerhq.hu> Author: greg Date: Fri Mar 6 11:38:27 2009 New Revision: 28839 Log: Draw EOSD with VOCTRL_DRAW_EOSD instead of along with OSD. Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Fri Mar 6 11:33:35 2009 (r28838) +++ trunk/libvo/vo_vdpau.c Fri Mar 6 11:38:27 2009 (r28839) @@ -742,7 +742,6 @@ static void draw_osd(void) { mp_msg(MSGT_VO, MSGL_DBG2, "DRAW_OSD\n"); - draw_eosd(); vo_draw_text_ext(vo_dwidth, vo_dheight, border_x, border_y, border_x, border_y, vid_width, vid_height, draw_osd_I8A8); } @@ -1140,6 +1139,7 @@ static int control(uint32_t request, voi if (!data) return VO_FALSE; generate_eosd(data); + draw_eosd(); return VO_TRUE; case VOCTRL_GET_EOSD_RES: { mp_eosd_res_t *r = data; From subversion at mplayerhq.hu Fri Mar 6 11:39:58 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 11:39:58 +0100 (CET) Subject: [MPlayer-cvslog] r28840 - trunk/libvo/vo_vdpau.c Message-ID: <20090306103958.8D6213B5F8@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 6 11:39:58 2009 New Revision: 28840 Log: As for vo_gl, do not rely on draw_osd to render EOSD. Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Fri Mar 6 11:38:27 2009 (r28839) +++ trunk/libvo/vo_vdpau.c Fri Mar 6 11:39:58 2009 (r28840) @@ -205,6 +205,8 @@ static VdpProcamp procamp; static int visible_buf; static int int_pause; +static void draw_eosd(void); + static void video_to_output_surface(void) { VdpTime dummy; @@ -219,6 +221,7 @@ static void video_to_output_surface(void int field = VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME; VdpOutputSurface output_surface; if (i) { + draw_eosd(); draw_osd(); flip_page(); } @@ -657,7 +660,7 @@ static void generate_eosd(mp_eosd_images // Nothing changed, no need to redraw if (imgs->changed == 0) - return; + goto eosd_draw_only; eosd_render_count = 0; // There's nothing to render! if (!img) @@ -736,6 +739,8 @@ eosd_skip_upload: eosd_targets[eosd_render_count].source.y1 = i->h; eosd_render_count++; } +eosd_draw_only: + draw_eosd(); } static void draw_osd(void) From subversion at mplayerhq.hu Fri Mar 6 11:45:49 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 11:45:49 +0100 (CET) Subject: [MPlayer-cvslog] r28841 - trunk/libmpcodecs/dec_video.c Message-ID: <20090306104549.9CACB3B5F5@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 6 11:45:49 2009 New Revision: 28841 Log: Swap order of VFCTRL_DRAW_EOSD and VFCTRL_DRAW_OSD so that the EOSD is drawn below the OSD and document possible issues when this is changed. Modified: trunk/libmpcodecs/dec_video.c Modified: trunk/libmpcodecs/dec_video.c ============================================================================== --- trunk/libmpcodecs/dec_video.c Fri Mar 6 11:39:58 2009 (r28840) +++ trunk/libmpcodecs/dec_video.c Fri Mar 6 11:45:49 2009 (r28841) @@ -415,10 +415,13 @@ int filter_video(sh_video_t *sh_video, v // apply video filters and call the leaf vo/ve int ret = vf->put_image(vf, mpi, pts); if (ret > 0) { - vf->control(vf, VFCTRL_DRAW_OSD, NULL); + // draw EOSD first so it ends up below the OSD. + // Note that changing this is will not work right with vf_ass and the + // vos currently always draw the EOSD first in paused mode. #ifdef CONFIG_ASS vf->control(vf, VFCTRL_DRAW_EOSD, NULL); #endif + vf->control(vf, VFCTRL_DRAW_OSD, NULL); } t2 = GetTimer()-t2; From subversion at mplayerhq.hu Fri Mar 6 11:50:44 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 11:50:44 +0100 (CET) Subject: [MPlayer-cvslog] r28842 - trunk/libvo/vo_vdpau.c Message-ID: <20090306105044.2B6493B543@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 6 11:50:43 2009 New Revision: 28842 Log: Remove duplicate OSD drawing introduced due to a conflict between r28840 and r28839. Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Fri Mar 6 11:45:49 2009 (r28841) +++ trunk/libvo/vo_vdpau.c Fri Mar 6 11:50:43 2009 (r28842) @@ -660,7 +660,7 @@ static void generate_eosd(mp_eosd_images // Nothing changed, no need to redraw if (imgs->changed == 0) - goto eosd_draw_only; + return; eosd_render_count = 0; // There's nothing to render! if (!img) @@ -739,8 +739,6 @@ eosd_skip_upload: eosd_targets[eosd_render_count].source.y1 = i->h; eosd_render_count++; } -eosd_draw_only: - draw_eosd(); } static void draw_osd(void) From subversion at mplayerhq.hu Fri Mar 6 11:53:31 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 11:53:31 +0100 (CET) Subject: [MPlayer-cvslog] r28843 - trunk/libvo/vo_gl.c Message-ID: <20090306105331.405B44E01B@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 6 11:53:30 2009 New Revision: 28843 Log: Simplify EOSD code by rendering it in VOCTRL_DRAW_EOSD instead of genEOSD, just like vo_vdpau. Modified: trunk/libvo/vo_gl.c Modified: trunk/libvo/vo_gl.c ============================================================================== --- trunk/libvo/vo_gl.c Fri Mar 6 11:50:43 2009 (r28842) +++ trunk/libvo/vo_gl.c Fri Mar 6 11:53:30 2009 (r28843) @@ -301,7 +301,7 @@ static void genEOSD(mp_eosd_images_t *im ass_image_t *i; if (imgs->changed == 0) // there are elements, but they are unchanged - goto call_render; + return; if (img && imgs->changed == 1) // there are elements, but they just moved goto skip_upload; @@ -386,8 +386,6 @@ skip_upload: } glEndList(); BindTexture(gl_target, 0); -call_render: - if (vo_doublebuffering) do_render_osd(2); } /** @@ -1118,6 +1116,7 @@ static int control(uint32_t request, voi if (!data) return VO_FALSE; genEOSD(data); + if (vo_doublebuffering) do_render_osd(2); return VO_TRUE; case VOCTRL_GET_EOSD_RES: { From Reimar.Doeffinger at gmx.de Fri Mar 6 11:57:54 2009 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Fri, 6 Mar 2009 11:57:54 +0100 Subject: [MPlayer-cvslog] r28839 - trunk/libvo/vo_vdpau.c In-Reply-To: <20090306103828.4B20C3B5D3@natsuki.mplayerhq.hu> References: <20090306103828.4B20C3B5D3@natsuki.mplayerhq.hu> Message-ID: <20090306105754.GA10013@1und1.de> On Fri, Mar 06, 2009 at 11:38:28AM +0100, greg wrote: > Author: greg > Date: Fri Mar 6 11:38:27 2009 > New Revision: 28839 > > Log: > Draw EOSD with VOCTRL_DRAW_EOSD instead of along with OSD. You missed the deinterlacing code that needs to be adjusted, on the plus side I could use your approach to simplify mine :-) From subversion at mplayerhq.hu Fri Mar 6 12:04:45 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 12:04:45 +0100 (CET) Subject: [MPlayer-cvslog] [propchange]: r28841 - svn:log Message-ID: <20090306110445.E4F0F50085@natsuki.mplayerhq.hu> Author: reimar Revision: 28841 Property Name: svn:log Action: modified Property diff: --- old property value +++ new property value @@ -1,2 +1,3 @@ Swap order of VFCTRL_DRAW_EOSD and VFCTRL_DRAW_OSD so that the EOSD is drawn below the OSD and document possible issues when this is changed. +Patch by Uoti (though originally intended for a different issue) with extra comment by me. From subversion at mplayerhq.hu Fri Mar 6 12:05:30 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 12:05:30 +0100 (CET) Subject: [MPlayer-cvslog] [propchange]: r28838 - svn:log Message-ID: <20090306110530.0A98650059@natsuki.mplayerhq.hu> Author: reimar Revision: 28838 Property Name: svn:log Action: modified Property diff: --- old property value +++ new property value @@ -1,2 +1,3 @@ -DO not rely on draw_osd to render the EOSD, instead draw it already at the +Do not rely on draw_osd to render the EOSD, instead draw it already at the end of genOSD. +Fixes that the EOSD was drawn one frame too late. From Reimar.Doeffinger at gmx.de Fri Mar 6 12:07:02 2009 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Fri, 6 Mar 2009 12:07:02 +0100 Subject: [MPlayer-cvslog] [propchange]: r28838 - svn:log In-Reply-To: <20090306110530.0A98650059@natsuki.mplayerhq.hu> References: <20090306110530.0A98650059@natsuki.mplayerhq.hu> Message-ID: <20090306110702.GA10068@1und1.de> On Fri, Mar 06, 2009 at 12:05:30PM +0100, reimar wrote: > Author: reimar > Revision: 28838 > Property Name: svn:log > Action: modified > > Property diff: > --- old property value > +++ new property value > @@ -1,2 +1,3 @@ > -DO not rely on draw_osd to render the EOSD, instead draw it already at the > +Do not rely on draw_osd to render the EOSD, instead draw it already at the > end of genOSD. > +Fixes that the EOSD was drawn one frame too late. Sorry for the mess, I should have taken an additional moment to think about it. From subversion at mplayerhq.hu Fri Mar 6 12:31:19 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 12:31:19 +0100 (CET) Subject: [MPlayer-cvslog] r28844 - trunk/libaf/af_resample.c Message-ID: <20090306113119.44ED83B4BD@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 6 12:31:18 2009 New Revision: 28844 Log: Comment typo fixes for af_resample Modified: trunk/libaf/af_resample.c Modified: trunk/libaf/af_resample.c ============================================================================== --- trunk/libaf/af_resample.c Fri Mar 6 11:53:30 2009 (r28843) +++ trunk/libaf/af_resample.c Fri Mar 6 12:31:18 2009 (r28844) @@ -33,7 +33,7 @@ Valid definitions are L8 and L16, where the number denotes the length of the filter. This definition affects the computational complexity (see play()), the performance (see filter.h) and the - memory usage. The filterlength is choosen to 8 if the machine is + memory usage. The filter length is chosen to 8 if the machine is slow and to 16 if the machine is fast and has MMX. */ @@ -175,11 +175,11 @@ static int control(struct af_instance_s* switch(cmd){ case AF_CONTROL_REINIT:{ af_resample_t* s = (af_resample_t*)af->setup; - af_data_t* n = (af_data_t*)arg; // New configureation + af_data_t* n = (af_data_t*)arg; // New configuration int i,d = 0; int rv = AF_OK; - // Free space for circular bufers + // Free space for circular buffers if(s->xq){ for(i=1;idata->nch;i++) if(s->xq[i]) @@ -216,13 +216,13 @@ static int control(struct af_instance_s* d*=m; } - // Create space for circular bufers + // Create space for circular buffers s->xq = malloc(n->nch*sizeof(void*)); for(i=0;inch;i++) s->xq[i] = malloc(2*L*af->data->bps); s->xi = 0; - // Check if the the design needs to be redone + // Check if the design needs to be redone if(s->up != af->data->rate/d || s->dn != n->rate/d){ float* w; float* wt; @@ -233,9 +233,9 @@ static int control(struct af_instance_s* s->wi = 0; s->i = 0; - // Calculate cuttof frequency for filter + // Calculate cutoff frequency for filter fc = 1/(float)(max(s->up,s->dn)); - // Allocate space for polyphase filter bank and protptype filter + // Allocate space for polyphase filter bank and prototype filter w = malloc(sizeof(float) * s->up *L); if(NULL != s->w) free(s->w); From subversion at mplayerhq.hu Fri Mar 6 12:39:13 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 12:39:13 +0100 (CET) Subject: [MPlayer-cvslog] r28845 - trunk/libaf/af_resample.c Message-ID: <20090306113913.863C450097@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 6 12:39:13 2009 New Revision: 28845 Log: Use a single malloc to allocate space for the circular buffers. Modified: trunk/libaf/af_resample.c Modified: trunk/libaf/af_resample.c ============================================================================== --- trunk/libaf/af_resample.c Fri Mar 6 12:31:18 2009 (r28844) +++ trunk/libaf/af_resample.c Fri Mar 6 12:39:13 2009 (r28845) @@ -181,9 +181,7 @@ static int control(struct af_instance_s* // Free space for circular buffers if(s->xq){ - for(i=1;idata->nch;i++) - if(s->xq[i]) - free(s->xq[i]); + free(s->xq[0]); free(s->xq); s->xq = NULL; } @@ -218,8 +216,9 @@ static int control(struct af_instance_s* // Create space for circular buffers s->xq = malloc(n->nch*sizeof(void*)); - for(i=0;inch;i++) - s->xq[i] = malloc(2*L*af->data->bps); + s->xq[0] = malloc(n->nch*2*L*af->data->bps); + for(i=1;inch;i++) + s->xq[i] = (uint8_t *)s->xq[i-1] + 2*L*af->data->bps; s->xi = 0; // Check if the design needs to be redone From subversion at mplayerhq.hu Fri Mar 6 12:42:46 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 12:42:46 +0100 (CET) Subject: [MPlayer-cvslog] r28846 - trunk/libaf/af_resample.c Message-ID: <20090306114246.14D393B168@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 6 12:42:45 2009 New Revision: 28846 Log: Use calloc to allocate the af_resample ring buffers, reportedly using non-zeroed buffers can cause initial noise, see -dev-eng: [PATCH]: Add missing memset after malloc in libaf/af_resample.c Wed, 4 Mar 2009 15:29:30 +0800 Modified: trunk/libaf/af_resample.c Modified: trunk/libaf/af_resample.c ============================================================================== --- trunk/libaf/af_resample.c Fri Mar 6 12:39:13 2009 (r28845) +++ trunk/libaf/af_resample.c Fri Mar 6 12:42:45 2009 (r28846) @@ -216,7 +216,7 @@ static int control(struct af_instance_s* // Create space for circular buffers s->xq = malloc(n->nch*sizeof(void*)); - s->xq[0] = malloc(n->nch*2*L*af->data->bps); + s->xq[0] = calloc(n->nch, 2*L*af->data->bps); for(i=1;inch;i++) s->xq[i] = (uint8_t *)s->xq[i-1] + 2*L*af->data->bps; s->xi = 0; From subversion at mplayerhq.hu Fri Mar 6 12:46:07 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 12:46:07 +0100 (CET) Subject: [MPlayer-cvslog] r28847 - trunk/libaf/af_resample.c Message-ID: <20090306114607.5490E3B252@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 6 12:46:06 2009 New Revision: 28847 Log: Free af->setup and contents in af_resample uninit function. Modified: trunk/libaf/af_resample.c Modified: trunk/libaf/af_resample.c ============================================================================== --- trunk/libaf/af_resample.c Fri Mar 6 12:42:45 2009 (r28846) +++ trunk/libaf/af_resample.c Fri Mar 6 12:46:06 2009 (r28847) @@ -305,6 +305,13 @@ static int control(struct af_instance_s* // Deallocate memory static void uninit(struct af_instance_s* af) { + af_resample_t *s = af->setup; + if (s) { + if (s->xq) free(s->xq[0]); + free(s->xq); + free(s->w); + free(s); + } if(af->data) free(af->data->audio); free(af->data); From subversion at mplayerhq.hu Fri Mar 6 12:47:51 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 12:47:51 +0100 (CET) Subject: [MPlayer-cvslog] r28848 - trunk/libaf/af_resample.c Message-ID: <20090306114751.E573A3B168@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 6 12:47:51 2009 New Revision: 28848 Log: Remove several useless casts from af_resample Modified: trunk/libaf/af_resample.c Modified: trunk/libaf/af_resample.c ============================================================================== --- trunk/libaf/af_resample.c Fri Mar 6 12:46:06 2009 (r28847) +++ trunk/libaf/af_resample.c Fri Mar 6 12:47:51 2009 (r28848) @@ -174,8 +174,8 @@ static int control(struct af_instance_s* { switch(cmd){ case AF_CONTROL_REINIT:{ - af_resample_t* s = (af_resample_t*)af->setup; - af_data_t* n = (af_data_t*)arg; // New configuration + af_resample_t* s = af->setup; + af_data_t* n = arg; // New configuration int i,d = 0; int rv = AF_OK; @@ -270,7 +270,7 @@ static int control(struct af_instance_s* return rv; } case AF_CONTROL_COMMAND_LINE:{ - af_resample_t* s = (af_resample_t*)af->setup; + af_resample_t* s = af->setup; int rate=0; int type=RSMP_INT; int sloppy=1; @@ -323,7 +323,7 @@ static af_data_t* play(struct af_instanc int len = 0; // Length of output data af_data_t* c = data; // Current working data af_data_t* l = af->data; // Local data - af_resample_t* s = (af_resample_t*)af->setup; + af_resample_t* s = af->setup; if(AF_OK != RESIZE_LOCAL_BUFFER(af,data)) return NULL; From subversion at mplayerhq.hu Fri Mar 6 13:56:13 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 13:56:13 +0100 (CET) Subject: [MPlayer-cvslog] r28849 - trunk/libvo/vo_gl.c Message-ID: <20090306125613.F101A4E069@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 6 13:56:13 2009 New Revision: 28849 Log: Refactor smalltex/tinytex EOSD optimization in vo_gl Modified: trunk/libvo/vo_gl.c Modified: trunk/libvo/vo_gl.c ============================================================================== --- trunk/libvo/vo_gl.c Fri Mar 6 12:47:51 2009 (r28848) +++ trunk/libvo/vo_gl.c Fri Mar 6 13:56:13 2009 (r28849) @@ -76,6 +76,13 @@ static GLuint osdtex[MAX_OSD_PARTS]; static GLuint osdatex[MAX_OSD_PARTS]; #endif static GLuint *eosdtex; +#define LARGE_EOSD_TEX_SIZE 512 +#define TINYTEX_SIZE 16 +#define TINYTEX_COLS (LARGE_EOSD_TEX_SIZE/TINYTEX_SIZE) +#define TINYTEX_MAX (TINYTEX_COLS*TINYTEX_COLS) +#define SMALLTEX_SIZE 32 +#define SMALLTEX_COLS (LARGE_EOSD_TEX_SIZE/SMALLTEX_SIZE) +#define SMALLTEX_MAX (SMALLTEX_COLS*SMALLTEX_COLS) static GLuint largeeosdtex[2]; //! Display lists that draw the OSD parts static GLuint osdDispList[MAX_OSD_PARTS]; @@ -286,6 +293,24 @@ static void clearEOSD(void) { static void do_render_osd(int); +static inline int is_tinytex(ass_image_t *i, int tinytexcur) { + return i->w < TINYTEX_SIZE && i->h < TINYTEX_SIZE && tinytexcur < TINYTEX_MAX; +} + +static inline int is_smalltex(ass_image_t *i, int smalltexcur) { + return i->w < SMALLTEX_SIZE && i->h < SMALLTEX_SIZE && smalltexcur < SMALLTEX_MAX; +} + +static inline void tinytex_pos(int tinytexcur, int *x, int *y) { + *x = (tinytexcur % TINYTEX_COLS) * TINYTEX_SIZE; + *y = (tinytexcur / TINYTEX_COLS) * TINYTEX_SIZE; +} + +static inline void smalltex_pos(int smalltexcur, int *x, int *y) { + *x = (smalltexcur % SMALLTEX_COLS) * SMALLTEX_SIZE; + *y = (smalltexcur / SMALLTEX_COLS) * SMALLTEX_SIZE; +} + /** * \brief construct display list from ass image list * \param img image list to create OSD from. @@ -311,17 +336,17 @@ static void genEOSD(mp_eosd_images_t *im if (!largeeosdtex[0]) { glGenTextures(2, largeeosdtex); BindTexture(gl_target, largeeosdtex[0]); - glCreateClearTex(gl_target, GL_ALPHA, GL_ALPHA, GL_UNSIGNED_BYTE, scale_type, 512, 512, 0); + glCreateClearTex(gl_target, GL_ALPHA, GL_ALPHA, GL_UNSIGNED_BYTE, scale_type, LARGE_EOSD_TEX_SIZE, LARGE_EOSD_TEX_SIZE, 0); BindTexture(gl_target, largeeosdtex[1]); - glCreateClearTex(gl_target, GL_ALPHA, GL_ALPHA, GL_UNSIGNED_BYTE, scale_type, 512, 512, 0); + glCreateClearTex(gl_target, GL_ALPHA, GL_ALPHA, GL_UNSIGNED_BYTE, scale_type, LARGE_EOSD_TEX_SIZE, LARGE_EOSD_TEX_SIZE, 0); } for (i = img; i; i = i->next) { if (i->w <= 0 || i->h <= 0 || i->stride < i->w) continue; - if (i->w < 16 && i->h < 16 && tinytexcur < 1024) + if (is_tinytex(i, tinytexcur)) tinytexcur++; - else if (i->w < 32 && i->h < 32 && smalltexcur < 256) + else if (is_smalltex(i, smalltexcur)) smalltexcur++; else eosdtexCnt++; @@ -339,14 +364,12 @@ static void genEOSD(mp_eosd_images_t *im mp_msg(MSGT_VO, MSGL_V, "Invalid dimensions OSD for part!\n"); continue; } - if (i->w < 16 && i->h < 16 && tinytexcur < 1024) { - x = (tinytexcur & 31) << 4; - y = (tinytexcur >> 5) << 4; + if (is_tinytex(i, tinytexcur)) { + tinytex_pos(tinytexcur, &x, &y); BindTexture(gl_target, largeeosdtex[0]); tinytexcur++; - } else if (i->w < 32 && i->h < 32 && smalltexcur < 256) { - x = (smalltexcur & 15) << 5; - y = (smalltexcur >> 4) << 5; + } else if (is_smalltex(i, smalltexcur)) { + smalltex_pos(smalltexcur, &x, &y); BindTexture(gl_target, largeeosdtex[1]); smalltexcur++; } else { @@ -366,16 +389,14 @@ skip_upload: if (i->w <= 0 || i->h <= 0 || i->stride < i->w) continue; glColor4ub(i->color >> 24, (i->color >> 16) & 0xff, (i->color >> 8) & 0xff, 255 - (i->color & 0xff)); - if (i->w < 16 && i->h < 16 && tinytexcur < 1024) { - x = (tinytexcur & 31) << 4; - y = (tinytexcur >> 5) << 4; - sx = sy = 512; + if (is_tinytex(i, tinytexcur)) { + tinytex_pos(tinytexcur, &x, &y); + sx = sy = LARGE_EOSD_TEX_SIZE; BindTexture(gl_target, largeeosdtex[0]); tinytexcur++; - } else if (i->w < 32 && i->h < 32 && smalltexcur < 256) { - x = (smalltexcur & 15) << 5; - y = (smalltexcur >> 4) << 5; - sx = sy = 512; + } else if (is_smalltex(i, smalltexcur)) { + smalltex_pos(smalltexcur, &x, &y); + sx = sy = LARGE_EOSD_TEX_SIZE; BindTexture(gl_target, largeeosdtex[1]); smalltexcur++; } else { From subversion at mplayerhq.hu Fri Mar 6 14:22:49 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 14:22:49 +0100 (CET) Subject: [MPlayer-cvslog] r28850 - in trunk/libao2: ao_dsound.c ao_win32.c Message-ID: <20090306132249.190F43B421@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 6 14:22:48 2009 New Revision: 28850 Log: The 8 bit per sample formats are unsigned on Windows, fixes playback with -af format=s8 for -ao dsound and -ao win32. Patch by Zhou Zongyi [zhouzongyi (at) pset suntec net] Modified: trunk/libao2/ao_dsound.c trunk/libao2/ao_win32.c Modified: trunk/libao2/ao_dsound.c ============================================================================== --- trunk/libao2/ao_dsound.c Fri Mar 6 13:56:13 2009 (r28849) +++ trunk/libao2/ao_dsound.c Fri Mar 6 14:22:48 2009 (r28850) @@ -431,7 +431,7 @@ static int init(int rate, int channels, case AF_FORMAT_AC3: case AF_FORMAT_S24_LE: case AF_FORMAT_S16_LE: - case AF_FORMAT_S8: + case AF_FORMAT_U8: break; default: mp_msg(MSGT_AO, MSGL_V,"ao_dsound: format %s not supported defaulting to Signed 16-bit Little-Endian\n",af_fmt2str_short(format)); Modified: trunk/libao2/ao_win32.c ============================================================================== --- trunk/libao2/ao_win32.c Fri Mar 6 13:56:13 2009 (r28849) +++ trunk/libao2/ao_win32.c Fri Mar 6 14:22:48 2009 (r28850) @@ -155,7 +155,7 @@ static int init(int rate,int channels,in case AF_FORMAT_AC3: case AF_FORMAT_S24_LE: case AF_FORMAT_S16_LE: - case AF_FORMAT_S8: + case AF_FORMAT_U8: break; default: mp_msg(MSGT_AO, MSGL_V,"ao_win32: format %s not supported defaulting to Signed 16-bit Little-Endian\n",af_fmt2str_short(format)); From subversion at mplayerhq.hu Fri Mar 6 17:27:32 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 17:27:32 +0100 (CET) Subject: [MPlayer-cvslog] r28852 - trunk/libao2/ao_win32.c Message-ID: <20090306162732.5D1DA3B61F@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 6 17:27:31 2009 New Revision: 28852 Log: Use calloc instead of malloc+memset Modified: trunk/libao2/ao_win32.c Modified: trunk/libao2/ao_win32.c ============================================================================== --- trunk/libao2/ao_win32.c Fri Mar 6 16:52:48 2009 (r28851) +++ trunk/libao2/ao_win32.c Fri Mar 6 17:27:31 2009 (r28852) @@ -146,7 +146,6 @@ static int control(int cmd,void *arg) static int init(int rate,int channels,int format,int flags) { WAVEFORMATEXTENSIBLE wformat; - DWORD totalBufferSize = (BUFFER_SIZE + sizeof(WAVEHDR)) * BUFFER_COUNT; MMRESULT result; unsigned char* buffer; int i; @@ -231,8 +230,7 @@ static int init(int rate,int channels,in return 0; } //allocate buffer memory as one big block - buffer = malloc(totalBufferSize); - memset(buffer,0x0,totalBufferSize); + buffer = calloc(BUFFER_COUNT, BUFFER_SIZE + sizeof(WAVEHDR)); //and setup pointers to each buffer waveBlocks = (WAVEHDR*)buffer; buffer += sizeof(WAVEHDR) * BUFFER_COUNT; From subversion at mplayerhq.hu Fri Mar 6 19:50:50 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 19:50:50 +0100 (CET) Subject: [MPlayer-cvslog] r28853 - trunk/libao2/ao_win32.c Message-ID: <20090306185050.A53D53B797@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 6 19:50:50 2009 New Revision: 28853 Log: Always write full buffers in ao_win32, except for the last block. Modified: trunk/libao2/ao_win32.c Modified: trunk/libao2/ao_win32.c ============================================================================== --- trunk/libao2/ao_win32.c Fri Mar 6 17:27:31 2009 (r28852) +++ trunk/libao2/ao_win32.c Fri Mar 6 19:50:50 2009 (r28853) @@ -172,6 +172,7 @@ static int init(int rate,int channels,in ao_data.bps=channels*rate; if(format != AF_FORMAT_U8 && format != AF_FORMAT_S8) ao_data.bps*=2; + ao_data.outburst = BUFFER_SIZE; if(ao_data.buffersize==-1) { ao_data.buffersize=af_fmt2bits(format)/8; @@ -298,22 +299,18 @@ static int write_waveOutBuffer(unsigned //unprepare the header if it is prepared if(current->dwFlags & WHDR_PREPARED) waveOutUnprepareHeader(hWaveOut, current, sizeof(WAVEHDR)); - x=BUFFER_SIZE-buf_write_pos; + x=BUFFER_SIZE; if(x>len) x=len; fast_memcpy(current->lpData+buf_write_pos,data+len2,x); - if(buf_write_pos==0)full_buffers++; + full_buffers++; len2+=x; len-=x; - buffered_bytes+=x; buf_write_pos+=x; + buffered_bytes+=x; //prepare header and write data to device - current->dwBufferLength = buf_write_pos; + current->dwBufferLength = x; waveOutPrepareHeader(hWaveOut, current, sizeof(WAVEHDR)); waveOutWrite(hWaveOut, current, sizeof(WAVEHDR)); - if(buf_write_pos>=BUFFER_SIZE){ //buffer is full find next - // block is full, find next! buf_write=(buf_write+1)%BUFFER_COUNT; - buf_write_pos=0; - } } return len2; } From subversion at mplayerhq.hu Fri Mar 6 19:53:29 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 19:53:29 +0100 (CET) Subject: [MPlayer-cvslog] r28854 - trunk/libao2/ao_win32.c Message-ID: <20090306185329.B0D733B797@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 6 19:53:29 2009 New Revision: 28854 Log: Remove now unused buf_write_pos variable from ao_win32 Modified: trunk/libao2/ao_win32.c Modified: trunk/libao2/ao_win32.c ============================================================================== --- trunk/libao2/ao_win32.c Fri Mar 6 19:50:50 2009 (r28853) +++ trunk/libao2/ao_win32.c Fri Mar 6 19:53:29 2009 (r28854) @@ -87,7 +87,6 @@ static const int channel_mask[] = { static WAVEHDR* waveBlocks; //pointer to our ringbuffer memory static HWAVEOUT hWaveOut; //handle to the waveout device static unsigned int buf_write=0; -static unsigned int buf_write_pos=0; static volatile int full_buffers=0; static volatile int buffered_bytes=0; @@ -240,7 +239,6 @@ static int init(int rate,int channels,in buffer += BUFFER_SIZE; } buf_write=0; - buf_write_pos=0; full_buffers=0; buffered_bytes=0; @@ -265,7 +263,6 @@ static void reset(void) { waveOutReset(hWaveOut); buf_write=0; - buf_write_pos=0; full_buffers=0; buffered_bytes=0; } @@ -301,7 +298,7 @@ static int write_waveOutBuffer(unsigned waveOutUnprepareHeader(hWaveOut, current, sizeof(WAVEHDR)); x=BUFFER_SIZE; if(x>len) x=len; - fast_memcpy(current->lpData+buf_write_pos,data+len2,x); + fast_memcpy(current->lpData,data+len2,x); full_buffers++; len2+=x; len-=x; buffered_bytes+=x; From subversion at mplayerhq.hu Fri Mar 6 20:07:50 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 20:07:50 +0100 (CET) Subject: [MPlayer-cvslog] r28855 - trunk/libao2/ao_win32.c Message-ID: <20090306190750.C0B175C02C@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 6 20:07:50 2009 New Revision: 28855 Log: get rid of full_buffers variable, if the check it is used for is triggered something is seriously wrong and the ao will not work right anyway. Modified: trunk/libao2/ao_win32.c Modified: trunk/libao2/ao_win32.c ============================================================================== --- trunk/libao2/ao_win32.c Fri Mar 6 19:53:29 2009 (r28854) +++ trunk/libao2/ao_win32.c Fri Mar 6 20:07:50 2009 (r28855) @@ -87,7 +87,6 @@ static const int channel_mask[] = { static WAVEHDR* waveBlocks; //pointer to our ringbuffer memory static HWAVEOUT hWaveOut; //handle to the waveout device static unsigned int buf_write=0; -static volatile int full_buffers=0; static volatile int buffered_bytes=0; @@ -106,12 +105,7 @@ static void CALLBACK waveOutProc(HWAVEOU { if(uMsg != WOM_DONE) return; - if (full_buffers) { buffered_bytes-=BUFFER_SIZE; - --full_buffers; - } else { - buffered_bytes=0; - } } // to set/get/query special features/parameters @@ -239,7 +233,6 @@ static int init(int rate,int channels,in buffer += BUFFER_SIZE; } buf_write=0; - full_buffers=0; buffered_bytes=0; return 1; @@ -263,7 +256,6 @@ static void reset(void) { waveOutReset(hWaveOut); buf_write=0; - full_buffers=0; buffered_bytes=0; } @@ -299,7 +291,6 @@ static int write_waveOutBuffer(unsigned x=BUFFER_SIZE; if(x>len) x=len; fast_memcpy(current->lpData,data+len2,x); - full_buffers++; len2+=x; len-=x; buffered_bytes+=x; //prepare header and write data to device From subversion at mplayerhq.hu Fri Mar 6 20:10:54 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 20:10:54 +0100 (CET) Subject: [MPlayer-cvslog] r28856 - trunk/libao2/ao_win32.c Message-ID: <20090306191055.08B063B2A7@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 6 20:10:54 2009 New Revision: 28856 Log: Cosmetics: get rid of trailing whitespace. Modified: trunk/libao2/ao_win32.c Modified: trunk/libao2/ao_win32.c ============================================================================== --- trunk/libao2/ao_win32.c Fri Mar 6 20:07:50 2009 (r28855) +++ trunk/libao2/ao_win32.c Fri Mar 6 20:10:54 2009 (r28856) @@ -90,7 +90,7 @@ static unsigned int buf_write=0; static volatile int buffered_bytes=0; -static ao_info_t info = +static ao_info_t info = { "Windows waveOut audio output", "win32", @@ -100,7 +100,7 @@ static ao_info_t info = LIBAO_EXTERN(win32) -static void CALLBACK waveOutProc(HWAVEOUT hWaveOut,UINT uMsg,DWORD dwInstance, +static void CALLBACK waveOutProc(HWAVEOUT hWaveOut,UINT uMsg,DWORD dwInstance, DWORD dwParam1,DWORD dwParam2) { if(uMsg != WOM_DONE) @@ -138,11 +138,11 @@ static int control(int cmd,void *arg) // return: 1=success 0=fail static int init(int rate,int channels,int format,int flags) { - WAVEFORMATEXTENSIBLE wformat; + WAVEFORMATEXTENSIBLE wformat; MMRESULT result; unsigned char* buffer; int i; - + switch(format){ case AF_FORMAT_AC3: case AF_FORMAT_S24_LE: @@ -152,13 +152,13 @@ static int init(int rate,int channels,in default: mp_msg(MSGT_AO, MSGL_V,"ao_win32: format %s not supported defaulting to Signed 16-bit Little-Endian\n",af_fmt2str_short(format)); format=AF_FORMAT_S16_LE; - } + } // FIXME multichannel mode is buggy if(channels > 2) channels = 2; - - //fill global ao_data + + //fill global ao_data ao_data.channels=channels; ao_data.samplerate=rate; ao_data.format=format; @@ -174,22 +174,22 @@ static int init(int rate,int channels,in } mp_msg(MSGT_AO, MSGL_V,"ao_win32: Samplerate:%iHz Channels:%i Format:%s\n",rate, channels, af_fmt2str_short(format)); mp_msg(MSGT_AO, MSGL_V,"ao_win32: Buffersize:%d\n",ao_data.buffersize); - + //fill waveformatex ZeroMemory( &wformat, sizeof(WAVEFORMATEXTENSIBLE)); wformat.Format.cbSize = (channels>2)?sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX):0; - wformat.Format.nChannels = channels; - wformat.Format.nSamplesPerSec = rate; + wformat.Format.nChannels = channels; + wformat.Format.nSamplesPerSec = rate; if(format == AF_FORMAT_AC3) { wformat.Format.wFormatTag = WAVE_FORMAT_DOLBY_AC3_SPDIF; wformat.Format.wBitsPerSample = 16; wformat.Format.nBlockAlign = 4; } - else + else { wformat.Format.wFormatTag = (channels>2)?WAVE_FORMAT_EXTENSIBLE:WAVE_FORMAT_PCM; - wformat.Format.wBitsPerSample = af_fmt2bits(format); + wformat.Format.wBitsPerSample = af_fmt2bits(format); wformat.Format.nBlockAlign = wformat.Format.nChannels * (wformat.Format.wBitsPerSample >> 3); } if(channels>2) @@ -198,9 +198,9 @@ static int init(int rate,int channels,in wformat.SubFormat = KSDATAFORMAT_SUBTYPE_PCM; wformat.Samples.wValidBitsPerSample=af_fmt2bits(format); } - + wformat.Format.nAvgBytesPerSec = wformat.Format.nSamplesPerSec * wformat.Format.nBlockAlign; - + //open sound device //WAVE_MAPPER always points to the default wave device on the system result = waveOutOpen(&hWaveOut,WAVE_MAPPER,(WAVEFORMATEX*)&wformat,(DWORD_PTR)waveOutProc,0,CALLBACK_FUNCTION); @@ -225,7 +225,7 @@ static int init(int rate,int channels,in } //allocate buffer memory as one big block buffer = calloc(BUFFER_COUNT, BUFFER_SIZE + sizeof(WAVEHDR)); - //and setup pointers to each buffer + //and setup pointers to each buffer waveBlocks = (WAVEHDR*)buffer; buffer += sizeof(WAVEHDR) * BUFFER_COUNT; for(i = 0; i < BUFFER_COUNT; i++) { @@ -282,23 +282,23 @@ static int write_waveOutBuffer(unsigned WAVEHDR* current; int len2=0; int x; - while(len>0){ + while(len>0){ current = &waveBlocks[buf_write]; if(buffered_bytes==BUFFER_COUNT*BUFFER_SIZE) break; //unprepare the header if it is prepared - if(current->dwFlags & WHDR_PREPARED) + if(current->dwFlags & WHDR_PREPARED) waveOutUnprepareHeader(hWaveOut, current, sizeof(WAVEHDR)); - x=BUFFER_SIZE; - if(x>len) x=len; - fast_memcpy(current->lpData,data+len2,x); - len2+=x; len-=x; + x=BUFFER_SIZE; + if(x>len) x=len; + fast_memcpy(current->lpData,data+len2,x); + len2+=x; len-=x; buffered_bytes+=x; //prepare header and write data to device current->dwBufferLength = x; waveOutPrepareHeader(hWaveOut, current, sizeof(WAVEHDR)); waveOutWrite(hWaveOut, current, sizeof(WAVEHDR)); - - buf_write=(buf_write+1)%BUFFER_COUNT; + + buf_write=(buf_write+1)%BUFFER_COUNT; } return len2; } From subversion at mplayerhq.hu Fri Mar 6 20:23:24 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 20:23:24 +0100 (CET) Subject: [MPlayer-cvslog] r28857 - trunk/libao2/ao_win32.c Message-ID: <20090306192324.D00BF3B546@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 6 20:23:24 2009 New Revision: 28857 Log: Use code that is actually thread-safe to calculate delay, free space etc. in ao_win32 Modified: trunk/libao2/ao_win32.c Modified: trunk/libao2/ao_win32.c ============================================================================== --- trunk/libao2/ao_win32.c Fri Mar 6 20:10:54 2009 (r28856) +++ trunk/libao2/ao_win32.c Fri Mar 6 20:23:24 2009 (r28857) @@ -87,7 +87,7 @@ static const int channel_mask[] = { static WAVEHDR* waveBlocks; //pointer to our ringbuffer memory static HWAVEOUT hWaveOut; //handle to the waveout device static unsigned int buf_write=0; -static volatile int buffered_bytes=0; +static volatile int buf_read=0; static ao_info_t info = @@ -105,7 +105,7 @@ static void CALLBACK waveOutProc(HWAVEOU { if(uMsg != WOM_DONE) return; - buffered_bytes-=BUFFER_SIZE; + buf_read = (buf_read + 1) % BUFFER_COUNT; } // to set/get/query special features/parameters @@ -233,7 +233,7 @@ static int init(int rate,int channels,in buffer += BUFFER_SIZE; } buf_write=0; - buffered_bytes=0; + buf_read=0; return 1; } @@ -243,7 +243,6 @@ static void uninit(int immed) { if(!immed) usec_sleep(get_delay() * 1000 * 1000); - else buffered_bytes=0; waveOutReset(hWaveOut); waveOutClose(hWaveOut); mp_msg(MSGT_AO, MSGL_V,"waveOut device closed\n"); @@ -256,7 +255,7 @@ static void reset(void) { waveOutReset(hWaveOut); buf_write=0; - buffered_bytes=0; + buf_read=0; } // stop playing, keep buffers (for pause) @@ -274,7 +273,9 @@ static void audio_resume(void) // return: how many bytes can be played without blocking static int get_space(void) { - return BUFFER_COUNT*BUFFER_SIZE - buffered_bytes; + int free = buf_read - buf_write - 1; + if (free < 0) free += BUFFER_COUNT; + return free * BUFFER_SIZE; } //writes data into buffer, based on ringbuffer code in ao_sdl.c @@ -283,8 +284,9 @@ static int write_waveOutBuffer(unsigned int len2=0; int x; while(len>0){ + int buf_next = (buf_write + 1) % BUFFER_COUNT; current = &waveBlocks[buf_write]; - if(buffered_bytes==BUFFER_COUNT*BUFFER_SIZE) break; + if(buf_next == buf_read) break; //unprepare the header if it is prepared if(current->dwFlags & WHDR_PREPARED) waveOutUnprepareHeader(hWaveOut, current, sizeof(WAVEHDR)); @@ -292,13 +294,12 @@ static int write_waveOutBuffer(unsigned if(x>len) x=len; fast_memcpy(current->lpData,data+len2,x); len2+=x; len-=x; - buffered_bytes+=x; //prepare header and write data to device current->dwBufferLength = x; waveOutPrepareHeader(hWaveOut, current, sizeof(WAVEHDR)); waveOutWrite(hWaveOut, current, sizeof(WAVEHDR)); - buf_write=(buf_write+1)%BUFFER_COUNT; + buf_write = buf_next; } return len2; } @@ -316,5 +317,7 @@ static int play(void* data,int len,int f // return: delay in seconds between first and last sample in buffer static float get_delay(void) { - return (float)(buffered_bytes + ao_data.buffersize)/(float)ao_data.bps; + int used = buf_write - buf_read; + if (used < 0) used += BUFFER_COUNT; + return (float)(used * BUFFER_SIZE + ao_data.buffersize)/(float)ao_data.bps; } From subversion at mplayerhq.hu Fri Mar 6 20:43:12 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 20:43:12 +0100 (CET) Subject: [MPlayer-cvslog] r28858 - in trunk/libao2: ao_alsa.c ao_alsa5.c ao_arts.c ao_dart.c ao_dsound.c ao_dxr2.c ao_esd.c ao_ivtv.c ao_jack.c ao_macosx.c ao_mpegpes.c ao_nas.c ao_null.c ao_openal.c ao_oss.c ao_pcm.c ao_pu... Message-ID: <20090306194312.CBBFF3B63B@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 6 20:43:12 2009 New Revision: 28858 Log: Make ao_info_t structs const. Modified: trunk/libao2/ao_alsa.c trunk/libao2/ao_alsa5.c trunk/libao2/ao_arts.c trunk/libao2/ao_dart.c trunk/libao2/ao_dsound.c trunk/libao2/ao_dxr2.c trunk/libao2/ao_esd.c trunk/libao2/ao_ivtv.c trunk/libao2/ao_jack.c trunk/libao2/ao_macosx.c trunk/libao2/ao_mpegpes.c trunk/libao2/ao_nas.c trunk/libao2/ao_null.c trunk/libao2/ao_openal.c trunk/libao2/ao_oss.c trunk/libao2/ao_pcm.c trunk/libao2/ao_pulse.c trunk/libao2/ao_sdl.c trunk/libao2/ao_sgi.c trunk/libao2/ao_sun.c trunk/libao2/ao_v4l2.c trunk/libao2/ao_win32.c trunk/libao2/audio_out.h Modified: trunk/libao2/ao_alsa.c ============================================================================== --- trunk/libao2/ao_alsa.c Fri Mar 6 20:23:24 2009 (r28857) +++ trunk/libao2/ao_alsa.c Fri Mar 6 20:43:12 2009 (r28858) @@ -57,7 +57,7 @@ #include "audio_out_internal.h" #include "libaf/af_format.h" -static ao_info_t info = +static const ao_info_t info = { "ALSA-0.9.x-1.x audio output", "alsa", Modified: trunk/libao2/ao_alsa5.c ============================================================================== --- trunk/libao2/ao_alsa5.c Fri Mar 6 20:23:24 2009 (r28857) +++ trunk/libao2/ao_alsa5.c Fri Mar 6 20:43:12 2009 (r28858) @@ -32,7 +32,7 @@ #include "mp_msg.h" #include "help_mp.h" -static ao_info_t info = +static const ao_info_t info = { "ALSA-0.5.x audio output", "alsa5", Modified: trunk/libao2/ao_arts.c ============================================================================== --- trunk/libao2/ao_arts.c Fri Mar 6 20:23:24 2009 (r28857) +++ trunk/libao2/ao_arts.c Fri Mar 6 20:43:12 2009 (r28858) @@ -38,7 +38,7 @@ static arts_stream_t stream; -static ao_info_t info = +static const ao_info_t info = { "aRts audio output", "arts", Modified: trunk/libao2/ao_dart.c ============================================================================== --- trunk/libao2/ao_dart.c Fri Mar 6 20:23:24 2009 (r28857) +++ trunk/libao2/ao_dart.c Fri Mar 6 20:43:12 2009 (r28858) @@ -39,7 +39,7 @@ #include "libvo/fastmemcpy.h" #include "subopt-helper.h" -static ao_info_t info = { +static const ao_info_t info = { "DART audio output", "dart", "KO Myung-Hun ", Modified: trunk/libao2/ao_dsound.c ============================================================================== --- trunk/libao2/ao_dsound.c Fri Mar 6 20:23:24 2009 (r28857) +++ trunk/libao2/ao_dsound.c Fri Mar 6 20:43:12 2009 (r28858) @@ -42,7 +42,7 @@ #include "subopt-helper.h" -static ao_info_t info = +static const ao_info_t info = { "Windows DirectSound audio output", "dsound", Modified: trunk/libao2/ao_dxr2.c ============================================================================== --- trunk/libao2/ao_dxr2.c Fri Mar 6 20:23:24 2009 (r28857) +++ trunk/libao2/ao_dxr2.c Fri Mar 6 20:43:12 2009 (r28858) @@ -36,7 +36,7 @@ #include "libmpdemux/mpeg_packetizer.h" -static ao_info_t info = +static const ao_info_t info = { "DXR2 audio output", "dxr2", Modified: trunk/libao2/ao_esd.c ============================================================================== --- trunk/libao2/ao_esd.c Fri Mar 6 20:23:24 2009 (r28857) +++ trunk/libao2/ao_esd.c Fri Mar 6 20:43:12 2009 (r28858) @@ -67,7 +67,7 @@ #define ESD_CLIENT_NAME "MPlayer" #define ESD_MAX_DELAY (1.0f) /* max amount of data buffered in esd (#sec) */ -static ao_info_t info = +static const ao_info_t info = { "EsounD audio output", "esd", Modified: trunk/libao2/ao_ivtv.c ============================================================================== --- trunk/libao2/ao_ivtv.c Fri Mar 6 20:23:24 2009 (r28857) +++ trunk/libao2/ao_ivtv.c Fri Mar 6 20:43:12 2009 (r28858) @@ -41,7 +41,7 @@ static int freq = 0; -static ao_info_t info = +static const ao_info_t info = { "IVTV MPEG Audio Decoder output", "ivtv", Modified: trunk/libao2/ao_jack.c ============================================================================== --- trunk/libao2/ao_jack.c Fri Mar 6 20:23:24 2009 (r28857) +++ trunk/libao2/ao_jack.c Fri Mar 6 20:43:12 2009 (r28858) @@ -40,7 +40,7 @@ #include -static ao_info_t info = +static const ao_info_t info = { "JACK audio output", "jack", Modified: trunk/libao2/ao_macosx.c ============================================================================== --- trunk/libao2/ao_macosx.c Fri Mar 6 20:23:24 2009 (r28857) +++ trunk/libao2/ao_macosx.c Fri Mar 6 20:43:12 2009 (r28858) @@ -53,7 +53,7 @@ #include "libaf/af_format.h" #include "osdep/timer.h" -static ao_info_t info = +static const ao_info_t info = { "Darwin/Mac OS X native audio output", "macosx", Modified: trunk/libao2/ao_mpegpes.c ============================================================================== --- trunk/libao2/ao_mpegpes.c Fri Mar 6 20:23:24 2009 (r28857) +++ trunk/libao2/ao_mpegpes.c Fri Mar 6 20:43:12 2009 (r28858) @@ -63,7 +63,7 @@ int vo_mpegpes_fd2 = -1; #include -static ao_info_t info = +static const ao_info_t info = { #ifdef CONFIG_DVB "DVB audio output", Modified: trunk/libao2/ao_nas.c ============================================================================== --- trunk/libao2/ao_nas.c Fri Mar 6 20:23:24 2009 (r28857) +++ trunk/libao2/ao_nas.c Fri Mar 6 20:43:12 2009 (r28858) @@ -119,7 +119,7 @@ static const char* nas_state(unsigned in return nas_states[state]; } -static ao_info_t info = +static const ao_info_t info = { "NAS audio output", "nas", Modified: trunk/libao2/ao_null.c ============================================================================== --- trunk/libao2/ao_null.c Fri Mar 6 20:23:24 2009 (r28857) +++ trunk/libao2/ao_null.c Fri Mar 6 20:43:12 2009 (r28858) @@ -27,7 +27,7 @@ #include "audio_out.h" #include "audio_out_internal.h" -static ao_info_t info = +static const ao_info_t info = { "Null audio output", "null", Modified: trunk/libao2/ao_openal.c ============================================================================== --- trunk/libao2/ao_openal.c Fri Mar 6 20:23:24 2009 (r28857) +++ trunk/libao2/ao_openal.c Fri Mar 6 20:43:12 2009 (r28858) @@ -42,7 +42,7 @@ #include "osdep/timer.h" #include "subopt-helper.h" -static ao_info_t info = +static const ao_info_t info = { "OpenAL audio output", "openal", Modified: trunk/libao2/ao_oss.c ============================================================================== --- trunk/libao2/ao_oss.c Fri Mar 6 20:23:24 2009 (r28857) +++ trunk/libao2/ao_oss.c Fri Mar 6 20:43:12 2009 (r28858) @@ -48,7 +48,7 @@ #include "audio_out.h" #include "audio_out_internal.h" -static ao_info_t info = +static const ao_info_t info = { "OSS/ioctl audio output", "oss", Modified: trunk/libao2/ao_pcm.c ============================================================================== --- trunk/libao2/ao_pcm.c Fri Mar 6 20:23:24 2009 (r28857) +++ trunk/libao2/ao_pcm.c Fri Mar 6 20:43:12 2009 (r28858) @@ -35,7 +35,7 @@ #include "help_mp.h" -static ao_info_t info = +static const ao_info_t info = { "RAW PCM/WAVE file writer audio output", "pcm", Modified: trunk/libao2/ao_pulse.c ============================================================================== --- trunk/libao2/ao_pulse.c Fri Mar 6 20:23:24 2009 (r28857) +++ trunk/libao2/ao_pulse.c Fri Mar 6 20:43:12 2009 (r28858) @@ -33,7 +33,7 @@ #define PULSE_CLIENT_NAME "MPlayer" /** General driver info */ -static ao_info_t info = { +static const ao_info_t info = { "PulseAudio audio output", "pulse", "Lennart Poettering", Modified: trunk/libao2/ao_sdl.c ============================================================================== --- trunk/libao2/ao_sdl.c Fri Mar 6 20:23:24 2009 (r28857) +++ trunk/libao2/ao_sdl.c Fri Mar 6 20:43:12 2009 (r28858) @@ -38,7 +38,7 @@ #include "libvo/fastmemcpy.h" -static ao_info_t info = +static const ao_info_t info = { "SDLlib audio output", "sdl", Modified: trunk/libao2/ao_sgi.c ============================================================================== --- trunk/libao2/ao_sgi.c Fri Mar 6 20:23:24 2009 (r28857) +++ trunk/libao2/ao_sgi.c Fri Mar 6 20:43:12 2009 (r28858) @@ -32,7 +32,7 @@ #include "help_mp.h" #include "libaf/af_format.h" -static ao_info_t info = +static const ao_info_t info = { "sgi audio output", "sgi", Modified: trunk/libao2/ao_sun.c ============================================================================== --- trunk/libao2/ao_sun.c Fri Mar 6 20:23:24 2009 (r28857) +++ trunk/libao2/ao_sun.c Fri Mar 6 20:43:12 2009 (r28858) @@ -49,7 +49,7 @@ #include "mp_msg.h" #include "help_mp.h" -static ao_info_t info = +static const ao_info_t info = { "Sun audio output", "sun", Modified: trunk/libao2/ao_v4l2.c ============================================================================== --- trunk/libao2/ao_v4l2.c Fri Mar 6 20:23:24 2009 (r28857) +++ trunk/libao2/ao_v4l2.c Fri Mar 6 20:43:12 2009 (r28858) @@ -38,7 +38,7 @@ static int freq = 0; -static ao_info_t info = +static const ao_info_t info = { "V4L2 MPEG Audio Decoder output", "v4l2", Modified: trunk/libao2/ao_win32.c ============================================================================== --- trunk/libao2/ao_win32.c Fri Mar 6 20:23:24 2009 (r28857) +++ trunk/libao2/ao_win32.c Fri Mar 6 20:43:12 2009 (r28858) @@ -90,7 +90,7 @@ static unsigned int buf_write=0; static volatile int buf_read=0; -static ao_info_t info = +static const ao_info_t info = { "Windows waveOut audio output", "win32", Modified: trunk/libao2/audio_out.h ============================================================================== --- trunk/libao2/audio_out.h Fri Mar 6 20:23:24 2009 (r28857) +++ trunk/libao2/audio_out.h Fri Mar 6 20:43:12 2009 (r28858) @@ -34,7 +34,7 @@ typedef struct ao_info_s /* interface towards mplayer and */ typedef struct ao_functions_s { - ao_info_t *info; + const ao_info_t *info; int (*control)(int cmd,void *arg); int (*init)(int rate,int channels,int format,int flags); void (*uninit)(int immed); From subversion at mplayerhq.hu Fri Mar 6 20:58:16 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 20:58:16 +0100 (CET) Subject: [MPlayer-cvslog] r28859 - in trunk/libao2: audio_out.c audio_out_internal.h Message-ID: <20090306195817.032903B645@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 6 20:58:16 2009 New Revision: 28859 Log: Make audio_out_* structs const so they end up in .rodata Modified: trunk/libao2/audio_out.c trunk/libao2/audio_out_internal.h Modified: trunk/libao2/audio_out.c ============================================================================== --- trunk/libao2/audio_out.c Fri Mar 6 20:43:12 2009 (r28858) +++ trunk/libao2/audio_out.c Fri Mar 6 20:58:16 2009 (r28859) @@ -31,29 +31,29 @@ ao_data_t ao_data={0,0,0,0,OUTBURST,-1,0}; char *ao_subdevice = NULL; -extern ao_functions_t audio_out_oss; -extern ao_functions_t audio_out_macosx; -extern ao_functions_t audio_out_arts; -extern ao_functions_t audio_out_esd; -extern ao_functions_t audio_out_pulse; -extern ao_functions_t audio_out_jack; -extern ao_functions_t audio_out_openal; -extern ao_functions_t audio_out_null; -extern ao_functions_t audio_out_alsa5; -extern ao_functions_t audio_out_alsa; -extern ao_functions_t audio_out_nas; -extern ao_functions_t audio_out_sdl; -extern ao_functions_t audio_out_sun; -extern ao_functions_t audio_out_sgi; -extern ao_functions_t audio_out_win32; -extern ao_functions_t audio_out_dsound; -extern ao_functions_t audio_out_dart; -extern ao_functions_t audio_out_dxr2; -extern ao_functions_t audio_out_ivtv; -extern ao_functions_t audio_out_v4l2; -extern ao_functions_t audio_out_mpegpes; -extern ao_functions_t audio_out_pcm; -extern ao_functions_t audio_out_pss; +extern const ao_functions_t audio_out_oss; +extern const ao_functions_t audio_out_macosx; +extern const ao_functions_t audio_out_arts; +extern const ao_functions_t audio_out_esd; +extern const ao_functions_t audio_out_pulse; +extern const ao_functions_t audio_out_jack; +extern const ao_functions_t audio_out_openal; +extern const ao_functions_t audio_out_null; +extern const ao_functions_t audio_out_alsa5; +extern const ao_functions_t audio_out_alsa; +extern const ao_functions_t audio_out_nas; +extern const ao_functions_t audio_out_sdl; +extern const ao_functions_t audio_out_sun; +extern const ao_functions_t audio_out_sgi; +extern const ao_functions_t audio_out_win32; +extern const ao_functions_t audio_out_dsound; +extern const ao_functions_t audio_out_dart; +extern const ao_functions_t audio_out_dxr2; +extern const ao_functions_t audio_out_ivtv; +extern const ao_functions_t audio_out_v4l2; +extern const ao_functions_t audio_out_mpegpes; +extern const ao_functions_t audio_out_pcm; +extern const ao_functions_t audio_out_pss; const ao_functions_t* const audio_out_drivers[] = { Modified: trunk/libao2/audio_out_internal.h ============================================================================== --- trunk/libao2/audio_out_internal.h Fri Mar 6 20:43:12 2009 (r28858) +++ trunk/libao2/audio_out_internal.h Fri Mar 6 20:58:16 2009 (r28859) @@ -31,7 +31,7 @@ static float get_delay(void); static void audio_pause(void); static void audio_resume(void); -#define LIBAO_EXTERN(x) ao_functions_t audio_out_##x =\ +#define LIBAO_EXTERN(x) const ao_functions_t audio_out_##x =\ {\ &info,\ control,\ From subversion at mplayerhq.hu Fri Mar 6 21:20:12 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 21:20:12 +0100 (CET) Subject: [MPlayer-cvslog] r28861 - in trunk/libmpcodecs: vd.c vd.h Message-ID: <20090306202012.98BE83B67D@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 6 21:20:12 2009 New Revision: 28861 Log: Add some "const" to mpcodecs_vd_drivers Modified: trunk/libmpcodecs/vd.c trunk/libmpcodecs/vd.h Modified: trunk/libmpcodecs/vd.c ============================================================================== --- trunk/libmpcodecs/vd.c Fri Mar 6 21:11:23 2009 (r28860) +++ trunk/libmpcodecs/vd.c Fri Mar 6 21:20:12 2009 (r28861) @@ -53,7 +53,7 @@ extern vd_functions_t mpcodecs_vd_qtvide * decoder, add it to libavcodec, except for wrappers around external * libraries and decoders requiring binary support. */ -vd_functions_t* mpcodecs_vd_drivers[] = { +const vd_functions_t * const mpcodecs_vd_drivers[] = { &mpcodecs_vd_null, #ifdef CONFIG_LIBAVCODEC &mpcodecs_vd_ffmpeg, Modified: trunk/libmpcodecs/vd.h ============================================================================== --- trunk/libmpcodecs/vd.h Fri Mar 6 21:11:23 2009 (r28860) +++ trunk/libmpcodecs/vd.h Fri Mar 6 21:20:12 2009 (r28861) @@ -18,7 +18,7 @@ typedef struct vd_functions_s } vd_functions_t; // NULL terminated array of all drivers -extern vd_functions_t* mpcodecs_vd_drivers[]; +extern const vd_functions_t * const mpcodecs_vd_drivers[]; extern int vd_use_slices; From subversion at mplayerhq.hu Fri Mar 6 21:41:02 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Mar 2009 21:41:02 +0100 (CET) Subject: [MPlayer-cvslog] r28862 - in trunk: subopt-helper.c subopt-helper.h Message-ID: <20090306204102.8B4D13B691@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 6 21:41:02 2009 New Revision: 28862 Log: Get rid of the "set" member of the subopt-parser struct, it made it impossible to make the those struct variables const. Also it is not really useful, and wastes space. Modified: trunk/subopt-helper.c trunk/subopt-helper.h Modified: trunk/subopt-helper.c ============================================================================== --- trunk/subopt-helper.c Fri Mar 6 21:20:12 2009 (r28861) +++ trunk/subopt-helper.c Fri Mar 6 21:41:02 2009 (r28862) @@ -45,18 +45,11 @@ static char const * parse_float( char co * else a non-zero value is returned. * */ -int subopt_parse( char const * const str, opt_t * opts ) +int subopt_parse( char const * const str, const opt_t * opts ) { int parse_err = 0, idx; unsigned int parse_pos = 0; - /* Initialize set member to false. * - * It is set to true if it was found in str */ - for ( idx=0; opts[idx].name; ++idx ) - { - opts[idx].set = 0; - } - if ( str ) { while ( str[parse_pos] && !parse_err ) @@ -101,7 +94,7 @@ int subopt_parse( char const * const str if( strncmp( &str[parse_pos], opts[idx].name, opt_len ) == 0 ) { /* option was found */ - opts[idx].set = 1; next = 1; + next = 1; assert( opts[idx].valp && "Need a pointer to store the arg!" ); @@ -196,7 +189,7 @@ else if ( substr_len == opt_len+2 ) strncmp( &str[parse_pos+2], opts[idx].name, opt_len ) == 0 ) { /* option was found but negated */ - opts[idx].set = 1; next = 1; + next = 1; /* set arg to false */ *((int *)(opts[idx].valp)) = 0; Modified: trunk/subopt-helper.h ============================================================================== --- trunk/subopt-helper.h Fri Mar 6 21:20:12 2009 (r28861) +++ trunk/subopt-helper.h Fri Mar 6 21:41:02 2009 (r28862) @@ -24,13 +24,10 @@ typedef struct opt_s int type; ///< option type as defined in subopt-helper.h void * valp; ///< pointer to the mem where the value should be stored opt_test_f test; ///< argument test func ( optional ) - int set; ///< Is set internally by the parser if the option was found. - ///< Don't use it at initialization of your opts, it will be - ///< overriden anyway! } opt_t; /** parses the string for the options specified in opt */ -int subopt_parse( char const * const str, opt_t * opts ); +int subopt_parse( char const * const str, const opt_t * opts ); /*------------------ arg specific types and declaration -------------------*/ From subversion at mplayerhq.hu Sat Mar 7 09:51:41 2009 From: subversion at mplayerhq.hu (reimar) Date: Sat, 7 Mar 2009 09:51:41 +0100 (CET) Subject: [MPlayer-cvslog] r28863 - in trunk/libvo: vo_aa.c vo_directfb2.c vo_gif89a.c vo_gl.c vo_gl2.c vo_ivtv.c vo_jpeg.c vo_md5sum.c vo_png.c vo_pnm.c vo_sdl.c vo_v4l2.c vo_vdpau.c vo_xv.c vo_xvmc.c vo_yuv4mpeg.c vo_zr2.c Message-ID: <20090307085141.874484E00C@natsuki.mplayerhq.hu> Author: reimar Date: Sat Mar 7 09:51:40 2009 New Revision: 28863 Log: Make data related to suboption parsing const in libvo Modified: trunk/libvo/vo_aa.c trunk/libvo/vo_directfb2.c trunk/libvo/vo_gif89a.c trunk/libvo/vo_gl.c trunk/libvo/vo_gl2.c trunk/libvo/vo_ivtv.c trunk/libvo/vo_jpeg.c trunk/libvo/vo_md5sum.c trunk/libvo/vo_png.c trunk/libvo/vo_pnm.c trunk/libvo/vo_sdl.c trunk/libvo/vo_v4l2.c trunk/libvo/vo_vdpau.c trunk/libvo/vo_xv.c trunk/libvo/vo_xvmc.c trunk/libvo/vo_yuv4mpeg.c trunk/libvo/vo_zr2.c Modified: trunk/libvo/vo_aa.c ============================================================================== --- trunk/libvo/vo_aa.c Fri Mar 6 21:41:02 2009 (r28862) +++ trunk/libvo/vo_aa.c Sat Mar 7 09:51:40 2009 (r28863) @@ -578,19 +578,19 @@ static int parse_suboptions(const char * char *pseudoargv[4], *osdcolor = NULL, *subcolor = NULL, **strings, *helpmsg = NULL; int pseudoargc, displayhelp = 0, *booleans; - opt_t extra_opts[] = { + const opt_t extra_opts[] = { {"osdcolor", OPT_ARG_MSTRZ, &osdcolor, NULL, 0}, {"subcolor", OPT_ARG_MSTRZ, &subcolor, NULL, 0}, {"help", OPT_ARG_BOOL, &displayhelp, NULL, 0} }; opt_t *subopts = NULL, *p; - char *strings_list[] = {"-driver", "-kbddriver", "-mousedriver", "-font", + char * const strings_list[] = {"-driver", "-kbddriver", "-mousedriver", "-font", "-width", "-height", "-minwidth", "-minheight", "-maxwidth", "-maxheight", "-recwidth", "-recheight", "-bright", "-contrast", "-gamma", "-dimmul", "-boldmul", "-random" }; - char *booleans_list[] = {"-dim", "-bold", "-reverse", "-normal", + char * const booleans_list[] = {"-dim", "-bold", "-reverse", "-normal", "-boldfont", "-inverse", "-extended", "-eight", "-dither", "-floyd_steinberg", "-error_distribution"}; - char *nobooleans_list[] = {"-nodim", "-nobold", "-noreverse", "-nonormal", + char * const nobooleans_list[] = {"-nodim", "-nobold", "-noreverse", "-nonormal", "-noboldfont", "-noinverse", "-noextended", "-noeight", "-nodither", "-nofloyd_steinberg", "-noerror_distribution"}; const int nstrings = sizeof(strings_list) / sizeof(char*); Modified: trunk/libvo/vo_directfb2.c ============================================================================== --- trunk/libvo/vo_directfb2.c Fri Mar 6 21:41:02 2009 (r28862) +++ trunk/libvo/vo_directfb2.c Sat Mar 7 09:51:40 2009 (r28863) @@ -175,7 +175,7 @@ static int preinit(const char *arg) strarg_t mode_str = {0, NULL}; strarg_t par_str = {0, NULL}; strarg_t dfb_params = {0, NULL}; - opt_t subopts[] = { + const opt_t subopts[] = { {"input", OPT_ARG_BOOL, &use_input, NULL}, {"buffermode", OPT_ARG_STR, &mode_str, check_mode}, {"fieldparity", OPT_ARG_STR, &par_str, check_parity}, Modified: trunk/libvo/vo_gif89a.c ============================================================================== --- trunk/libvo/vo_gif89a.c Fri Mar 6 21:41:02 2009 (r28862) +++ trunk/libvo/vo_gif89a.c Sat Mar 7 09:51:40 2009 (r28863) @@ -104,7 +104,7 @@ static char *gif_filename = NULL; // the default output filename #define DEFAULT_FILE "out.gif" -static opt_t subopts[] = { +static const opt_t subopts[] = { {"output", OPT_ARG_MSTRZ, &gif_filename, NULL, 0}, {"fps", OPT_ARG_FLOAT, &target_fps, NULL, 0}, {NULL, 0, NULL, NULL, 0} Modified: trunk/libvo/vo_gl.c ============================================================================== --- trunk/libvo/vo_gl.c Fri Mar 6 21:41:02 2009 (r28862) +++ trunk/libvo/vo_gl.c Sat Mar 7 09:51:40 2009 (r28863) @@ -973,7 +973,7 @@ uninit(void) vo_uninit(); } -static opt_t subopts[] = { +static const opt_t subopts[] = { {"manyfmts", OPT_ARG_BOOL, &many_fmts, NULL}, {"osd", OPT_ARG_BOOL, &use_osd, NULL}, {"scaled-osd", OPT_ARG_BOOL, &scaled_osd, NULL}, Modified: trunk/libvo/vo_gl2.c ============================================================================== --- trunk/libvo/vo_gl2.c Fri Mar 6 21:41:02 2009 (r28862) +++ trunk/libvo/vo_gl2.c Sat Mar 7 09:51:40 2009 (r28863) @@ -844,7 +844,7 @@ uninit(void) vo_uninit(); } -static opt_t subopts[] = { +static const opt_t subopts[] = { {"yuv", OPT_ARG_INT, &use_yuv, (opt_test_f)int_non_neg}, {"glfinish", OPT_ARG_BOOL, &use_glFinish, NULL}, {NULL} Modified: trunk/libvo/vo_ivtv.c ============================================================================== --- trunk/libvo/vo_ivtv.c Fri Mar 6 21:41:02 2009 (r28862) +++ trunk/libvo/vo_ivtv.c Sat Mar 7 09:51:40 2009 (r28863) @@ -59,7 +59,7 @@ static vo_mpegpes_t *pes; static int output = -1; static char *device = NULL; -static opt_t subopts[] = { +static const opt_t subopts[] = { {"output", OPT_ARG_INT, &output, (opt_test_f)int_non_neg}, {"device", OPT_ARG_MSTRZ, &device, NULL}, {NULL} Modified: trunk/libvo/vo_jpeg.c ============================================================================== --- trunk/libvo/vo_jpeg.c Fri Mar 6 21:41:02 2009 (r28862) +++ trunk/libvo/vo_jpeg.c Sat Mar 7 09:51:40 2009 (r28863) @@ -339,7 +339,7 @@ static int int_zero_hundred(int *val) static int preinit(const char *arg) { - opt_t subopts[] = { + const opt_t subopts[] = { {"progressive", OPT_ARG_BOOL, &jpeg_progressive_mode, NULL, 0}, {"baseline", OPT_ARG_BOOL, &jpeg_baseline, NULL, 0}, {"optimize", OPT_ARG_INT, &jpeg_optimize, Modified: trunk/libvo/vo_md5sum.c ============================================================================== --- trunk/libvo/vo_md5sum.c Fri Mar 6 21:41:02 2009 (r28862) +++ trunk/libvo/vo_md5sum.c Sat Mar 7 09:51:40 2009 (r28863) @@ -107,7 +107,7 @@ static void md5sum_write_error(void) { static int preinit(const char *arg) { - opt_t subopts[] = { + const opt_t subopts[] = { {"outfile", OPT_ARG_MSTRZ, &md5sum_outfile, NULL, 0}, {NULL, 0, NULL, NULL, 0} }; Modified: trunk/libvo/vo_png.c ============================================================================== --- trunk/libvo/vo_png.c Fri Mar 6 21:41:02 2009 (r28862) +++ trunk/libvo/vo_png.c Sat Mar 7 09:51:40 2009 (r28863) @@ -290,7 +290,7 @@ static int int_zero_to_nine(int *sh) return 1; } -static opt_t subopts[] = { +static const opt_t subopts[] = { {"alpha", OPT_ARG_BOOL, &use_alpha, NULL, 0}, {"z", OPT_ARG_INT, &z_compression, (opt_test_f)int_zero_to_nine}, {"outdir", OPT_ARG_MSTRZ, &png_outdir, NULL, 0}, Modified: trunk/libvo/vo_pnm.c ============================================================================== --- trunk/libvo/vo_pnm.c Fri Mar 6 21:41:02 2009 (r28862) +++ trunk/libvo/vo_pnm.c Sat Mar 7 09:51:40 2009 (r28863) @@ -120,7 +120,7 @@ static int preinit(const char *arg) { int ppm_type = 0, pgm_type = 0, pgmyuv_type = 0, raw_mode = 0, ascii_mode = 0; - opt_t subopts[] = { + const opt_t subopts[] = { {"ppm", OPT_ARG_BOOL, &ppm_type, NULL, 0}, {"pgm", OPT_ARG_BOOL, &pgm_type, NULL, 0}, {"pgmyuv", OPT_ARG_BOOL, &pgmyuv_type, NULL, 0}, Modified: trunk/libvo/vo_sdl.c ============================================================================== --- trunk/libvo/vo_sdl.c Fri Mar 6 21:41:02 2009 (r28862) +++ trunk/libvo/vo_sdl.c Sat Mar 7 09:51:40 2009 (r28863) @@ -1526,7 +1526,7 @@ static int preinit(const char *arg) char * sdl_driver = NULL; int sdl_hwaccel; int sdl_forcexv; - opt_t subopts[] = { + const opt_t subopts[] = { {"forcexv", OPT_ARG_BOOL, &sdl_forcexv, NULL, 0}, {"hwaccel", OPT_ARG_BOOL, &sdl_hwaccel, NULL, 0}, {"driver", OPT_ARG_MSTRZ, &sdl_driver, NULL, 0}, Modified: trunk/libvo/vo_v4l2.c ============================================================================== --- trunk/libvo/vo_v4l2.c Fri Mar 6 21:41:02 2009 (r28862) +++ trunk/libvo/vo_v4l2.c Sat Mar 7 09:51:40 2009 (r28863) @@ -53,7 +53,7 @@ static vo_mpegpes_t *pes; static int output = -1; static char *device = NULL; -static opt_t subopts[] = { +static const opt_t subopts[] = { {"output", OPT_ARG_INT, &output, (opt_test_f)int_non_neg}, {"device", OPT_ARG_MSTRZ, &device, NULL}, {NULL} Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Fri Mar 6 21:41:02 2009 (r28862) +++ trunk/libvo/vo_vdpau.c Sat Mar 7 09:51:40 2009 (r28863) @@ -949,7 +949,7 @@ static void uninit(void) dlclose(vdpau_lib_handle); } -static opt_t subopts[] = { +static const opt_t subopts[] = { {"deint", OPT_ARG_INT, &deint, (opt_test_f)int_non_neg}, {"pullup", OPT_ARG_BOOL, &pullup, NULL}, {"denoise", OPT_ARG_FLOAT, &denoise, NULL}, Modified: trunk/libvo/vo_xv.c ============================================================================== --- trunk/libvo/vo_xv.c Fri Mar 6 21:41:02 2009 (r28862) +++ trunk/libvo/vo_xv.c Sat Mar 7 09:51:40 2009 (r28863) @@ -611,7 +611,7 @@ static int preinit(const char *arg) strarg_t ck_method_arg = { 0, NULL }; int xv_adaptor = -1; - opt_t subopts[] = + const opt_t subopts[] = { /* name arg type arg var test */ { "port", OPT_ARG_INT, &xv_port, (opt_test_f)int_pos }, Modified: trunk/libvo/vo_xvmc.c ============================================================================== --- trunk/libvo/vo_xvmc.c Fri Mar 6 21:41:02 2009 (r28862) +++ trunk/libvo/vo_xvmc.c Sat Mar 7 09:51:40 2009 (r28863) @@ -379,7 +379,7 @@ static int preinit(const char *arg){ int mc_ver,mc_rev; strarg_t ck_src_arg = { 0, NULL }; strarg_t ck_method_arg = { 0, NULL }; - opt_t subopts [] = + const opt_t subopts [] = { /* name arg type arg var test */ { "port", OPT_ARG_INT, &xv_port_request, (opt_test_f)int_pos }, Modified: trunk/libvo/vo_yuv4mpeg.c ============================================================================== --- trunk/libvo/vo_yuv4mpeg.c Fri Mar 6 21:41:02 2009 (r28862) +++ trunk/libvo/vo_yuv4mpeg.c Sat Mar 7 09:51:40 2009 (r28863) @@ -513,7 +513,7 @@ static void check_events(void) static int preinit(const char *arg) { int il, il_bf; - opt_t subopts[] = { + const opt_t subopts[] = { {"interlaced", OPT_ARG_BOOL, &il, NULL}, {"interlaced_bf", OPT_ARG_BOOL, &il_bf, NULL}, {"file", OPT_ARG_MSTRZ, &yuv_filename, NULL}, Modified: trunk/libvo/vo_zr2.c ============================================================================== --- trunk/libvo/vo_zr2.c Fri Mar 6 21:41:02 2009 (r28862) +++ trunk/libvo/vo_zr2.c Sat Mar 7 09:51:40 2009 (r28863) @@ -209,7 +209,7 @@ static int preinit(const char *arg) { const char *dev = NULL; char *dev_arg = NULL, *norm_arg = NULL; int norm = VIDEO_MODE_AUTO, prebuf = 0; - opt_t subopts[] = { /* don't want warnings with -Wall... */ + const opt_t subopts[] = { /* don't want warnings with -Wall... */ { "dev", OPT_ARG_MSTRZ, &dev_arg, NULL, 0 }, { "prebuf", OPT_ARG_BOOL, &prebuf, (opt_test_f)pbc, 0 }, { "norm", OPT_ARG_MSTRZ, &norm_arg, (opt_test_f)nc, 0 }, From subversion at mplayerhq.hu Sat Mar 7 09:52:58 2009 From: subversion at mplayerhq.hu (reimar) Date: Sat, 7 Mar 2009 09:52:58 +0100 (CET) Subject: [MPlayer-cvslog] r28864 - in trunk/libvo: vo_xv.c vo_xvmc.c Message-ID: <20090307085258.4447B4E025@natsuki.mplayerhq.hu> Author: reimar Date: Sat Mar 7 09:52:57 2009 New Revision: 28864 Log: Setting vo_fs is handled by x11_common.c, so remove that code from vo_xv/vo_xvmc. Modified: trunk/libvo/vo_xv.c trunk/libvo/vo_xvmc.c Modified: trunk/libvo/vo_xv.c ============================================================================== --- trunk/libvo/vo_xv.c Sat Mar 7 09:51:40 2009 (r28863) +++ trunk/libvo/vo_xv.c Sat Mar 7 09:52:57 2009 (r28864) @@ -295,8 +295,6 @@ static int config(uint32_t width, uint32 current_buf = 0; current_ip_buf = 0; - if ((flags & VOFLAG_FULLSCREEN) && WinID <= 0) vo_fs = 1; - resize(); return 0; Modified: trunk/libvo/vo_xvmc.c ============================================================================== --- trunk/libvo/vo_xvmc.c Sat Mar 7 09:51:40 2009 (r28863) +++ trunk/libvo/vo_xvmc.c Sat Mar 7 09:52:57 2009 (r28864) @@ -664,8 +664,6 @@ skip_surface_allocation: #endif } - if ((flags & VOFLAG_FULLSCREEN) && WinID <= 0) vo_fs = 1; - //end vo_xv /* store image dimesions for displaying */ From subversion at mplayerhq.hu Sat Mar 7 10:08:03 2009 From: subversion at mplayerhq.hu (reimar) Date: Sat, 7 Mar 2009 10:08:03 +0100 (CET) Subject: [MPlayer-cvslog] r28865 - in trunk/mp3lib: decode_mmx.c layer3.c Message-ID: <20090307090803.1B4913B2E2@natsuki.mplayerhq.hu> Author: reimar Date: Sat Mar 7 10:08:02 2009 New Revision: 28865 Log: Make several constant mp3lib tables const Modified: trunk/mp3lib/decode_mmx.c trunk/mp3lib/layer3.c Modified: trunk/mp3lib/decode_mmx.c ============================================================================== --- trunk/mp3lib/decode_mmx.c Sat Mar 7 09:52:57 2009 (r28864) +++ trunk/mp3lib/decode_mmx.c Sat Mar 7 10:08:02 2009 (r28865) @@ -12,9 +12,9 @@ #define real float /* ugly - but only way */ extern void (*dct64_MMX_func)(short*, short*, real*); -static unsigned long long attribute_used __attribute__((aligned(8))) null_one = 0x0000ffff0000ffffULL; -static unsigned long long attribute_used __attribute__((aligned(8))) one_null = 0xffff0000ffff0000ULL; -unsigned int __attribute__((aligned(16))) costab_mmx[] = +static const unsigned long long attribute_used __attribute__((aligned(8))) null_one = 0x0000ffff0000ffffULL; +static const unsigned long long attribute_used __attribute__((aligned(8))) one_null = 0xffff0000ffff0000ULL; +const unsigned int __attribute__((aligned(16))) costab_mmx[] = { 1056974725, 1057056395, @@ -54,7 +54,7 @@ unsigned int __attribute__((aligned(16)) make_decode_tables_MMX(32768), which had been implemented in (deleted since r23383) tabinit_MMX.c. */ -static short __attribute__((aligned(8))) mp3lib_decwins[] = +static const short __attribute__((aligned(8))) mp3lib_decwins[] = { 0, 7, 54, 114, 510, 1288, 1644, 9372, 18760, -9373, 1644, -1289, 510, -115, 54, -8, @@ -191,7 +191,7 @@ int synth_1to1_MMX(real *bandPtr, int ch static short buffs[2][2][0x110] __attribute__((aligned(8))); static int bo = 1; short *b0, (*buf)[0x110], *a, *b; - short* window; + const short* window; int bo1, i = 8; if (channel == 0) { Modified: trunk/mp3lib/layer3.c ============================================================================== --- trunk/mp3lib/layer3.c Sat Mar 7 09:52:57 2009 (r28864) +++ trunk/mp3lib/layer3.c Sat Mar 7 10:08:02 2009 (r28865) @@ -53,7 +53,7 @@ struct bandInfoStruct { static int longLimit[9][23]; static int shortLimit[9][14]; -static struct bandInfoStruct bandInfo[9] = { +static const struct bandInfoStruct bandInfo[9] = { /* MPEG 1.0 */ { {0,4,8,12,16,20,24,30,36,44,52,62,74, 90,110,134,162,196,238,288,342,418,576}, @@ -132,7 +132,7 @@ static void init_layer3(int down_sample_ for (i=0;i<8;i++) { - static double Ci[8]={-0.6,-0.535,-0.33,-0.185,-0.095,-0.041,-0.0142,-0.0037}; + static const double Ci[8]={-0.6,-0.535,-0.33,-0.185,-0.095,-0.041,-0.0142,-0.0037}; double sq=sqrt(1.0+Ci[i]*Ci[i]); aa_cs[i] = 1.0/sq; aa_ca[i] = Ci[i]/sq; @@ -180,7 +180,7 @@ static void init_layer3(int down_sample_ } for(j=0;j<4;j++) { - static int len[4] = { 36,36,12,36 }; + static const int len[4] = { 36,36,12,36 }; for(i=0;ilongDiff; @@ -984,7 +984,7 @@ static void III_i_stereo(real xr_buf[2][ struct gr_info_s *gr_info,int sfreq,int ms_stereo,int lsf) { real (*xr)[SBLIMIT*SSLIMIT] = (real (*)[SBLIMIT*SSLIMIT] ) xr_buf; - struct bandInfoStruct *bi = &bandInfo[sfreq]; + const struct bandInfoStruct *bi = &bandInfo[sfreq]; const real *tab1,*tab2; From subversion at mplayerhq.hu Sat Mar 7 10:14:45 2009 From: subversion at mplayerhq.hu (reimar) Date: Sat, 7 Mar 2009 10:14:45 +0100 (CET) Subject: [MPlayer-cvslog] r28866 - trunk/mp3lib/layer3.c Message-ID: <20090307091445.9C0923B2E2@natsuki.mplayerhq.hu> Author: reimar Date: Sat Mar 7 10:14:45 2009 New Revision: 28866 Log: Reduce size of needlessly large mp3lib bandInfoStruct Modified: trunk/mp3lib/layer3.c Modified: trunk/mp3lib/layer3.c ============================================================================== --- trunk/mp3lib/layer3.c Sat Mar 7 10:08:02 2009 (r28865) +++ trunk/mp3lib/layer3.c Sat Mar 7 10:14:45 2009 (r28866) @@ -44,10 +44,10 @@ static real cos9[3],cos18[3]; #endif struct bandInfoStruct { - int longIdx[23]; - int longDiff[22]; - int shortIdx[14]; - int shortDiff[13]; + uint16_t longIdx[23]; + uint8_t longDiff[22]; + uint16_t shortIdx[14]; + uint8_t shortDiff[13]; }; static int longLimit[9][23]; @@ -216,7 +216,7 @@ static void init_layer3(int down_sample_ const struct bandInfoStruct *bi = &bandInfo[j]; int *mp; int cb,lwin; - const int *bdf; + const uint8_t *bdf; mp = map[j][0] = mapbuf0[j]; bdf = bi->longDiff; From subversion at mplayerhq.hu Sat Mar 7 13:50:52 2009 From: subversion at mplayerhq.hu (reimar) Date: Sat, 7 Mar 2009 13:50:52 +0100 (CET) Subject: [MPlayer-cvslog] r28869 - trunk/configure Message-ID: <20090307125053.0F2043B668@natsuki.mplayerhq.hu> Author: reimar Date: Sat Mar 7 13:50:52 2009 New Revision: 28869 Log: Update x264 version check for version required by lavc. Modified: trunk/configure Modified: trunk/configure ============================================================================== --- trunk/configure Sat Mar 7 10:39:48 2009 (r28868) +++ trunk/configure Sat Mar 7 13:50:52 2009 (r28869) @@ -7042,7 +7042,7 @@ if test "$_x264" = auto ; then cat > $TMPC << EOF #include #include -#if X264_BUILD < 59 +#if X264_BUILD < 65 #error We do not support old versions of x264. Get the latest from SVN. #endif int main(void) { x264_encoder_open((void*)0); return 0; } From subversion at mplayerhq.hu Sat Mar 7 14:25:56 2009 From: subversion at mplayerhq.hu (reimar) Date: Sat, 7 Mar 2009 14:25:56 +0100 (CET) Subject: [MPlayer-cvslog] r28870 - in trunk: DOCS/tech/slave.txt input/input.c mplayer.c Message-ID: <20090307132556.5686A3B61E@natsuki.mplayerhq.hu> Author: reimar Date: Sat Mar 7 14:25:55 2009 New Revision: 28870 Log: Make pausing_keep_force the default for the set_mouse_pos and key_down_event - different behaviour is unlikely to make sense but it is better to handle this in input.c instead of adding special cases to mplayer.c and being able to override the default behaviour at least should not hurt. Modified: trunk/DOCS/tech/slave.txt trunk/input/input.c trunk/mplayer.c Modified: trunk/DOCS/tech/slave.txt ============================================================================== --- trunk/DOCS/tech/slave.txt Sat Mar 7 13:50:52 2009 (r28869) +++ trunk/DOCS/tech/slave.txt Sat Mar 7 14:25:55 2009 (r28870) @@ -30,6 +30,8 @@ As a temporary hack, there is also the _ prefix, with which MPlayer will not exit the pause loop at all. Like this you can avoid the "frame stepping" effect of "pausing_keep " but most commands will either not work at all or behave in unexpected ways. +For "set_mouse_pos" and "key_down_event", "pausing_keep_force" is the default +since other values do not make much sense for them. Available commands ('mplayer -input cmdlist' will print a list): Modified: trunk/input/input.c ============================================================================== --- trunk/input/input.c Sat Mar 7 13:50:52 2009 (r28869) +++ trunk/input/input.c Sat Mar 7 14:25:55 2009 (r28870) @@ -767,7 +767,7 @@ int mp_input_parse_and_queue_cmds(const mp_cmd_t* mp_input_parse_cmd(char* str) { int i,l; - int pausing = 0; + int pausing = -1; char *ptr,*e; mp_cmd_t *cmd; const mp_cmd_t *cmd_def; @@ -817,6 +817,15 @@ mp_input_parse_cmd(char* str) { cmd = calloc(1, sizeof(mp_cmd_t)); cmd->id = cmd_def->id; cmd->name = strdup(cmd_def->name); + if (pausing == -1) { + switch (cmd->id) { + case MP_CMD_KEYDOWN_EVENTS: + case MP_CMD_SET_MOUSE_POS: + pausing = 4; break; + default: + pausing = 0; break; + } + } cmd->pausing = pausing; ptr = str; Modified: trunk/mplayer.c ============================================================================== --- trunk/mplayer.c Sat Mar 7 13:50:52 2009 (r28869) +++ trunk/mplayer.c Sat Mar 7 14:25:55 2009 (r28870) @@ -2346,8 +2346,7 @@ static void pause_loop(void) if (mpctx->audio_out && mpctx->sh_audio) mpctx->audio_out->pause(); // pause audio, keep data if possible - while ( (cmd = mp_input_get_cmd(20, 1, 1)) == NULL - || cmd->id == MP_CMD_SET_MOUSE_POS || cmd->pausing == 4) { + while ( (cmd = mp_input_get_cmd(20, 1, 1)) == NULL || cmd->pausing == 4) { if (cmd) { cmd = mp_input_get_cmd(0,1,0); run_command(mpctx, cmd); From subversion at mplayerhq.hu Sat Mar 7 14:45:48 2009 From: subversion at mplayerhq.hu (diego) Date: Sat, 7 Mar 2009 14:45:48 +0100 (CET) Subject: [MPlayer-cvslog] r28871 - trunk/libvo/vo_macosx.m Message-ID: <20090307134548.DD8E73B6CB@natsuki.mplayerhq.hu> Author: diego Date: Sat Mar 7 14:45:48 2009 New Revision: 28871 Log: cosmetics: Reformat file header. Modified: trunk/libvo/vo_macosx.m Modified: trunk/libvo/vo_macosx.m ============================================================================== --- trunk/libvo/vo_macosx.m Sat Mar 7 14:25:55 2009 (r28870) +++ trunk/libvo/vo_macosx.m Sat Mar 7 14:45:48 2009 (r28871) @@ -1,4 +1,7 @@ /* + * Mac OS X video output driver + * Copyright (c) 2005 Nicolas Plourde + * * This file is part of MPlayer. * * MPlayer is free software; you can redistribute it and/or modify @@ -16,14 +19,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* - vo_macosx.m - by Nicolas Plourde - - MPlayer Mac OSX video out module. - Copyright (c) Nicolas Plourde - 2005 -*/ - #import "vo_macosx.h" #include #include From subversion at mplayerhq.hu Sat Mar 7 18:41:34 2009 From: subversion at mplayerhq.hu (diego) Date: Sat, 7 Mar 2009 18:41:34 +0100 (CET) Subject: [MPlayer-cvslog] r28872 - trunk/libvo/vo_macosx.m Message-ID: <20090307174134.D84A33B692@natsuki.mplayerhq.hu> Author: diego Date: Sat Mar 7 18:41:34 2009 New Revision: 28872 Log: cosmetics: spelling fixes Modified: trunk/libvo/vo_macosx.m Modified: trunk/libvo/vo_macosx.m ============================================================================== --- trunk/libvo/vo_macosx.m Sat Mar 7 14:45:48 2009 (r28871) +++ trunk/libvo/vo_macosx.m Sat Mar 7 18:41:34 2009 (r28872) @@ -95,7 +95,7 @@ static BOOL isLeopardOrLater; static vo_info_t info = { - "Mac OSX Core Video", + "Mac OS X Core Video", "macosx", "Nicolas Plourde ", "" @@ -127,7 +127,7 @@ static int config(uint32_t width, uint32 } else { - mp_msg(MSGT_VO, MSGL_FATAL, "Get device error: Device ID %d do not exist, falling back to main device.\n", screen_id); + mp_msg(MSGT_VO, MSGL_FATAL, "Get device error: Device ID %d does not exist, falling back to main device.\n", screen_id); screen_handle = [screen_array objectAtIndex:0]; screen_id = -1; } @@ -212,7 +212,7 @@ static int config(uint32_t width, uint32 return 1; } - //connnect to mplayerosx + //connect to mplayerosx mplayerosxProxy=[NSConnection rootProxyForConnectionWithRegisteredName:[NSString stringWithCString:buffer_name] host:nil]; if ([mplayerosxProxy conformsToProtocol:@protocol(MPlayerOSXVOProto)]) { [mplayerosxProxy setProtocolForProxy:@protocol(MPlayerOSXVOProto)]; @@ -357,7 +357,7 @@ static int preinit(const char *arg) "Example: mplayer -vo macosx:device_id=1:shared_buffer:buffer_name=mybuff\n" "\nOptions:\n" " device_id=<0-...>\n" - " Set screen device id for fullscreen.\n" + " Set screen device ID for fullscreen.\n" " shared_buffer\n" " Write output to a shared memory buffer instead of displaying it.\n" " buffer_name=\n" @@ -808,7 +808,7 @@ static int control(uint32_t request, voi curTime = TickCount()/60; - //auto hide mouse cursor (and future on-screen control?) + //automatically hide mouse cursor (and future on-screen control?) if(isFullscreen && !mouseHide && !isRootwin) { if( ((curTime - lastMouseHide) >= 5) || (lastMouseHide == 0) ) @@ -959,8 +959,8 @@ static int control(uint32_t request, voi return; [NSApp sendEvent:event]; // Without SDL's bootstrap code (include SDL.h in mplayer.c), - // on Leopard, we got trouble to get the play window auto focused - // when app is actived. Following code fix this problem. + // on Leopard, we have trouble to get the play window automatically focused + // when the app is actived. The Following code fix this problem. #ifndef CONFIG_SDL if (isLeopardOrLater && [event type] == NSAppKitDefined && [event subtype] == NSApplicationActivatedEventType) { From subversion at mplayerhq.hu Sun Mar 8 00:56:08 2009 From: subversion at mplayerhq.hu (greg) Date: Sun, 8 Mar 2009 00:56:08 +0100 (CET) Subject: [MPlayer-cvslog] r28873 - trunk/libass/ass_render.c Message-ID: <20090307235608.411563B557@natsuki.mplayerhq.hu> Author: greg Date: Sun Mar 8 00:56:03 2009 New Revision: 28873 Log: Only use first \org in a line. Modified: trunk/libass/ass_render.c Modified: trunk/libass/ass_render.c ============================================================================== --- trunk/libass/ass_render.c Sat Mar 7 18:41:34 2009 (r28872) +++ trunk/libass/ass_render.c Sun Mar 8 00:56:03 2009 (r28873) @@ -1059,10 +1059,12 @@ static char* parse_tag(char* p, double p skip(')'); mp_msg(MSGT_ASS, MSGL_DBG2, "org(%d, %d)\n", v1, v2); // render_context.evt_type = EVENT_POSITIONED; - render_context.org_x = v1; - render_context.org_y = v2; - render_context.have_origin = 1; - render_context.detect_collisions = 0; + if (!render_context.have_origin) { + render_context.org_x = v1; + render_context.org_y = v2; + render_context.have_origin = 1; + render_context.detect_collisions = 0; + } } else if (mystrcmp(&p, "t")) { double v[3]; int v1, v2; From Reimar.Doeffinger at gmx.de Sun Mar 8 01:19:26 2009 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Sun, 8 Mar 2009 01:19:26 +0100 Subject: [MPlayer-cvslog] r28837 - trunk/libass/ass_bitmap.c In-Reply-To: <20090306092015.56F244E04E@natsuki.mplayerhq.hu> References: <20090306092015.56F244E04E@natsuki.mplayerhq.hu> Message-ID: <20090308001926.GA6579@1und1.de> On Fri, Mar 06, 2009 at 10:20:15AM +0100, greg wrote: > Author: greg > Date: Fri Mar 6 10:20:14 2009 > New Revision: 28837 > > Log: > Fix \be blur start position. > > Modified: > trunk/libass/ass_bitmap.c > > Modified: trunk/libass/ass_bitmap.c > ============================================================================== > --- trunk/libass/ass_bitmap.c Fri Mar 6 10:20:09 2009 (r28836) > +++ trunk/libass/ass_bitmap.c Fri Mar 6 10:20:14 2009 (r28837) > @@ -264,7 +264,7 @@ static void be_blur(unsigned char *buf, > unsigned int old_sum, new_sum; > > for (y=0; y - old_sum = 2 * buf[0]; > + old_sum = 2 * buf[y*w]; > for (x=0; x new_sum = buf[y*w+x] + buf[y*w+x+1]; > buf[y*w+x] = (old_sum + new_sum) >> 2; > @@ -273,7 +273,7 @@ static void be_blur(unsigned char *buf, > } > > for (x=0; x - old_sum = 2 * buf[0]; > + old_sum = 2 * buf[x]; > for (y=0; y new_sum = buf[y*w+x] + buf[(y+1)*w+x]; > buf[y*w+x] = (old_sum + new_sum) >> 2; You are still treating left/top border differently from bottom/right one. I don't really mind how you treat the borders, I think there is no "correct" way, but they should at least all be treated the same way. From subversion at mplayerhq.hu Sun Mar 8 03:53:14 2009 From: subversion at mplayerhq.hu (greg) Date: Sun, 8 Mar 2009 03:53:14 +0100 (CET) Subject: [MPlayer-cvslog] r28874 - trunk/libass/ass_render.c Message-ID: <20090308025314.84D493B63D@natsuki.mplayerhq.hu> Author: greg Date: Sun Mar 8 03:53:14 2009 New Revision: 28874 Log: Replace rotation functions with a simplified version adapted from vsfilter. This (mostly) fixes http://bugzilla.mplayerhq.hu/show_bug.cgi?id=1394#c7 Modified: trunk/libass/ass_render.c Modified: trunk/libass/ass_render.c ============================================================================== --- trunk/libass/ass_render.c Sun Mar 8 00:56:03 2009 (r28873) +++ trunk/libass/ass_render.c Sun Mar 8 03:53:14 2009 (r28874) @@ -1796,75 +1796,46 @@ static void get_base_point(FT_BBox bbox, } /** - * \brief Multiply 4-vector by 4-matrix - * \param a 4-vector - * \param m 4-matrix] - * \param b out: 4-vector - * Calculates a * m and stores result in b - */ -static inline void transform_point_3d(double *a, double *m, double *b) -{ - b[0] = a[0] * m[0] + a[1] * m[4] + a[2] * m[8] + a[3] * m[12]; - b[1] = a[0] * m[1] + a[1] * m[5] + a[2] * m[9] + a[3] * m[13]; - b[2] = a[0] * m[2] + a[1] * m[6] + a[2] * m[10] + a[3] * m[14]; - b[3] = a[0] * m[3] + a[1] * m[7] + a[2] * m[11] + a[3] * m[15]; -} - -/** - * \brief Apply 3d transformation to a vector - * \param v FreeType vector (2d) - * \param m 4-matrix - * Transforms v by m, projects the result back to the screen plane - * Result is returned in v. - */ -static inline void transform_vector_3d(FT_Vector* v, double *m) { - const double camera = 2500 * frame_context.border_scale; // camera distance - const double cutoff_z = 10.; - double a[4], b[4]; - a[0] = d6_to_double(v->x); - a[1] = d6_to_double(v->y); - a[2] = 0.; - a[3] = 1.; - transform_point_3d(a, m, b); - /* Apply perspective projection with the following matrix: - 2500 0 0 0 - 0 2500 0 0 - 0 0 0 0 - 0 0 8 2500 - where 2500 is camera distance, 8 - z-axis scale. - Camera is always located in (org_x, org_y, -2500). This means - that different subtitle events can be displayed at the same time - using different cameras. */ - b[0] *= camera; - b[1] *= camera; - b[3] = 8 * b[2] + camera; - if (b[3] < cutoff_z) - b[3] = cutoff_z; - v->x = double_to_d6(b[0] / b[3]); - v->y = double_to_d6(b[1] / b[3]); -} - -/** - * \brief Apply 3d transformation to a glyph - * \param glyph FreeType glyph - * \param m 4-matrix - * Transforms glyph by m, projects the result back to the screen plane - * Result is returned in glyph. + * \brief Apply transformation to outline points of a glyph + * Applies rotations given by frx, fry and frz and projects the points back + * onto the screen plane. */ -static inline void transform_glyph_3d(FT_Glyph glyph, double *m, FT_Vector shift) { - int i; - FT_Outline* outline = &((FT_OutlineGlyph)glyph)->outline; +static void transform_3d_points(FT_Vector shift, FT_Glyph glyph, double frx, double fry, double frz) { + double sx = sin(frx); + double sy = sin(fry); + double sz = sin(frz); + double cx = cos(frx); + double cy = cos(fry); + double cz = cos(frz); + FT_Outline *outline = &((FT_OutlineGlyph) glyph)->outline; FT_Vector* p = outline->points; + double x, y, z, xx, yy, zz; + int i; for (i=0; in_points; i++) { - p[i].x += shift.x; - p[i].y += shift.y; - transform_vector_3d(p + i, m); - p[i].x -= shift.x; - p[i].y -= shift.y; - } + x = p[i].x + shift.x; + y = p[i].y + shift.y; + z = 0.; - //transform_vector_3d(&glyph->advance, m); + xx = x*cz + y*sz; + yy = -(x*sz - y*cz); + zz = z; + + x = xx; + y = yy*cx + zz*sx; + z = yy*sx - zz*cx; + + xx = x*cy + z*sy; + yy = y; + zz = x*sy - z*cy; + + zz = FFMAX(zz, -19000); + + x = (xx * 20000) / (zz + 20000); + y = (yy * 20000) / (zz + 20000); + p[i].x = x - shift.x + 0.5; + p[i].y = y - shift.y + 0.5; + } } /** @@ -1879,28 +1850,18 @@ static inline void transform_glyph_3d(FT */ static void transform_3d(FT_Vector shift, FT_Glyph* glyph, FT_Glyph* glyph2, double frx, double fry, double frz) { - fry = - fry; // FreeType's y axis goes in the opposite direction + frx = - frx; + frz = - frz; if (frx != 0. || fry != 0. || frz != 0.) { - double m[16]; - double sx = sin(frx); - double sy = sin(fry); - double sz = sin(frz); - double cx = cos(frx); - double cy = cos(fry); - double cz = cos(frz); - m[0] = cy * cz; m[1] = cy*sz; m[2] = -sy; m[3] = 0.0; - m[4] = -cx*sz + sx*sy*cz; m[5] = cx*cz + sx*sy*sz; m[6] = sx*cy; m[7] = 0.0; - m[8] = sx*sz + cx*sy*cz; m[9] = -sx*cz + cx*sy*sz; m[10] = cx*cy; m[11] = 0.0; - m[12] = 0.0; m[13] = 0.0; m[14] = 0.0; m[15] = 1.0; - if (glyph && *glyph) - transform_glyph_3d(*glyph, m, shift); + transform_3d_points(shift, *glyph, frx, fry, frz); if (glyph2 && *glyph2) - transform_glyph_3d(*glyph2, m, shift); + transform_3d_points(shift, *glyph2, frx, fry, frz); } } + /** * \brief Main ass rendering function, glues everything together * \param event event to render From subversion at mplayerhq.hu Sun Mar 8 05:03:25 2009 From: subversion at mplayerhq.hu (greg) Date: Sun, 8 Mar 2009 05:03:25 +0100 (CET) Subject: [MPlayer-cvslog] r28875 - trunk/libass/ass_render.c Message-ID: <20090308040325.5C17C3B4E3@natsuki.mplayerhq.hu> Author: greg Date: Sun Mar 8 05:03:24 2009 New Revision: 28875 Log: Add a proper color check to the overlap compositing. Modified: trunk/libass/ass_render.c Modified: trunk/libass/ass_render.c ============================================================================== --- trunk/libass/ass_render.c Sun Mar 8 03:53:14 2009 (r28874) +++ trunk/libass/ass_render.c Sun Mar 8 05:03:24 2009 (r28875) @@ -434,6 +434,9 @@ static void render_overlap(ass_image_t** if ((*last_tail)->bitmap == (*tail)->bitmap) return; + if ((*last_tail)->color != (*tail)->color) + return; + // Calculate overlap coordinates left = (ax > bx) ? ax : bx; top = (ay > by) ? ay : by; From subversion at mplayerhq.hu Sun Mar 8 05:03:28 2009 From: subversion at mplayerhq.hu (greg) Date: Sun, 8 Mar 2009 05:03:28 +0100 (CET) Subject: [MPlayer-cvslog] r28876 - trunk/libass/ass_render.c Message-ID: <20090308040328.86B043B4E3@natsuki.mplayerhq.hu> Author: greg Date: Sun Mar 8 05:03:28 2009 New Revision: 28876 Log: Fix clipping for pan-and-scan. Modified: trunk/libass/ass_render.c Modified: trunk/libass/ass_render.c ============================================================================== --- trunk/libass/ass_render.c Sun Mar 8 05:03:24 2009 (r28875) +++ trunk/libass/ass_render.c Sun Mar 8 05:03:28 2009 (r28876) @@ -2108,11 +2108,11 @@ static int ass_render_event(ass_event_t* } // fix clip coordinates (they depend on alignment) - render_context.clip_x0 = x2scr(render_context.clip_x0); - render_context.clip_x1 = x2scr(render_context.clip_x1); if (render_context.evt_type == EVENT_NORMAL || render_context.evt_type == EVENT_HSCROLL || render_context.evt_type == EVENT_VSCROLL) { + render_context.clip_x0 = x2scr(render_context.clip_x0); + render_context.clip_x1 = x2scr(render_context.clip_x1); if (valign == VALIGN_TOP) { render_context.clip_y0 = y2scr_top(render_context.clip_y0); render_context.clip_y1 = y2scr_top(render_context.clip_y1); @@ -2124,8 +2124,10 @@ static int ass_render_event(ass_event_t* render_context.clip_y1 = y2scr_sub(render_context.clip_y1); } } else if (render_context.evt_type == EVENT_POSITIONED) { - render_context.clip_y0 = y2scr(render_context.clip_y0); - render_context.clip_y1 = y2scr(render_context.clip_y1); + render_context.clip_x0 = x2scr_pos(render_context.clip_x0); + render_context.clip_x1 = x2scr_pos(render_context.clip_x1); + render_context.clip_y0 = y2scr_pos(render_context.clip_y0); + render_context.clip_y1 = y2scr_pos(render_context.clip_y1); } // calculate rotation parameters From subversion at mplayerhq.hu Sun Mar 8 09:56:29 2009 From: subversion at mplayerhq.hu (reimar) Date: Sun, 8 Mar 2009 09:56:29 +0100 (CET) Subject: [MPlayer-cvslog] r28877 - trunk/etc/codecs.conf Message-ID: <20090308085629.09F3D3B3EA@natsuki.mplayerhq.hu> Author: reimar Date: Sun Mar 8 09:56:28 2009 New Revision: 28877 Log: Bump etc/codecs.conf version to eliminate one possible cause when debugging VDPAU issues. Modified: trunk/etc/codecs.conf Modified: trunk/etc/codecs.conf ============================================================================== --- trunk/etc/codecs.conf Sun Mar 8 05:03:28 2009 (r28876) +++ trunk/etc/codecs.conf Sun Mar 8 09:56:28 2009 (r28877) @@ -3,7 +3,7 @@ ; Before editing this file, please read DOCS/tech/codecs.conf.txt ! ;============================================================================= -release 20070930 +release 20090308 ;============================================================================= ; VIDEO CODECS From subversion at mplayerhq.hu Sun Mar 8 10:14:30 2009 From: subversion at mplayerhq.hu (reimar) Date: Sun, 8 Mar 2009 10:14:30 +0100 (CET) Subject: [MPlayer-cvslog] r28878 - in trunk: DOCS/man/en/mplayer.1 input/input.c Message-ID: <20090308091430.499E23B422@natsuki.mplayerhq.hu> Author: reimar Date: Sun Mar 8 10:14:30 2009 New Revision: 28878 Log: Add an option to disable the default key binding that MPlayer includes Modified: trunk/input/input.c Changes in other areas also in this revision: Modified: trunk/DOCS/man/en/mplayer.1 Modified: trunk/input/input.c ============================================================================== --- trunk/input/input.c Sun Mar 8 09:56:28 2009 (r28877) +++ trunk/input/input.c Sun Mar 8 10:14:30 2009 (r28878) @@ -583,6 +583,7 @@ static mp_cmd_t* ar_cmd = NULL; static unsigned int ar_delay = 100, ar_rate = 8, last_ar = 0; static int use_joystick = 1, use_lirc = 1, use_lircc = 1; +static int default_binds = 1; static char* config_file = "input.conf"; /* Apple Remote */ @@ -611,6 +612,8 @@ static m_option_t input_conf[] = { { "cmdlist", mp_input_print_cmd_list, CONF_TYPE_FUNC, CONF_GLOBAL, 0, 0, NULL }, { "js-dev", &js_dev, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL }, { "file", &in_file, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL }, + { "default-binds", &default_binds, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL }, + { "nodefault-binds", &default_binds, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL }, { NULL, NULL, 0, 0, 0, 0, NULL} }; @@ -1078,7 +1081,7 @@ mp_input_get_cmd_from_keys(int n,int* ke cmd = mp_input_find_bind_for_key(cmd_binds,n,keys); if(cmd_binds_default && cmd == NULL) cmd = mp_input_find_bind_for_key(cmd_binds_default,n,keys); - if(cmd == NULL) + if(default_binds && cmd == NULL) cmd = mp_input_find_bind_for_key(def_cmd_binds,n,keys); if(cmd == NULL) { From Reimar.Doeffinger at gmx.de Sun Mar 8 10:16:20 2009 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Sun, 8 Mar 2009 10:16:20 +0100 Subject: [MPlayer-cvslog] r26345 - trunk/libao2/ao_sun.c In-Reply-To: <20090207181017.GA7639@1und1.de> References: <20080407173941.5E5E63B410@natsuki.mplayerhq.hu> <200902071802.03518.jknutar@nic.fi> <20090207181017.GA7639@1und1.de> Message-ID: <20090308091620.GB7839@1und1.de> On Sat, Feb 07, 2009 at 07:10:17PM +0100, Reimar D?ffinger wrote: > On Sat, Feb 07, 2009 at 06:01:48PM +0200, Jan Knutar wrote: > > On Monday 07 April 2008, reimar wrote: > > > Author: reimar > > > Date: Mon Apr 7 19:39:41 2008 > > > New Revision: 26345 > > > > > > Log: > > > reset() should not senselessly close and reopen > > > the device but instead just call flush_audio() > > > > This seems to have broken seeking on Opensolaris, from irc: > > Please get someone to try this patch: > Index: libao2/ao_sun.c > =================================================================== > --- libao2/ao_sun.c (revision 28469) > +++ libao2/ao_sun.c (working copy) > @@ -91,6 +91,11 @@ > #elif defined(__svr4__) > ioctl(fd, I_FLUSH, FLUSHW); > #endif > + AUDIO_INITINFO(&info); > + info.play.samples = 0; > + info.play.eof = 0; > + info.play.error = 0; > + ioctl (audio_fd, AUDIO_SETINFO, &info); > } > > // convert an OSS audio format specification into a sun audio encoding ping? From subversion at mplayerhq.hu Sun Mar 8 10:28:02 2009 From: subversion at mplayerhq.hu (reimar) Date: Sun, 8 Mar 2009 10:28:02 +0100 (CET) Subject: [MPlayer-cvslog] r28879 - trunk/libmpdemux/demux_mov.c Message-ID: <20090308092802.1818F3B42D@natsuki.mplayerhq.hu> Author: reimar Date: Sun Mar 8 10:28:01 2009 New Revision: 28879 Log: Remove unused variable from demux_mov. Modified: trunk/libmpdemux/demux_mov.c Modified: trunk/libmpdemux/demux_mov.c ============================================================================== --- trunk/libmpdemux/demux_mov.c Sun Mar 8 10:14:30 2009 (r28878) +++ trunk/libmpdemux/demux_mov.c Sun Mar 8 10:28:01 2009 (r28879) @@ -2192,7 +2192,6 @@ if(trak->pos==0 && trak->stream_header_l if (samplenr < 0) vo_sub = NULL; else if (samplenr != priv->current_sub) { - av_unused sh_sub_t *sh = demuxer->sub->sh; off_t pos = trak->samples[samplenr].pos; int len = trak->samples[samplenr].size; double subpts = (double)trak->samples[samplenr].pts / (double)trak->timescale; From subversion at mplayerhq.hu Sun Mar 8 11:01:21 2009 From: subversion at mplayerhq.hu (reimar) Date: Sun, 8 Mar 2009 11:01:21 +0100 (CET) Subject: [MPlayer-cvslog] r28881 - trunk/DOCS/tech/mingw-crosscompile.txt Message-ID: <20090308100121.DBE8E4E001@natsuki.mplayerhq.hu> Author: reimar Date: Sun Mar 8 11:01:21 2009 New Revision: 28881 Log: Add a small howto explaining how to cross-compile for MinGW Added: trunk/DOCS/tech/mingw-crosscompile.txt Added: trunk/DOCS/tech/mingw-crosscompile.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/DOCS/tech/mingw-crosscompile.txt Sun Mar 8 11:01:21 2009 (r28881) @@ -0,0 +1,31 @@ +Due to a lack of Windows developers, it is a good idea to allow Linux +developers to do at least some basic check of their code. +This HOWTO explains how to set up MinGW cross-compilation under Debian. + +First, you need to install the "mingw32" package and get a MPlayer SVN checkou. + +Next, you need quite a lot of dependencies. Since this is for testing and +not actually use, the easiest way is to use this package: +http://natsuki.mplayerhq.hu/~reimar/mpl_mingw32.tar.bz2 +NOTE that this is likely to be quite out-dated and might include packages +with security issues, so do not use it to build binaries for real use. + +After extracting this package into the MPlayer source-tree, +you only need to run the included linux-mingw.sh to configure (it just runs +./configure --host-cc=cc --target=i686-mingw32msvc --cc=i586-mingw32msvc-cc +--windres=i586-mingw32msvc-windres --ranlib=i586-mingw32msvc-ranlib +--with-extraincdir="$PWD/osdep/mingw32" +--with-extralibdir="$PWD/osdep/mingw32" +--with-freetype-config="$PWD/osdep/mingw32/ftconf") and then run make. + +You should be able to run the generated binary with Wine, if you want to. + +The steps as command-lines: + +sudo apt-get install mingw32 +svn co svn://svn.mplayerhq.hu/mplayer/trunk MPlayer-mingw +cd MPlayer-mingw +wget http://natsuki.mplayerhq.hu/~reimar/mpl_mingw32.tar.bz2 +tar -xjf mpl_mingw32.tar.bz2 +sh linux-mingw.sh +make From subversion at mplayerhq.hu Sun Mar 8 13:57:53 2009 From: subversion at mplayerhq.hu (reimar) Date: Sun, 8 Mar 2009 13:57:53 +0100 (CET) Subject: [MPlayer-cvslog] r28882 - trunk/libmpcodecs/native/rtjpegn.h Message-ID: <20090308125753.97E313B41A@natsuki.mplayerhq.hu> Author: reimar Date: Sun Mar 8 13:57:53 2009 New Revision: 28882 Log: Remove useless "extern" in function declarations. Modified: trunk/libmpcodecs/native/rtjpegn.h Modified: trunk/libmpcodecs/native/rtjpegn.h ============================================================================== --- trunk/libmpcodecs/native/rtjpegn.h Sun Mar 8 11:01:21 2009 (r28881) +++ trunk/libmpcodecs/native/rtjpegn.h Sun Mar 8 13:57:53 2009 (r28882) @@ -35,27 +35,27 @@ #define __s32 int32_t #define __s64 int64_t -extern void RTjpeg_init_Q(__u8 Q); -extern void RTjpeg_init_compress(__u32 *buf, int width, int height, __u8 Q); -extern void RTjpeg_init_decompress(__u32 *buf, int width, int height); -extern int RTjpeg_compressYUV420(__s8 *sp, unsigned char *bp); -extern int RTjpeg_compressYUV422(__s8 *sp, unsigned char *bp); -extern void RTjpeg_decompressYUV420(__s8 *sp, __u8 *bp); -extern void RTjpeg_decompressYUV422(__s8 *sp, __u8 *bp); -extern int RTjpeg_compress8(__s8 *sp, unsigned char *bp); -extern void RTjpeg_decompress8(__s8 *sp, __u8 *bp); +void RTjpeg_init_Q(__u8 Q); +void RTjpeg_init_compress(__u32 *buf, int width, int height, __u8 Q); +void RTjpeg_init_decompress(__u32 *buf, int width, int height); +int RTjpeg_compressYUV420(__s8 *sp, unsigned char *bp); +int RTjpeg_compressYUV422(__s8 *sp, unsigned char *bp); +void RTjpeg_decompressYUV420(__s8 *sp, __u8 *bp); +void RTjpeg_decompressYUV422(__s8 *sp, __u8 *bp); +int RTjpeg_compress8(__s8 *sp, unsigned char *bp); +void RTjpeg_decompress8(__s8 *sp, __u8 *bp); -extern void RTjpeg_init_mcompress(void); -extern int RTjpeg_mcompressYUV420(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask); -extern int RTjpeg_mcompressYUV422(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask); -extern int RTjpeg_mcompress8(__s8 *sp, unsigned char *bp, __u16 lmask); -extern void RTjpeg_set_test(int i); +void RTjpeg_init_mcompress(void); +int RTjpeg_mcompressYUV420(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask); +int RTjpeg_mcompressYUV422(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask); +int RTjpeg_mcompress8(__s8 *sp, unsigned char *bp, __u16 lmask); +void RTjpeg_set_test(int i); -extern void RTjpeg_yuv420rgb(__u8 *buf, __u8 *rgb, int stride); -extern void RTjpeg_yuv422rgb(__u8 *buf, __u8 *rgb, int stride); -extern void RTjpeg_yuvrgb8(__u8 *buf, __u8 *rgb, int stride); -extern void RTjpeg_yuvrgb16(__u8 *buf, __u8 *rgb, int stride); -extern void RTjpeg_yuvrgb24(__u8 *buf, __u8 *rgb, int stride); -extern void RTjpeg_yuvrgb32(__u8 *buf, __u8 *rgb, int stride); +void RTjpeg_yuv420rgb(__u8 *buf, __u8 *rgb, int stride); +void RTjpeg_yuv422rgb(__u8 *buf, __u8 *rgb, int stride); +void RTjpeg_yuvrgb8(__u8 *buf, __u8 *rgb, int stride); +void RTjpeg_yuvrgb16(__u8 *buf, __u8 *rgb, int stride); +void RTjpeg_yuvrgb24(__u8 *buf, __u8 *rgb, int stride); +void RTjpeg_yuvrgb32(__u8 *buf, __u8 *rgb, int stride); #endif /* MPLAYER_RTJPEGN_H */ From subversion at mplayerhq.hu Sun Mar 8 14:02:44 2009 From: subversion at mplayerhq.hu (reimar) Date: Sun, 8 Mar 2009 14:02:44 +0100 (CET) Subject: [MPlayer-cvslog] r28883 - trunk/libmpcodecs/native/rtjpegn.h Message-ID: <20090308130244.799163B414@natsuki.mplayerhq.hu> Author: reimar Date: Sun Mar 8 14:02:44 2009 New Revision: 28883 Log: Remove functions not used by MPlayer from header Modified: trunk/libmpcodecs/native/rtjpegn.h Modified: trunk/libmpcodecs/native/rtjpegn.h ============================================================================== --- trunk/libmpcodecs/native/rtjpegn.h Sun Mar 8 13:57:53 2009 (r28882) +++ trunk/libmpcodecs/native/rtjpegn.h Sun Mar 8 14:02:44 2009 (r28883) @@ -35,27 +35,12 @@ #define __s32 int32_t #define __s64 int64_t -void RTjpeg_init_Q(__u8 Q); void RTjpeg_init_compress(__u32 *buf, int width, int height, __u8 Q); void RTjpeg_init_decompress(__u32 *buf, int width, int height); int RTjpeg_compressYUV420(__s8 *sp, unsigned char *bp); -int RTjpeg_compressYUV422(__s8 *sp, unsigned char *bp); void RTjpeg_decompressYUV420(__s8 *sp, __u8 *bp); -void RTjpeg_decompressYUV422(__s8 *sp, __u8 *bp); -int RTjpeg_compress8(__s8 *sp, unsigned char *bp); -void RTjpeg_decompress8(__s8 *sp, __u8 *bp); void RTjpeg_init_mcompress(void); int RTjpeg_mcompressYUV420(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask); -int RTjpeg_mcompressYUV422(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask); -int RTjpeg_mcompress8(__s8 *sp, unsigned char *bp, __u16 lmask); -void RTjpeg_set_test(int i); - -void RTjpeg_yuv420rgb(__u8 *buf, __u8 *rgb, int stride); -void RTjpeg_yuv422rgb(__u8 *buf, __u8 *rgb, int stride); -void RTjpeg_yuvrgb8(__u8 *buf, __u8 *rgb, int stride); -void RTjpeg_yuvrgb16(__u8 *buf, __u8 *rgb, int stride); -void RTjpeg_yuvrgb24(__u8 *buf, __u8 *rgb, int stride); -void RTjpeg_yuvrgb32(__u8 *buf, __u8 *rgb, int stride); #endif /* MPLAYER_RTJPEGN_H */ From subversion at mplayerhq.hu Sun Mar 8 14:08:22 2009 From: subversion at mplayerhq.hu (reimar) Date: Sun, 8 Mar 2009 14:08:22 +0100 (CET) Subject: [MPlayer-cvslog] r28884 - trunk/libmpcodecs/native/rtjpegn.c Message-ID: <20090308130822.CCAA93B434@natsuki.mplayerhq.hu> Author: reimar Date: Sun Mar 8 14:08:22 2009 New Revision: 28884 Log: Mark everything not used outside the file as "static" Modified: trunk/libmpcodecs/native/rtjpegn.c Modified: trunk/libmpcodecs/native/rtjpegn.c ============================================================================== --- trunk/libmpcodecs/native/rtjpegn.c Sun Mar 8 14:02:44 2009 (r28883) +++ trunk/libmpcodecs/native/rtjpegn.c Sun Mar 8 14:08:22 2009 (r28884) @@ -68,7 +68,7 @@ static const __u64 RTjpeg_aan_tab[64]={ #if !HAVE_MMX static __s32 RTjpeg_ws[64+31]; #endif -__u8 RTjpeg_alldata[2*64+4*64+4*64+4*64+4*64+32]; +static __u8 RTjpeg_alldata[2*64+4*64+4*64+4*64+4*64+32]; static __s16 *block; // rh static __s16 *RTjpeg_block; @@ -86,13 +86,13 @@ static int RTjpeg_Ysize, RTjpeg_Csize; static __s16 *RTjpeg_old=NULL; #if HAVE_MMX -mmx_t RTjpeg_lmask; -mmx_t RTjpeg_cmask; +static mmx_t RTjpeg_lmask; +static mmx_t RTjpeg_cmask; #else -__u16 RTjpeg_lmask; -__u16 RTjpeg_cmask; +static __u16 RTjpeg_lmask; +static __u16 RTjpeg_cmask; #endif -int RTjpeg_mtest=0; +static int RTjpeg_mtest=0; static const unsigned char RTjpeg_lum_quant_tbl[64] = { 16, 11, 10, 16, 24, 40, 51, 61, @@ -133,7 +133,7 @@ static const unsigned char RTjpeg_chrom_ /* Block to Stream (encoding) */ /* */ -int RTjpeg_b2s(__s16 *data, __s8 *strm, __u8 bt8) +static int RTjpeg_b2s(__s16 *data, __s8 *strm, __u8 bt8) { register int ci, co=1; register __s16 ZZvalue; @@ -303,7 +303,7 @@ fprintf(stdout, "\n\n"); /* Stream to Block (decoding) */ /* */ -int RTjpeg_s2b(__s16 *data, __s8 *strm, __u8 bt8, __u32 *qtbl) +static int RTjpeg_s2b(__s16 *data, __s8 *strm, __u8 bt8, __u32 *qtbl) { int ci; register int co; @@ -447,7 +447,7 @@ fprintf(stdout, "\n\n"); #else -int RTjpeg_b2s(__s16 *data, __s8 *strm, __u8 bt8) +static int RTjpeg_b2s(__s16 *data, __s8 *strm, __u8 bt8) { register int ci, co=1, tmp; register __s16 ZZvalue; @@ -506,7 +506,7 @@ int RTjpeg_b2s(__s16 *data, __s8 *strm, return (int)co; } -int RTjpeg_s2b(__s16 *data, __s8 *strm, __u8 bt8, __u32 *qtbl) +static int RTjpeg_s2b(__s16 *data, __s8 *strm, __u8 bt8, __u32 *qtbl) { int ci=1, co=1, tmp; register int i; @@ -539,7 +539,7 @@ int RTjpeg_s2b(__s16 *data, __s8 *strm, #endif #if HAVE_MMX -void RTjpeg_quant_init(void) +static void RTjpeg_quant_init(void) { int i; __s16 *qtbl; @@ -554,7 +554,7 @@ void RTjpeg_quant_init(void) static mmx_t RTjpeg_ones={0x0001000100010001LL}; static mmx_t RTjpeg_half={0x7fff7fff7fff7fffLL}; -void RTjpeg_quant(__s16 *block, __s32 *qtbl) +static void RTjpeg_quant(__s16 *block, __s32 *qtbl) { int i; mmx_t *bl, *ql; @@ -591,11 +591,11 @@ void RTjpeg_quant(__s16 *block, __s32 *q } } #else -void RTjpeg_quant_init(void) +static void RTjpeg_quant_init(void) { } -void RTjpeg_quant(__s16 *block, __s32 *qtbl) +static void RTjpeg_quant(__s16 *block, __s32 *qtbl) { int i; @@ -626,7 +626,7 @@ static mmx_t RTjpeg_zero ={0x00000000000 #define D_MULTIPLY(var,const) ((__s32) ((var) * (const))) #endif -void RTjpeg_dct_init(void) +static void RTjpeg_dct_init(void) { int i; @@ -637,7 +637,7 @@ void RTjpeg_dct_init(void) } } -void RTjpeg_dctY(__u8 *idata, __s16 *odata, int rskip) +static void RTjpeg_dctY(__u8 *idata, __s16 *odata, int rskip) { #if !HAVE_MMX __s32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; @@ -1554,7 +1554,7 @@ void RTjpeg_dctY(__u8 *idata, __s16 *oda #define RL(x) ((x)>235) ? 235 : (((x)<16) ? 16 : (x)) #define MULTIPLY(var,const) (((__s32) ((var) * (const)) + 128)>>8) -void RTjpeg_idct_init(void) +static void RTjpeg_idct_init(void) { int i; @@ -1565,7 +1565,7 @@ void RTjpeg_idct_init(void) } } -void RTjpeg_idct(__u8 *odata, __s16 *data, int rskip) +static void RTjpeg_idct(__u8 *odata, __s16 *data, int rskip) { #if HAVE_MMX @@ -2702,7 +2702,7 @@ Initialise all the cache-aliged data blo */ -void RTjpeg_init_data(void) +static void RTjpeg_init_data(void) { unsigned long dptr; @@ -2733,7 +2733,7 @@ Input: buf -> pointer to 128 ints for qu Q -> quality factor (192=best, 32=worst) */ -void RTjpeg_init_Q(__u8 Q) +static void RTjpeg_init_Q(__u8 Q) { int i; __u64 qual; @@ -2907,7 +2907,7 @@ int RTjpeg_compressYUV420(__s8 *sp, unsi return (sp-sb); } -int RTjpeg_compressYUV422(__s8 *sp, unsigned char *bp) +static int RTjpeg_compressYUV422(__s8 *sp, unsigned char *bp) { __s8 * sb; register __s8 * bp2 = bp + RTjpeg_Ysize; @@ -2951,7 +2951,7 @@ int RTjpeg_compressYUV422(__s8 *sp, unsi return (sp-sb); } -int RTjpeg_compress8(__s8 *sp, unsigned char *bp) +static int RTjpeg_compress8(__s8 *sp, unsigned char *bp) { __s8 * sb; int i, j; @@ -2979,7 +2979,7 @@ int RTjpeg_compress8(__s8 *sp, unsigned return (sp-sb); } -void RTjpeg_decompressYUV422(__s8 *sp, __u8 *bp) +static void RTjpeg_decompressYUV422(__s8 *sp, __u8 *bp) { register __s8 * bp2 = bp + RTjpeg_Ysize; register __s8 * bp3 = bp2 + (RTjpeg_Csize); @@ -3089,7 +3089,7 @@ void RTjpeg_decompressYUV420(__s8 *sp, _ #endif } -void RTjpeg_decompress8(__s8 *sp, __u8 *bp) +static void RTjpeg_decompress8(__s8 *sp, __u8 *bp) { int i, j; @@ -3140,7 +3140,7 @@ void RTjpeg_init_mcompress(void) #if HAVE_MMX -int RTjpeg_bcomp(__s16 *old, mmx_t *mask) +static int RTjpeg_bcomp(__s16 *old, mmx_t *mask) { int i; mmx_t *mold=(mmx_t *)old; @@ -3186,7 +3186,7 @@ int RTjpeg_bcomp(__s16 *old, mmx_t *mask } #else -int RTjpeg_bcomp(__s16 *old, __u16 *mask) +static int RTjpeg_bcomp(__s16 *old, __u16 *mask) { int i; @@ -3201,7 +3201,7 @@ int RTjpeg_bcomp(__s16 *old, __u16 *mask } #endif -void RTjpeg_set_test(int i) +static void RTjpeg_set_test(int i) { RTjpeg_mtest=i; } @@ -3298,7 +3298,7 @@ int RTjpeg_mcompressYUV420(__s8 *sp, uns } -int RTjpeg_mcompressYUV422(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask) +static int RTjpeg_mcompressYUV422(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask) { __s8 * sb; __s16 *block; @@ -3374,7 +3374,7 @@ int RTjpeg_mcompressYUV422(__s8 *sp, uns return (sp-sb); } -int RTjpeg_mcompress8(__s8 *sp, unsigned char *bp, __u16 lmask) +static int RTjpeg_mcompress8(__s8 *sp, unsigned char *bp, __u16 lmask) { __s8 * sb; __s16 *block; @@ -3412,7 +3412,7 @@ int RTjpeg_mcompress8(__s8 *sp, unsigned return (sp-sb); } -void RTjpeg_color_init(void) +static void RTjpeg_color_init(void) { } @@ -3422,7 +3422,7 @@ void RTjpeg_color_init(void) #define KcbB 132252 #define Ky 76284 -void RTjpeg_yuv422rgb(__u8 *buf, __u8 *rgb, int stride) +static void RTjpeg_yuv422rgb(__u8 *buf, __u8 *rgb, int stride) { int tmp; int i, j; @@ -3470,7 +3470,7 @@ void RTjpeg_yuv422rgb(__u8 *buf, __u8 *r } -void RTjpeg_yuv420rgb(__u8 *buf, __u8 *rgb, int stride) +static void RTjpeg_yuv420rgb(__u8 *buf, __u8 *rgb, int stride) { int tmp; int i, j; @@ -3544,7 +3544,7 @@ void RTjpeg_yuv420rgb(__u8 *buf, __u8 *r } -void RTjpeg_yuvrgb32(__u8 *buf, __u8 *rgb, int stride) +static void RTjpeg_yuvrgb32(__u8 *buf, __u8 *rgb, int stride) { int tmp; int i, j; @@ -3620,7 +3620,7 @@ void RTjpeg_yuvrgb32(__u8 *buf, __u8 *rg } } -void RTjpeg_yuvrgb24(__u8 *buf, __u8 *rgb, int stride) +static void RTjpeg_yuvrgb24(__u8 *buf, __u8 *rgb, int stride) { int tmp; int i, j; @@ -3693,7 +3693,7 @@ void RTjpeg_yuvrgb24(__u8 *buf, __u8 *rg } } -void RTjpeg_yuvrgb16(__u8 *buf, __u8 *rgb, int stride) +static void RTjpeg_yuvrgb16(__u8 *buf, __u8 *rgb, int stride) { int tmp; int i, j; @@ -3790,7 +3790,7 @@ void RTjpeg_yuvrgb16(__u8 *buf, __u8 *rg /* fix stride */ -void RTjpeg_yuvrgb8(__u8 *buf, __u8 *rgb, int stride) +static void RTjpeg_yuvrgb8(__u8 *buf, __u8 *rgb, int stride) { memcpy(rgb, buf, RTjpeg_width*RTjpeg_height); } From subversion at mplayerhq.hu Sun Mar 8 14:10:21 2009 From: subversion at mplayerhq.hu (reimar) Date: Sun, 8 Mar 2009 14:10:21 +0100 (CET) Subject: [MPlayer-cvslog] r28885 - trunk/libmpcodecs/native/rtjpegn.c Message-ID: <20090308131021.D546C3B434@natsuki.mplayerhq.hu> Author: reimar Date: Sun Mar 8 14:10:21 2009 New Revision: 28885 Log: Remove colourspace-conversion stuff from rtjpeg, we have functions to do that better and it doesn't belong in that file anyway. Modified: trunk/libmpcodecs/native/rtjpegn.c Modified: trunk/libmpcodecs/native/rtjpegn.c ============================================================================== --- trunk/libmpcodecs/native/rtjpegn.c Sun Mar 8 14:08:22 2009 (r28884) +++ trunk/libmpcodecs/native/rtjpegn.c Sun Mar 8 14:10:21 2009 (r28885) @@ -3411,387 +3411,3 @@ static int RTjpeg_mcompress8(__s8 *sp, u #endif return (sp-sb); } - -static void RTjpeg_color_init(void) -{ -} - -#define KcrR 76284 -#define KcrG 53281 -#define KcbG 25625 -#define KcbB 132252 -#define Ky 76284 - -static void RTjpeg_yuv422rgb(__u8 *buf, __u8 *rgb, int stride) -{ - int tmp; - int i, j; - __s32 y, crR, crG, cbG, cbB; - __u8 *bufcr, *bufcb, *bufy, *bufoute; - int yskip; - - yskip=RTjpeg_width; - - bufcb=&buf[RTjpeg_width*RTjpeg_height]; - bufcr=&buf[RTjpeg_width*RTjpeg_height+(RTjpeg_width*RTjpeg_height)/2]; - bufy=&buf[0]; - bufoute=rgb; - - for(i=0; i<(RTjpeg_height); i++) - { - for(j=0; j>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y-crG-cbG)>>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y+cbB)>>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - - y=(bufy[j+1]-16)*Ky; - - tmp=(y+crR)>>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y-crG-cbG)>>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y+cbB)>>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - - } - bufy+=yskip; - } -} - - -static void RTjpeg_yuv420rgb(__u8 *buf, __u8 *rgb, int stride) -{ - int tmp; - int i, j; - __s32 y, crR, crG, cbG, cbB; - __u8 *bufcr, *bufcb, *bufy, *bufoute, *bufouto; - int oskip, yskip; - - if(stride==0) - oskip=RTjpeg_width*3; - else - oskip=2*stride-RTjpeg_width*3; - - yskip=RTjpeg_width; - - bufcb=&buf[RTjpeg_width*RTjpeg_height]; - bufcr=&buf[RTjpeg_width*RTjpeg_height+(RTjpeg_width*RTjpeg_height)/4]; - bufy=&buf[0]; - bufoute=rgb; - bufouto=rgb+RTjpeg_width*3; - - for(i=0; i<(RTjpeg_height>>1); i++) - { - for(j=0; j>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y-crG-cbG)>>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y+cbB)>>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - - y=(bufy[j+1]-16)*Ky; - - tmp=(y+crR)>>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y-crG-cbG)>>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y+cbB)>>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - - y=(bufy[j+yskip]-16)*Ky; - - tmp=(y+crR)>>16; - *(bufouto++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y-crG-cbG)>>16; - *(bufouto++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y+cbB)>>16; - *(bufouto++)=(tmp>255)?255:((tmp<0)?0:tmp); - - y=(bufy[j+1+yskip]-16)*Ky; - - tmp=(y+crR)>>16; - *(bufouto++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y-crG-cbG)>>16; - *(bufouto++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y+cbB)>>16; - *(bufouto++)=(tmp>255)?255:((tmp<0)?0:tmp); - - } - bufoute+=oskip; - bufouto+=oskip; - bufy+=yskip<<1; - } -} - - -static void RTjpeg_yuvrgb32(__u8 *buf, __u8 *rgb, int stride) -{ - int tmp; - int i, j; - __s32 y, crR, crG, cbG, cbB; - __u8 *bufcr, *bufcb, *bufy, *bufoute, *bufouto; - int oskip, yskip; - - if(stride==0) - oskip=RTjpeg_width*4; - else - oskip = 2*stride-RTjpeg_width*4; - yskip=RTjpeg_width; - - bufcb=&buf[RTjpeg_width*RTjpeg_height]; - bufcr=&buf[RTjpeg_width*RTjpeg_height+(RTjpeg_width*RTjpeg_height)/2]; - bufy=&buf[0]; - bufoute=rgb; - bufouto=rgb+RTjpeg_width*4; - - for(i=0; i<(RTjpeg_height>>1); i++) - { - for(j=0; j>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y-crG-cbG)>>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y+crR)>>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - bufoute++; - - y=(bufy[j+1]-16)*Ky; - - tmp=(y+cbB)>>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y-crG-cbG)>>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y+crR)>>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - bufoute++; - - y=(bufy[j+yskip]-16)*Ky; - - tmp=(y+cbB)>>16; - *(bufouto++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y-crG-cbG)>>16; - *(bufouto++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y+crR)>>16; - *(bufouto++)=(tmp>255)?255:((tmp<0)?0:tmp); - bufouto++; - - y=(bufy[j+1+yskip]-16)*Ky; - - tmp=(y+cbB)>>16; - *(bufouto++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y-crG-cbG)>>16; - *(bufouto++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y+crR)>>16; - *(bufouto++)=(tmp>255)?255:((tmp<0)?0:tmp); - bufouto++; - - } - bufoute+=oskip; - bufouto+=oskip; - bufy+=yskip<<1; - } -} - -static void RTjpeg_yuvrgb24(__u8 *buf, __u8 *rgb, int stride) -{ - int tmp; - int i, j; - __s32 y, crR, crG, cbG, cbB; - __u8 *bufcr, *bufcb, *bufy, *bufoute, *bufouto; - int oskip, yskip; - - if(stride==0) - oskip=RTjpeg_width*3; - else - oskip=2*stride - RTjpeg_width*3; - - yskip=RTjpeg_width; - - bufcb=&buf[RTjpeg_width*RTjpeg_height]; - bufcr=&buf[RTjpeg_width*RTjpeg_height+(RTjpeg_width*RTjpeg_height)/4]; - bufy=&buf[0]; - bufoute=rgb; - bufouto=rgb+RTjpeg_width*3; - - for(i=0; i<(RTjpeg_height>>1); i++) - { - for(j=0; j>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y-crG-cbG)>>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y+crR)>>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - - y=(bufy[j+1]-16)*Ky; - - tmp=(y+cbB)>>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y-crG-cbG)>>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y+crR)>>16; - *(bufoute++)=(tmp>255)?255:((tmp<0)?0:tmp); - - y=(bufy[j+yskip]-16)*Ky; - - tmp=(y+cbB)>>16; - *(bufouto++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y-crG-cbG)>>16; - *(bufouto++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y+crR)>>16; - *(bufouto++)=(tmp>255)?255:((tmp<0)?0:tmp); - - y=(bufy[j+1+yskip]-16)*Ky; - - tmp=(y+cbB)>>16; - *(bufouto++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y-crG-cbG)>>16; - *(bufouto++)=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y+crR)>>16; - *(bufouto++)=(tmp>255)?255:((tmp<0)?0:tmp); - - } - bufoute+=oskip; - bufouto+=oskip; - bufy+=yskip<<1; - } -} - -static void RTjpeg_yuvrgb16(__u8 *buf, __u8 *rgb, int stride) -{ - int tmp; - int i, j; - __s32 y, crR, crG, cbG, cbB; - __u8 *bufcr, *bufcb, *bufy, *bufoute, *bufouto; - int oskip, yskip; - unsigned char r, g, b; - - if(stride==0) - oskip=RTjpeg_width*2; - else - oskip=2*stride-RTjpeg_width*2; - - yskip=RTjpeg_width; - - bufcb=&buf[RTjpeg_width*RTjpeg_height]; - bufcr=&buf[RTjpeg_width*RTjpeg_height+(RTjpeg_width*RTjpeg_height)/4]; - bufy=&buf[0]; - bufoute=rgb; - bufouto=rgb+RTjpeg_width*2; - - for(i=0; i<(RTjpeg_height>>1); i++) - { - for(j=0; j>16; - b=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y-crG-cbG)>>16; - g=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y+crR)>>16; - r=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(int)((int)b >> 3); - tmp|=(int)(((int)g >> 2) << 5); - tmp|=(int)(((int)r >> 3) << 11); - *(bufoute++)=tmp&0xff; - *(bufoute++)=tmp>>8; - - - y=(bufy[j+1]-16)*Ky; - - tmp=(y+cbB)>>16; - b=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y-crG-cbG)>>16; - g=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y+crR)>>16; - r=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(int)((int)b >> 3); - tmp|=(int)(((int)g >> 2) << 5); - tmp|=(int)(((int)r >> 3) << 11); - *(bufoute++)=tmp&0xff; - *(bufoute++)=tmp>>8; - - y=(bufy[j+yskip]-16)*Ky; - - tmp=(y+cbB)>>16; - b=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y-crG-cbG)>>16; - g=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y+crR)>>16; - r=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(int)((int)b >> 3); - tmp|=(int)(((int)g >> 2) << 5); - tmp|=(int)(((int)r >> 3) << 11); - *(bufouto++)=tmp&0xff; - *(bufouto++)=tmp>>8; - - y=(bufy[j+1+yskip]-16)*Ky; - - tmp=(y+cbB)>>16; - b=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y-crG-cbG)>>16; - g=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(y+crR)>>16; - r=(tmp>255)?255:((tmp<0)?0:tmp); - tmp=(int)((int)b >> 3); - tmp|=(int)(((int)g >> 2) << 5); - tmp|=(int)(((int)r >> 3) << 11); - *(bufouto++)=tmp&0xff; - *(bufouto++)=tmp>>8; - - } - bufoute+=oskip; - bufouto+=oskip; - bufy+=yskip<<1; - } -} - -/* fix stride */ - -static void RTjpeg_yuvrgb8(__u8 *buf, __u8 *rgb, int stride) -{ - memcpy(rgb, buf, RTjpeg_width*RTjpeg_height); -} - From subversion at mplayerhq.hu Sun Mar 8 14:17:18 2009 From: subversion at mplayerhq.hu (reimar) Date: Sun, 8 Mar 2009 14:17:18 +0100 (CET) Subject: [MPlayer-cvslog] r28886 - trunk/libmpcodecs/native/rtjpegn.c Message-ID: <20090308131718.6AF623B434@natsuki.mplayerhq.hu> Author: reimar Date: Sun Mar 8 14:17:18 2009 New Revision: 28886 Log: Remove the grayscale and 4:2:2 RTjpeg code, it is neither used nor is there anything special about to to justify preserving it for documentation purposes. Modified: trunk/libmpcodecs/native/rtjpegn.c Modified: trunk/libmpcodecs/native/rtjpegn.c ============================================================================== --- trunk/libmpcodecs/native/rtjpegn.c Sun Mar 8 14:10:21 2009 (r28885) +++ trunk/libmpcodecs/native/rtjpegn.c Sun Mar 8 14:17:18 2009 (r28886) @@ -2907,126 +2907,6 @@ int RTjpeg_compressYUV420(__s8 *sp, unsi return (sp-sb); } -static int RTjpeg_compressYUV422(__s8 *sp, unsigned char *bp) -{ - __s8 * sb; - register __s8 * bp2 = bp + RTjpeg_Ysize; - register __s8 * bp3 = bp2 + RTjpeg_Csize; - register int i, j, k; - -#if HAVE_MMX - emms(); -#endif - sb=sp; -/* Y */ - for(i=RTjpeg_height; i; i-=8) - { - for(j=0, k=0; j>1); - } - if(*sp==-1)sp++; - else - { - sp+=RTjpeg_s2b(RTjpeg_block, sp, RTjpeg_cb8, RTjpeg_ciqt); - RTjpeg_idct(bp3+k, RTjpeg_block, RTjpeg_width>>1); - } - } - bp+=RTjpeg_width<<3; - bp2+=RTjpeg_width<<2; - bp3+=RTjpeg_width<<2; - } -#if HAVE_MMX - emms(); -#endif -} - void RTjpeg_decompressYUV420(__s8 *sp, __u8 *bp) { register __s8 * bp1 = bp + (RTjpeg_width<<3); @@ -3089,28 +2969,6 @@ void RTjpeg_decompressYUV420(__s8 *sp, _ #endif } -static void RTjpeg_decompress8(__s8 *sp, __u8 *bp) -{ - int i, j; - -#if HAVE_MMX - emms(); -#endif - -/* Y */ - for(i=0; i Author: reimar Date: Sun Mar 8 14:21:00 2009 New Revision: 28887 Log: Get rid of pointless debugging code Modified: trunk/libmpcodecs/native/rtjpegn.c Modified: trunk/libmpcodecs/native/rtjpegn.c ============================================================================== --- trunk/libmpcodecs/native/rtjpegn.c Sun Mar 8 14:17:18 2009 (r28886) +++ trunk/libmpcodecs/native/rtjpegn.c Sun Mar 8 14:21:00 2009 (r28887) @@ -92,7 +92,6 @@ static mmx_t RTjpeg_cmask; static __u16 RTjpeg_lmask; static __u16 RTjpeg_cmask; #endif -static int RTjpeg_mtest=0; static const unsigned char RTjpeg_lum_quant_tbl[64] = { 16, 11, 10, 16, 24, 40, 51, 61, @@ -150,11 +149,6 @@ static int RTjpeg_b2s(__s16 *data, __s8 #endif -// *strm++ = 0x10; -// *strm = 0x00; -// -// return 2; - // first byte allways written ((__u8*)strm)[0]= (__u8)(data[RTjpeg_ZZ[0]]>254) ? 254:((data[RTjpeg_ZZ[0]]<0)?0:data[RTjpeg_ZZ[0]]); @@ -2849,8 +2843,6 @@ void RTjpeg_init_decompress(__u32 *buf, RTjpeg_cb8--; RTjpeg_idct_init(); - -// RTjpeg_color_init(); } int RTjpeg_compressYUV420(__s8 *sp, unsigned char *bp) @@ -3035,11 +3027,8 @@ static int RTjpeg_bcomp(__s16 *old, mmx_ if(result.q) { -// if(!RTjpeg_mtest) -// for(i=0; i<16; i++)((__u64 *)old)[i]=((__u64 *)RTjpeg_block)[i]; return 0; } -// printf("."); return 1; } @@ -3051,7 +3040,6 @@ static int RTjpeg_bcomp(__s16 *old, __u1 for(i=0; i<64; i++) if(abs(old[i]-RTjpeg_block[i])>*mask) { - if(!RTjpeg_mtest) for(i=0; i<16; i++)((__u64 *)old)[i]=((__u64 *)RTjpeg_block)[i]; return 0; } @@ -3059,15 +3047,9 @@ static int RTjpeg_bcomp(__s16 *old, __u1 } #endif -static void RTjpeg_set_test(int i) -{ - RTjpeg_mtest=i; -} - int RTjpeg_mcompressYUV420(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask) { __s8 * sb; -//rh __s16 *block; register __s8 * bp1 = bp + (RTjpeg_width<<3); register __s8 * bp2 = bp + RTjpeg_Ysize; register __s8 * bp3 = bp2 + (RTjpeg_Csize>>1); From subversion at mplayerhq.hu Sun Mar 8 14:32:42 2009 From: subversion at mplayerhq.hu (reimar) Date: Sun, 8 Mar 2009 14:32:42 +0100 (CET) Subject: [MPlayer-cvslog] r28888 - in trunk: Makefile etc/codecs.conf libmpcodecs/native/nuppelvideo.c libmpcodecs/native/rtjpegn.c libmpcodecs/native/rtjpegn.h libmpcodecs/vd.c libmpcodecs/vd_nuv.c Message-ID: <20090308133242.BC8733B3FF@natsuki.mplayerhq.hu> Author: reimar Date: Sun Mar 8 14:32:42 2009 New Revision: 28888 Log: Remove internal NuppelVideo decoder, the code in libavcodec can decode those files and some more and is far more maintainable. Deleted: trunk/libmpcodecs/native/nuppelvideo.c trunk/libmpcodecs/vd_nuv.c Modified: trunk/Makefile trunk/etc/codecs.conf trunk/libmpcodecs/native/rtjpegn.c trunk/libmpcodecs/native/rtjpegn.h trunk/libmpcodecs/vd.c Modified: trunk/Makefile ============================================================================== --- trunk/Makefile Sun Mar 8 14:21:00 2009 (r28887) +++ trunk/Makefile Sun Mar 8 14:32:42 2009 (r28888) @@ -92,7 +92,6 @@ SRCS_COMMON = asxparser.c \ libmpcodecs/dec_video.c \ libmpcodecs/img_format.c \ libmpcodecs/mp_image.c \ - libmpcodecs/native/nuppelvideo.c \ libmpcodecs/native/rtjpegn.c \ libmpcodecs/native/xa_gsm.c \ libmpcodecs/pullup.c \ @@ -102,7 +101,6 @@ SRCS_COMMON = asxparser.c \ libmpcodecs/vd_mpegpes.c \ libmpcodecs/vd_mtga.c \ libmpcodecs/vd_null.c \ - libmpcodecs/vd_nuv.c \ libmpcodecs/vd_raw.c \ libmpcodecs/vd_sgi.c \ libmpcodecs/vf.c \ Modified: trunk/etc/codecs.conf ============================================================================== --- trunk/etc/codecs.conf Sun Mar 8 14:21:00 2009 (r28887) +++ trunk/etc/codecs.conf Sun Mar 8 14:32:42 2009 (r28888) @@ -319,14 +319,6 @@ videocodec ffnuv dll nuv out I420 -videocodec nuv - info "NuppelVideo" - status working - fourcc NUV1 ; NUV1 is an internal MPlayer FOURCC - fourcc RJPG - driver nuv - out I420,IYUV - videocodec ffbmp info "FFmpeg BMP" status working Modified: trunk/libmpcodecs/native/rtjpegn.c ============================================================================== --- trunk/libmpcodecs/native/rtjpegn.c Sun Mar 8 14:21:00 2009 (r28887) +++ trunk/libmpcodecs/native/rtjpegn.c Sun Mar 8 14:32:42 2009 (r28888) @@ -293,152 +293,6 @@ fprintf(stdout, "\n\n"); return (int)co; } -/* +++++++++++++++++++++++++++++++++++++++++++++++++++*/ -/* Stream to Block (decoding) */ -/* */ - -static int RTjpeg_s2b(__s16 *data, __s8 *strm, __u8 bt8, __u32 *qtbl) -{ - int ci; - register int co; - register int i; - register unsigned char bitten; - register unsigned char bitoff; - - /* first byte always read */ - i=RTjpeg_ZZ[0]; - data[i]=((__u8)strm[0])*qtbl[i]; - - /* we start at the behind */ - - bitten = ((unsigned char)strm[1]) >> 2; - co = 63; - for(; co > bitten; co--) { - - data[RTjpeg_ZZ[co]] = 0; - - } - - if (co==0) { - ci = 2; - goto AUTOBAHN; - } - - /* we have to read the last 2 bits of the second byte */ - ci=1; - bitoff = 0; - - for(; co>0; co--) { - - bitten = ((unsigned char)strm[ci]) >> bitoff; - bitten &= 0x03; - - i=RTjpeg_ZZ[co]; - - switch( bitten ) { - case 0x03: - data[i]= -qtbl[i]; - break; - case 0x02: - goto FUSSWEG; - break; - case 0x01: - data[i]= qtbl[i]; - break; - case 0x00: - data[i]= 0; - break; - default: - break; - } - - if( bitoff == 0 ) { - bitoff = 8; - ci++; - } - bitoff -= 2; - } - /* co is 0 now */ - /* data is written properly */ - - /* if bitoff!=6 then ci is the index, but should be the byte count, so we increment by 1 */ - if (bitoff!=6) ci++; - - goto AUTOBAHN; - - -FUSSWEG: -/* correct bitoff to nibble */ - switch(bitoff){ - case 4: - case 6: - bitoff = 0; - break; - case 2: - case 0: - /* we have to read from the next byte */ - ci++; - bitoff = 4; - break; - default: - break; - } - - for(; co>0; co--) { - - bitten = ((unsigned char)strm[ci]) >> bitoff; - bitten &= 0x0f; - - i=RTjpeg_ZZ[co]; - - if( bitten == 0x08 ) { - goto STRASSE; - } - - /* the compiler cannot do sign extension for signed nibbles */ - if( bitten & 0x08 ) { - bitten |= 0xf0; - } - /* the unsigned char bitten now is a valid signed char */ - - data[i]=((signed char)bitten)*qtbl[i]; - - if( bitoff == 0 ) { - bitoff = 8; - ci++; - } - bitoff -= 4; - } - /* co is 0 */ - - /* if bitoff!=4 then ci is the index, but should be the byte count, so we increment by 1 */ - if (bitoff!=4) ci++; - - goto AUTOBAHN; - -STRASSE: - ci++; - - for(; co>0; co--) { - i=RTjpeg_ZZ[co]; - data[i]=strm[ci++]*qtbl[i]; - } - - /* ci now is the count, because it points to next element => no incrementing */ - -AUTOBAHN: - -#ifdef SHOWBLOCK -fprintf(stdout, "\nci = '%d'\n", ci); - for (i=0; i < 64; i++) { - fprintf(stdout, "%d ", data[RTjpeg_ZZ[i]]); - } -fprintf(stdout, "\n\n"); -#endif - - return ci; -} - #else static int RTjpeg_b2s(__s16 *data, __s8 *strm, __u8 bt8) @@ -1536,1148 +1390,6 @@ static void RTjpeg_dctY(__u8 *idata, __s #endif } -#define FIX_1_082392200 ((__s32) 277) /* FIX(1.082392200) */ -#define FIX_1_414213562 ((__s32) 362) /* FIX(1.414213562) */ -#define FIX_1_847759065 ((__s32) 473) /* FIX(1.847759065) */ -#define FIX_2_613125930 ((__s32) 669) /* FIX(2.613125930) */ - -#define DESCALE(x) (__s16)( ((x)+4) >> 3) - -/* clip yuv to 16..235 (should be 16..240 for cr/cb but ... */ - -#define RL(x) ((x)>235) ? 235 : (((x)<16) ? 16 : (x)) -#define MULTIPLY(var,const) (((__s32) ((var) * (const)) + 128)>>8) - -static void RTjpeg_idct_init(void) -{ - int i; - - for(i=0; i<64; i++) - { - RTjpeg_liqt[i]=((__u64)RTjpeg_liqt[i]*RTjpeg_aan_tab[i])>>32; - RTjpeg_ciqt[i]=((__u64)RTjpeg_ciqt[i]*RTjpeg_aan_tab[i])>>32; - } -} - -static void RTjpeg_idct(__u8 *odata, __s16 *data, int rskip) -{ -#if HAVE_MMX - -static mmx_t fix_141 = {0x5a825a825a825a82LL}; -static mmx_t fix_184n261 = {0xcf04cf04cf04cf04LL}; -static mmx_t fix_184 = {0x7641764176417641LL}; -static mmx_t fix_n184 = {0x896f896f896f896fLL}; -static mmx_t fix_108n184 = {0xcf04cf04cf04cf04LL}; - - mmx_t workspace[64]; - mmx_t *wsptr = workspace; - register mmx_t *dataptr = (mmx_t *)odata; - mmx_t *idata = (mmx_t *)data; - - rskip = rskip>>3; -/* - * Perform inverse DCT on one block of coefficients. - */ - - /* Odd part */ - - movq_m2r(*(idata+10), mm1); // load idata[DCTSIZE*5] - - movq_m2r(*(idata+6), mm0); // load idata[DCTSIZE*3] - - movq_m2r(*(idata+2), mm3); // load idata[DCTSIZE*1] - - movq_r2r(mm1, mm2); // copy tmp6 /* phase 6 */ - - movq_m2r(*(idata+14), mm4); // load idata[DCTSIZE*7] - - paddw_r2r(mm0, mm1); // z13 = tmp6 + tmp5; - - psubw_r2r(mm0, mm2); // z10 = tmp6 - tmp5 - - psllw_i2r(2, mm2); // shift z10 - movq_r2r(mm2, mm0); // copy z10 - - pmulhw_m2r(fix_184n261, mm2); // MULTIPLY( z12, FIX_1_847759065); /* 2*c2 */ - movq_r2r(mm3, mm5); // copy tmp4 - - pmulhw_m2r(fix_n184, mm0); // MULTIPLY(z10, -FIX_1_847759065); /* 2*c2 */ - paddw_r2r(mm4, mm3); // z11 = tmp4 + tmp7; - - movq_r2r(mm3, mm6); // copy z11 /* phase 5 */ - psubw_r2r(mm4, mm5); // z12 = tmp4 - tmp7; - - psubw_r2r(mm1, mm6); // z11-z13 - psllw_i2r(2, mm5); // shift z12 - - movq_m2r(*(idata+12), mm4); // load idata[DCTSIZE*6], even part - movq_r2r(mm5, mm7); // copy z12 - - pmulhw_m2r(fix_108n184, mm5); // MULT(z12, (FIX_1_08-FIX_1_84)) //- z5; /* 2*(c2-c6) */ even part - paddw_r2r(mm1, mm3); // tmp7 = z11 + z13; - - //ok - - /* Even part */ - pmulhw_m2r(fix_184, mm7); // MULTIPLY(z10,(FIX_1_847759065 - FIX_2_613125930)) //+ z5; /* -2*(c2+c6) */ - psllw_i2r(2, mm6); - - movq_m2r(*(idata+4), mm1); // load idata[DCTSIZE*2] - - paddw_r2r(mm5, mm0); // tmp10 - - paddw_r2r(mm7, mm2); // tmp12 - - pmulhw_m2r(fix_141, mm6); // tmp11 = MULTIPLY(z11 - z13, FIX_1_414213562); /* 2*c4 */ - psubw_r2r(mm3, mm2); // tmp6 = tmp12 - tmp7 - - movq_r2r(mm1, mm5); // copy tmp1 - paddw_r2r(mm4, mm1); // tmp13= tmp1 + tmp3; /* phases 5-3 */ - - psubw_r2r(mm4, mm5); // tmp1-tmp3 - psubw_r2r(mm2, mm6); // tmp5 = tmp11 - tmp6; - - movq_r2m(mm1, *(wsptr)); // save tmp13 in workspace - psllw_i2r(2, mm5); // shift tmp1-tmp3 - - movq_m2r(*(idata), mm7); // load idata[DCTSIZE*0] - - pmulhw_m2r(fix_141, mm5); // MULTIPLY(tmp1 - tmp3, FIX_1_414213562) - paddw_r2r(mm6, mm0); // tmp4 = tmp10 + tmp5; - - movq_m2r(*(idata+8), mm4); // load idata[DCTSIZE*4] - - psubw_r2r(mm1, mm5); // tmp12 = MULTIPLY(tmp1 - tmp3, FIX_1_414213562) - tmp13; /* 2*c4 */ - - movq_r2m(mm0, *(wsptr+4)); // save tmp4 in workspace - movq_r2r(mm7, mm1); // copy tmp0 /* phase 3 */ - - movq_r2m(mm5, *(wsptr+2)); // save tmp12 in workspace - psubw_r2r(mm4, mm1); // tmp11 = tmp0 - tmp2; - - paddw_r2r(mm4, mm7); // tmp10 = tmp0 + tmp2; - movq_r2r(mm1, mm5); // copy tmp11 - - paddw_m2r(*(wsptr+2), mm1); // tmp1 = tmp11 + tmp12; - movq_r2r(mm7, mm4); // copy tmp10 /* phase 2 */ - - paddw_m2r(*(wsptr), mm7); // tmp0 = tmp10 + tmp13; - - psubw_m2r(*(wsptr), mm4); // tmp3 = tmp10 - tmp13; - movq_r2r(mm7, mm0); // copy tmp0 - - psubw_m2r(*(wsptr+2), mm5); // tmp2 = tmp11 - tmp12; - paddw_r2r(mm3, mm7); // wsptr[DCTSIZE*0] = (int) (tmp0 + tmp7); - - psubw_r2r(mm3, mm0); // wsptr[DCTSIZE*7] = (int) (tmp0 - tmp7); - - movq_r2m(mm7, *(wsptr)); // wsptr[DCTSIZE*0] - movq_r2r(mm1, mm3); // copy tmp1 - - movq_r2m(mm0, *(wsptr+14)); // wsptr[DCTSIZE*7] - paddw_r2r(mm2, mm1); // wsptr[DCTSIZE*1] = (int) (tmp1 + tmp6); - - psubw_r2r(mm2, mm3); // wsptr[DCTSIZE*6] = (int) (tmp1 - tmp6); - - movq_r2m(mm1, *(wsptr+2)); // wsptr[DCTSIZE*1] - movq_r2r(mm4, mm1); // copy tmp3 - - movq_r2m(mm3, *(wsptr+12)); // wsptr[DCTSIZE*6] - - paddw_m2r(*(wsptr+4), mm4); // wsptr[DCTSIZE*4] = (int) (tmp3 + tmp4); - - psubw_m2r(*(wsptr+4), mm1); // wsptr[DCTSIZE*3] = (int) (tmp3 - tmp4); - - movq_r2m(mm4, *(wsptr+8)); - movq_r2r(mm5, mm7); // copy tmp2 - - paddw_r2r(mm6, mm5); // wsptr[DCTSIZE*2] = (int) (tmp2 + tmp5) - - movq_r2m(mm1, *(wsptr+6)); - psubw_r2r(mm6, mm7); // wsptr[DCTSIZE*5] = (int) (tmp2 - tmp5); - - movq_r2m(mm5, *(wsptr+4)); - - movq_r2m(mm7, *(wsptr+10)); - - //ok - - -/*****************************************************************/ - - idata++; - wsptr++; - -/*****************************************************************/ - - movq_m2r(*(idata+10), mm1); // load idata[DCTSIZE*5] - - movq_m2r(*(idata+6), mm0); // load idata[DCTSIZE*3] - - movq_m2r(*(idata+2), mm3); // load idata[DCTSIZE*1] - movq_r2r(mm1, mm2); // copy tmp6 /* phase 6 */ - - movq_m2r(*(idata+14), mm4); // load idata[DCTSIZE*7] - paddw_r2r(mm0, mm1); // z13 = tmp6 + tmp5; - - psubw_r2r(mm0, mm2); // z10 = tmp6 - tmp5 - - psllw_i2r(2, mm2); // shift z10 - movq_r2r(mm2, mm0); // copy z10 - - pmulhw_m2r(fix_184n261, mm2); // MULTIPLY( z12, FIX_1_847759065); /* 2*c2 */ - movq_r2r(mm3, mm5); // copy tmp4 - - pmulhw_m2r(fix_n184, mm0); // MULTIPLY(z10, -FIX_1_847759065); /* 2*c2 */ - paddw_r2r(mm4, mm3); // z11 = tmp4 + tmp7; - - movq_r2r(mm3, mm6); // copy z11 /* phase 5 */ - psubw_r2r(mm4, mm5); // z12 = tmp4 - tmp7; - - psubw_r2r(mm1, mm6); // z11-z13 - psllw_i2r(2, mm5); // shift z12 - - movq_m2r(*(idata+12), mm4); // load idata[DCTSIZE*6], even part - movq_r2r(mm5, mm7); // copy z12 - - pmulhw_m2r(fix_108n184, mm5); // MULT(z12, (FIX_1_08-FIX_1_84)) //- z5; /* 2*(c2-c6) */ even part - paddw_r2r(mm1, mm3); // tmp7 = z11 + z13; - - //ok - - /* Even part */ - pmulhw_m2r(fix_184, mm7); // MULTIPLY(z10,(FIX_1_847759065 - FIX_2_613125930)) //+ z5; /* -2*(c2+c6) */ - psllw_i2r(2, mm6); - - movq_m2r(*(idata+4), mm1); // load idata[DCTSIZE*2] - - paddw_r2r(mm5, mm0); // tmp10 - - paddw_r2r(mm7, mm2); // tmp12 - - pmulhw_m2r(fix_141, mm6); // tmp11 = MULTIPLY(z11 - z13, FIX_1_414213562); /* 2*c4 */ - psubw_r2r(mm3, mm2); // tmp6 = tmp12 - tmp7 - - movq_r2r(mm1, mm5); // copy tmp1 - paddw_r2r(mm4, mm1); // tmp13= tmp1 + tmp3; /* phases 5-3 */ - - psubw_r2r(mm4, mm5); // tmp1-tmp3 - psubw_r2r(mm2, mm6); // tmp5 = tmp11 - tmp6; - - movq_r2m(mm1, *(wsptr)); // save tmp13 in workspace - psllw_i2r(2, mm5); // shift tmp1-tmp3 - - movq_m2r(*(idata), mm7); // load idata[DCTSIZE*0] - paddw_r2r(mm6, mm0); // tmp4 = tmp10 + tmp5; - - pmulhw_m2r(fix_141, mm5); // MULTIPLY(tmp1 - tmp3, FIX_1_414213562) - - movq_m2r(*(idata+8), mm4); // load idata[DCTSIZE*4] - - psubw_r2r(mm1, mm5); // tmp12 = MULTIPLY(tmp1 - tmp3, FIX_1_414213562) - tmp13; /* 2*c4 */ - - movq_r2m(mm0, *(wsptr+4)); // save tmp4 in workspace - movq_r2r(mm7, mm1); // copy tmp0 /* phase 3 */ - - movq_r2m(mm5, *(wsptr+2)); // save tmp12 in workspace - psubw_r2r(mm4, mm1); // tmp11 = tmp0 - tmp2; - - paddw_r2r(mm4, mm7); // tmp10 = tmp0 + tmp2; - movq_r2r(mm1, mm5); // copy tmp11 - - paddw_m2r(*(wsptr+2), mm1); // tmp1 = tmp11 + tmp12; - movq_r2r(mm7, mm4); // copy tmp10 /* phase 2 */ - - paddw_m2r(*(wsptr), mm7); // tmp0 = tmp10 + tmp13; - - psubw_m2r(*(wsptr), mm4); // tmp3 = tmp10 - tmp13; - movq_r2r(mm7, mm0); // copy tmp0 - - psubw_m2r(*(wsptr+2), mm5); // tmp2 = tmp11 - tmp12; - paddw_r2r(mm3, mm7); // wsptr[DCTSIZE*0] = (int) (tmp0 + tmp7); - - psubw_r2r(mm3, mm0); // wsptr[DCTSIZE*7] = (int) (tmp0 - tmp7); - - movq_r2m(mm7, *(wsptr)); // wsptr[DCTSIZE*0] - movq_r2r(mm1, mm3); // copy tmp1 - - movq_r2m(mm0, *(wsptr+14)); // wsptr[DCTSIZE*7] - paddw_r2r(mm2, mm1); // wsptr[DCTSIZE*1] = (int) (tmp1 + tmp6); - - psubw_r2r(mm2, mm3); // wsptr[DCTSIZE*6] = (int) (tmp1 - tmp6); - - movq_r2m(mm1, *(wsptr+2)); // wsptr[DCTSIZE*1] - movq_r2r(mm4, mm1); // copy tmp3 - - movq_r2m(mm3, *(wsptr+12)); // wsptr[DCTSIZE*6] - - paddw_m2r(*(wsptr+4), mm4); // wsptr[DCTSIZE*4] = (int) (tmp3 + tmp4); - - psubw_m2r(*(wsptr+4), mm1); // wsptr[DCTSIZE*3] = (int) (tmp3 - tmp4); - - movq_r2m(mm4, *(wsptr+8)); - movq_r2r(mm5, mm7); // copy tmp2 - - paddw_r2r(mm6, mm5); // wsptr[DCTSIZE*2] = (int) (tmp2 + tmp5) - - movq_r2m(mm1, *(wsptr+6)); - psubw_r2r(mm6, mm7); // wsptr[DCTSIZE*5] = (int) (tmp2 - tmp5); - - movq_r2m(mm5, *(wsptr+4)); - - movq_r2m(mm7, *(wsptr+10)); - -/*****************************************************************/ - - /* Pass 2: process rows from work array, store into output array. */ - /* Note that we must descale the results by a factor of 8 == 2**3, */ - /* and also undo the PASS1_BITS scaling. */ - -/*****************************************************************/ - /* Even part */ - - wsptr--; - -// tmp10 = ((DCTELEM) wsptr[0] + (DCTELEM) wsptr[4]); -// tmp13 = ((DCTELEM) wsptr[2] + (DCTELEM) wsptr[6]); -// tmp11 = ((DCTELEM) wsptr[0] - (DCTELEM) wsptr[4]); -// tmp14 = ((DCTELEM) wsptr[2] - (DCTELEM) wsptr[6]); - movq_m2r(*(wsptr), mm0); // wsptr[0,0],[0,1],[0,2],[0,3] - - movq_m2r(*(wsptr+1), mm1); // wsptr[0,4],[0,5],[0,6],[0,7] - movq_r2r(mm0, mm2); - - movq_m2r(*(wsptr+2), mm3); // wsptr[1,0],[1,1],[1,2],[1,3] - paddw_r2r(mm1, mm0); // wsptr[0,tmp10],[xxx],[0,tmp13],[xxx] - - movq_m2r(*(wsptr+3), mm4); // wsptr[1,4],[1,5],[1,6],[1,7] - psubw_r2r(mm1, mm2); // wsptr[0,tmp11],[xxx],[0,tmp14],[xxx] - - movq_r2r(mm0, mm6); - movq_r2r(mm3, mm5); - - paddw_r2r(mm4, mm3); // wsptr[1,tmp10],[xxx],[1,tmp13],[xxx] - movq_r2r(mm2, mm1); - - psubw_r2r(mm4, mm5); // wsptr[1,tmp11],[xxx],[1,tmp14],[xxx] - punpcklwd_r2r(mm3, mm0); // wsptr[0,tmp10],[1,tmp10],[xxx],[xxx] - - movq_m2r(*(wsptr+7), mm7); // wsptr[3,4],[3,5],[3,6],[3,7] - punpckhwd_r2r(mm3, mm6); // wsptr[0,tmp13],[1,tmp13],[xxx],[xxx] - - movq_m2r(*(wsptr+4), mm3); // wsptr[2,0],[2,1],[2,2],[2,3] - punpckldq_r2r(mm6, mm0); // wsptr[0,tmp10],[1,tmp10],[0,tmp13],[1,tmp13] - - punpcklwd_r2r(mm5, mm1); // wsptr[0,tmp11],[1,tmp11],[xxx],[xxx] - movq_r2r(mm3, mm4); - - movq_m2r(*(wsptr+6), mm6); // wsptr[3,0],[3,1],[3,2],[3,3] - punpckhwd_r2r(mm5, mm2); // wsptr[0,tmp14],[1,tmp14],[xxx],[xxx] - - movq_m2r(*(wsptr+5), mm5); // wsptr[2,4],[2,5],[2,6],[2,7] - punpckldq_r2r(mm2, mm1); // wsptr[0,tmp11],[1,tmp11],[0,tmp14],[1,tmp14] - - - paddw_r2r(mm5, mm3); // wsptr[2,tmp10],[xxx],[2,tmp13],[xxx] - movq_r2r(mm6, mm2); - - psubw_r2r(mm5, mm4); // wsptr[2,tmp11],[xxx],[2,tmp14],[xxx] - paddw_r2r(mm7, mm6); // wsptr[3,tmp10],[xxx],[3,tmp13],[xxx] - - movq_r2r(mm3, mm5); - punpcklwd_r2r(mm6, mm3); // wsptr[2,tmp10],[3,tmp10],[xxx],[xxx] - - psubw_r2r(mm7, mm2); // wsptr[3,tmp11],[xxx],[3,tmp14],[xxx] - punpckhwd_r2r(mm6, mm5); // wsptr[2,tmp13],[3,tmp13],[xxx],[xxx] - - movq_r2r(mm4, mm7); - punpckldq_r2r(mm5, mm3); // wsptr[2,tmp10],[3,tmp10],[2,tmp13],[3,tmp13] - - punpcklwd_r2r(mm2, mm4); // wsptr[2,tmp11],[3,tmp11],[xxx],[xxx] - - punpckhwd_r2r(mm2, mm7); // wsptr[2,tmp14],[3,tmp14],[xxx],[xxx] - - punpckldq_r2r(mm7, mm4); // wsptr[2,tmp11],[3,tmp11],[2,tmp14],[3,tmp14] - movq_r2r(mm1, mm6); - - //ok - -// mm0 = ;wsptr[0,tmp10],[1,tmp10],[0,tmp13],[1,tmp13] -// mm1 = ;wsptr[0,tmp11],[1,tmp11],[0,tmp14],[1,tmp14] - - - movq_r2r(mm0, mm2); - punpckhdq_r2r(mm4, mm6); // wsptr[0,tmp14],[1,tmp14],[2,tmp14],[3,tmp14] - - punpckldq_r2r(mm4, mm1); // wsptr[0,tmp11],[1,tmp11],[2,tmp11],[3,tmp11] - psllw_i2r(2, mm6); - - pmulhw_m2r(fix_141, mm6); - punpckldq_r2r(mm3, mm0); // wsptr[0,tmp10],[1,tmp10],[2,tmp10],[3,tmp10] - - punpckhdq_r2r(mm3, mm2); // wsptr[0,tmp13],[1,tmp13],[2,tmp13],[3,tmp13] - movq_r2r(mm0, mm7); - -// tmp0 = tmp10 + tmp13; -// tmp3 = tmp10 - tmp13; - paddw_r2r(mm2, mm0); // [0,tmp0],[1,tmp0],[2,tmp0],[3,tmp0] - psubw_r2r(mm2, mm7); // [0,tmp3],[1,tmp3],[2,tmp3],[3,tmp3] - -// tmp12 = MULTIPLY(tmp14, FIX_1_414213562) - tmp13; - psubw_r2r(mm2, mm6); // wsptr[0,tmp12],[1,tmp12],[2,tmp12],[3,tmp12] -// tmp1 = tmp11 + tmp12; -// tmp2 = tmp11 - tmp12; - movq_r2r(mm1, mm5); - - //OK - - /* Odd part */ - -// z13 = (DCTELEM) wsptr[5] + (DCTELEM) wsptr[3]; -// z10 = (DCTELEM) wsptr[5] - (DCTELEM) wsptr[3]; -// z11 = (DCTELEM) wsptr[1] + (DCTELEM) wsptr[7]; -// z12 = (DCTELEM) wsptr[1] - (DCTELEM) wsptr[7]; - movq_m2r(*(wsptr), mm3); // wsptr[0,0],[0,1],[0,2],[0,3] - paddw_r2r(mm6, mm1); // [0,tmp1],[1,tmp1],[2,tmp1],[3,tmp1] - - movq_m2r(*(wsptr+1), mm4); // wsptr[0,4],[0,5],[0,6],[0,7] - psubw_r2r(mm6, mm5); // [0,tmp2],[1,tmp2],[2,tmp2],[3,tmp2] - - movq_r2r(mm3, mm6); - punpckldq_r2r(mm4, mm3); // wsptr[0,0],[0,1],[0,4],[0,5] - - punpckhdq_r2r(mm6, mm4); // wsptr[0,6],[0,7],[0,2],[0,3] - movq_r2r(mm3, mm2); - -//Save tmp0 and tmp1 in wsptr - movq_r2m(mm0, *(wsptr)); // save tmp0 - paddw_r2r(mm4, mm2); // wsptr[xxx],[0,z11],[xxx],[0,z13] - - -//Continue with z10 --- z13 - movq_m2r(*(wsptr+2), mm6); // wsptr[1,0],[1,1],[1,2],[1,3] - psubw_r2r(mm4, mm3); // wsptr[xxx],[0,z12],[xxx],[0,z10] - - movq_m2r(*(wsptr+3), mm0); // wsptr[1,4],[1,5],[1,6],[1,7] - movq_r2r(mm6, mm4); - - movq_r2m(mm1, *(wsptr+1)); // save tmp1 - punpckldq_r2r(mm0, mm6); // wsptr[1,0],[1,1],[1,4],[1,5] - - punpckhdq_r2r(mm4, mm0); // wsptr[1,6],[1,7],[1,2],[1,3] - movq_r2r(mm6, mm1); - -//Save tmp2 and tmp3 in wsptr - paddw_r2r(mm0, mm6); // wsptr[xxx],[1,z11],[xxx],[1,z13] - movq_r2r(mm2, mm4); - -//Continue with z10 --- z13 - movq_r2m(mm5, *(wsptr+2)); // save tmp2 - punpcklwd_r2r(mm6, mm2); // wsptr[xxx],[xxx],[0,z11],[1,z11] - - psubw_r2r(mm0, mm1); // wsptr[xxx],[1,z12],[xxx],[1,z10] - punpckhwd_r2r(mm6, mm4); // wsptr[xxx],[xxx],[0,z13],[1,z13] - - movq_r2r(mm3, mm0); - punpcklwd_r2r(mm1, mm3); // wsptr[xxx],[xxx],[0,z12],[1,z12] - - movq_r2m(mm7, *(wsptr+3)); // save tmp3 - punpckhwd_r2r(mm1, mm0); // wsptr[xxx],[xxx],[0,z10],[1,z10] - - movq_m2r(*(wsptr+4), mm6); // wsptr[2,0],[2,1],[2,2],[2,3] - punpckhdq_r2r(mm2, mm0); // wsptr[0,z10],[1,z10],[0,z11],[1,z11] - - movq_m2r(*(wsptr+5), mm7); // wsptr[2,4],[2,5],[2,6],[2,7] - punpckhdq_r2r(mm4, mm3); // wsptr[0,z12],[1,z12],[0,z13],[1,z13] - - movq_m2r(*(wsptr+6), mm1); // wsptr[3,0],[3,1],[3,2],[3,3] - movq_r2r(mm6, mm4); - - punpckldq_r2r(mm7, mm6); // wsptr[2,0],[2,1],[2,4],[2,5] - movq_r2r(mm1, mm5); - - punpckhdq_r2r(mm4, mm7); // wsptr[2,6],[2,7],[2,2],[2,3] - movq_r2r(mm6, mm2); - - movq_m2r(*(wsptr+7), mm4); // wsptr[3,4],[3,5],[3,6],[3,7] - paddw_r2r(mm7, mm6); // wsptr[xxx],[2,z11],[xxx],[2,z13] - - psubw_r2r(mm7, mm2); // wsptr[xxx],[2,z12],[xxx],[2,z10] - punpckldq_r2r(mm4, mm1); // wsptr[3,0],[3,1],[3,4],[3,5] - - punpckhdq_r2r(mm5, mm4); // wsptr[3,6],[3,7],[3,2],[3,3] - movq_r2r(mm1, mm7); - - paddw_r2r(mm4, mm1); // wsptr[xxx],[3,z11],[xxx],[3,z13] - psubw_r2r(mm4, mm7); // wsptr[xxx],[3,z12],[xxx],[3,z10] - - movq_r2r(mm6, mm5); - punpcklwd_r2r(mm1, mm6); // wsptr[xxx],[xxx],[2,z11],[3,z11] - - punpckhwd_r2r(mm1, mm5); // wsptr[xxx],[xxx],[2,z13],[3,z13] - movq_r2r(mm2, mm4); - - punpcklwd_r2r(mm7, mm2); // wsptr[xxx],[xxx],[2,z12],[3,z12] - - punpckhwd_r2r(mm7, mm4); // wsptr[xxx],[xxx],[2,z10],[3,z10] - - punpckhdq_r2r(mm6, mm4); /// wsptr[2,z10],[3,z10],[2,z11],[3,z11] - - punpckhdq_r2r(mm5, mm2); // wsptr[2,z12],[3,z12],[2,z13],[3,z13] - movq_r2r(mm0, mm5); - - punpckldq_r2r(mm4, mm0); // wsptr[0,z10],[1,z10],[2,z10],[3,z10] - - punpckhdq_r2r(mm4, mm5); // wsptr[0,z11],[1,z11],[2,z11],[3,z11] - movq_r2r(mm3, mm4); - - punpckhdq_r2r(mm2, mm4); // wsptr[0,z13],[1,z13],[2,z13],[3,z13] - movq_r2r(mm5, mm1); - - punpckldq_r2r(mm2, mm3); // wsptr[0,z12],[1,z12],[2,z12],[3,z12] -// tmp7 = z11 + z13; /* phase 5 */ -// tmp8 = z11 - z13; /* phase 5 */ - psubw_r2r(mm4, mm1); // tmp8 - - paddw_r2r(mm4, mm5); // tmp7 -// tmp21 = MULTIPLY(tmp8, FIX_1_414213562); /* 2*c4 */ - psllw_i2r(2, mm1); - - psllw_i2r(2, mm0); - - pmulhw_m2r(fix_141, mm1); // tmp21 -// tmp20 = MULTIPLY(z12, (FIX_1_082392200- FIX_1_847759065)) /* 2*(c2-c6) */ -// + MULTIPLY(z10, - FIX_1_847759065); /* 2*c2 */ - psllw_i2r(2, mm3); - movq_r2r(mm0, mm7); - - pmulhw_m2r(fix_n184, mm7); - movq_r2r(mm3, mm6); - - movq_m2r(*(wsptr), mm2); // tmp0,final1 - - pmulhw_m2r(fix_108n184, mm6); -// tmp22 = MULTIPLY(z10,(FIX_1_847759065 - FIX_2_613125930)) /* -2*(c2+c6) */ -// + MULTIPLY(z12, FIX_1_847759065); /* 2*c2 */ - movq_r2r(mm2, mm4); // final1 - - pmulhw_m2r(fix_184n261, mm0); - paddw_r2r(mm5, mm2); // tmp0+tmp7,final1 - - pmulhw_m2r(fix_184, mm3); - psubw_r2r(mm5, mm4); // tmp0-tmp7,final1 - -// tmp6 = tmp22 - tmp7; /* phase 2 */ - psraw_i2r(3, mm2); // outptr[0,0],[1,0],[2,0],[3,0],final1 - - paddw_r2r(mm6, mm7); // tmp20 - psraw_i2r(3, mm4); // outptr[0,7],[1,7],[2,7],[3,7],final1 - - paddw_r2r(mm0, mm3); // tmp22 - -// tmp5 = tmp21 - tmp6; - psubw_r2r(mm5, mm3); // tmp6 - -// tmp4 = tmp20 + tmp5; - movq_m2r(*(wsptr+1), mm0); // tmp1,final2 - psubw_r2r(mm3, mm1); // tmp5 - - movq_r2r(mm0, mm6); // final2 - paddw_r2r(mm3, mm0); // tmp1+tmp6,final2 - - /* Final output stage: scale down by a factor of 8 and range-limit */ - - -// outptr[0] = range_limit[IDESCALE(tmp0 + tmp7, PASS1_BITS+3) -// & RANGE_MASK]; -// outptr[7] = range_limit[IDESCALE(tmp0 - tmp7, PASS1_BITS+3) -// & RANGE_MASK]; final1 - - -// outptr[1] = range_limit[IDESCALE(tmp1 + tmp6, PASS1_BITS+3) -// & RANGE_MASK]; -// outptr[6] = range_limit[IDESCALE(tmp1 - tmp6, PASS1_BITS+3) -// & RANGE_MASK]; final2 - psubw_r2r(mm3, mm6); // tmp1-tmp6,final2 - psraw_i2r(3, mm0); // outptr[0,1],[1,1],[2,1],[3,1] - - psraw_i2r(3, mm6); // outptr[0,6],[1,6],[2,6],[3,6] - - packuswb_r2r(mm4, mm0); // out[0,1],[1,1],[2,1],[3,1],[0,7],[1,7],[2,7],[3,7] - - movq_m2r(*(wsptr+2), mm5); // tmp2,final3 - packuswb_r2r(mm6, mm2); // out[0,0],[1,0],[2,0],[3,0],[0,6],[1,6],[2,6],[3,6] - -// outptr[2] = range_limit[IDESCALE(tmp2 + tmp5, PASS1_BITS+3) -// & RANGE_MASK]; -// outptr[5] = range_limit[IDESCALE(tmp2 - tmp5, PASS1_BITS+3) -// & RANGE_MASK]; final3 - paddw_r2r(mm1, mm7); // tmp4 - movq_r2r(mm5, mm3); - - paddw_r2r(mm1, mm5); // tmp2+tmp5 - psubw_r2r(mm1, mm3); // tmp2-tmp5 - - psraw_i2r(3, mm5); // outptr[0,2],[1,2],[2,2],[3,2] - - movq_m2r(*(wsptr+3), mm4); // tmp3,final4 - psraw_i2r(3, mm3); // outptr[0,5],[1,5],[2,5],[3,5] - - - -// outptr[4] = range_limit[IDESCALE(tmp3 + tmp4, PASS1_BITS+3) -// & RANGE_MASK]; -// outptr[3] = range_limit[IDESCALE(tmp3 - tmp4, PASS1_BITS+3) -// & RANGE_MASK]; final4 - movq_r2r(mm4, mm6); - paddw_r2r(mm7, mm4); // tmp3+tmp4 - - psubw_r2r(mm7, mm6); // tmp3-tmp4 - psraw_i2r(3, mm4); // outptr[0,4],[1,4],[2,4],[3,4] - - // mov ecx, [dataptr] - - psraw_i2r(3, mm6); // outptr[0,3],[1,3],[2,3],[3,3] - - packuswb_r2r(mm4, mm5); // out[0,2],[1,2],[2,2],[3,2],[0,4],[1,4],[2,4],[3,4] - - packuswb_r2r(mm3, mm6); // out[0,3],[1,3],[2,3],[3,3],[0,5],[1,5],[2,5],[3,5] - movq_r2r(mm2, mm4); - - movq_r2r(mm5, mm7); - punpcklbw_r2r(mm0, mm2); // out[0,0],[0,1],[1,0],[1,1],[2,0],[2,1],[3,0],[3,1] - - punpckhbw_r2r(mm0, mm4); // out[0,6],[0,7],[1,6],[1,7],[2,6],[2,7],[3,6],[3,7] - movq_r2r(mm2, mm1); - - punpcklbw_r2r(mm6, mm5); // out[0,2],[0,3],[1,2],[1,3],[2,2],[2,3],[3,2],[3,3] - - // add dataptr, 4 - - punpckhbw_r2r(mm6, mm7); // out[0,4],[0,5],[1,4],[1,5],[2,4],[2,5],[3,4],[3,5] - - punpcklwd_r2r(mm5, mm2); // out[0,0],[0,1],[0,2],[0,3],[1,0],[1,1],[1,2],[1,3] - - // add ecx, output_col - - movq_r2r(mm7, mm6); - punpckhwd_r2r(mm5, mm1); // out[2,0],[2,1],[2,2],[2,3],[3,0],[3,1],[3,2],[3,3] - - movq_r2r(mm2, mm0); - punpcklwd_r2r(mm4, mm6); // out[0,4],[0,5],[0,6],[0,7],[1,4],[1,5],[1,6],[1,7] - - // mov idata, [dataptr] - - punpckldq_r2r(mm6, mm2); // out[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7] - - // add dataptr, 4 - - movq_r2r(mm1, mm3); - - // add idata, output_col - - punpckhwd_r2r(mm4, mm7); // out[2,4],[2,5],[2,6],[2,7],[3,4],[3,5],[3,6],[3,7] - - movq_r2m(mm2, *(dataptr)); - - punpckhdq_r2r(mm6, mm0); // out[1,0],[1,1],[1,2],[1,3],[1,4],[1,5],[1,6],[1,7] - - dataptr += rskip; - movq_r2m(mm0, *(dataptr)); - - punpckldq_r2r(mm7, mm1); // out[2,0],[2,1],[2,2],[2,3],[2,4],[2,5],[2,6],[2,7] - punpckhdq_r2r(mm7, mm3); // out[3,0],[3,1],[3,2],[3,3],[3,4],[3,5],[3,6],[3,7] - - dataptr += rskip; - movq_r2m(mm1, *(dataptr)); - - dataptr += rskip; - movq_r2m(mm3, *(dataptr)); - -/*******************************************************************/ - - wsptr += 8; - -/*******************************************************************/ - -// tmp10 = ((DCTELEM) wsptr[0] + (DCTELEM) wsptr[4]); -// tmp13 = ((DCTELEM) wsptr[2] + (DCTELEM) wsptr[6]); -// tmp11 = ((DCTELEM) wsptr[0] - (DCTELEM) wsptr[4]); -// tmp14 = ((DCTELEM) wsptr[2] - (DCTELEM) wsptr[6]); - movq_m2r(*(wsptr), mm0); // wsptr[0,0],[0,1],[0,2],[0,3] - - movq_m2r(*(wsptr+1), mm1); // wsptr[0,4],[0,5],[0,6],[0,7] - movq_r2r(mm0, mm2); - - movq_m2r(*(wsptr+2), mm3); // wsptr[1,0],[1,1],[1,2],[1,3] - paddw_r2r(mm1, mm0); // wsptr[0,tmp10],[xxx],[0,tmp13],[xxx] - - movq_m2r(*(wsptr+3), mm4); // wsptr[1,4],[1,5],[1,6],[1,7] - psubw_r2r(mm1, mm2); // wsptr[0,tmp11],[xxx],[0,tmp14],[xxx] - - movq_r2r(mm0, mm6); - movq_r2r(mm3, mm5); - - paddw_r2r(mm4, mm3); // wsptr[1,tmp10],[xxx],[1,tmp13],[xxx] - movq_r2r(mm2, mm1); - - psubw_r2r(mm4, mm5); // wsptr[1,tmp11],[xxx],[1,tmp14],[xxx] - punpcklwd_r2r(mm3, mm0); // wsptr[0,tmp10],[1,tmp10],[xxx],[xxx] - - movq_m2r(*(wsptr+7), mm7); // wsptr[3,4],[3,5],[3,6],[3,7] - punpckhwd_r2r(mm3, mm6); // wsptr[0,tmp13],[1,tmp13],[xxx],[xxx] - - movq_m2r(*(wsptr+4), mm3); // wsptr[2,0],[2,1],[2,2],[2,3] - punpckldq_r2r(mm6, mm0); // wsptr[0,tmp10],[1,tmp10],[0,tmp13],[1,tmp13] - - punpcklwd_r2r(mm5, mm1); // wsptr[0,tmp11],[1,tmp11],[xxx],[xxx] - movq_r2r(mm3, mm4); - - movq_m2r(*(wsptr+6), mm6); // wsptr[3,0],[3,1],[3,2],[3,3] - punpckhwd_r2r(mm5, mm2); // wsptr[0,tmp14],[1,tmp14],[xxx],[xxx] - - movq_m2r(*(wsptr+5), mm5); // wsptr[2,4],[2,5],[2,6],[2,7] - punpckldq_r2r(mm2, mm1); // wsptr[0,tmp11],[1,tmp11],[0,tmp14],[1,tmp14] - - paddw_r2r(mm5, mm3); // wsptr[2,tmp10],[xxx],[2,tmp13],[xxx] - movq_r2r(mm6, mm2); - - psubw_r2r(mm5, mm4); // wsptr[2,tmp11],[xxx],[2,tmp14],[xxx] - paddw_r2r(mm7, mm6); // wsptr[3,tmp10],[xxx],[3,tmp13],[xxx] - - movq_r2r(mm3, mm5); - punpcklwd_r2r(mm6, mm3); // wsptr[2,tmp10],[3,tmp10],[xxx],[xxx] - - psubw_r2r(mm7, mm2); // wsptr[3,tmp11],[xxx],[3,tmp14],[xxx] - punpckhwd_r2r(mm6, mm5); // wsptr[2,tmp13],[3,tmp13],[xxx],[xxx] - - movq_r2r(mm4, mm7); - punpckldq_r2r(mm5, mm3); // wsptr[2,tmp10],[3,tmp10],[2,tmp13],[3,tmp13] - - punpcklwd_r2r(mm2, mm4); // wsptr[2,tmp11],[3,tmp11],[xxx],[xxx] - - punpckhwd_r2r(mm2, mm7); // wsptr[2,tmp14],[3,tmp14],[xxx],[xxx] - - punpckldq_r2r(mm7, mm4); // wsptr[2,tmp11],[3,tmp11],[2,tmp14],[3,tmp14] - movq_r2r(mm1, mm6); - - //OK - -// mm0 = ;wsptr[0,tmp10],[1,tmp10],[0,tmp13],[1,tmp13] -// mm1 = ;wsptr[0,tmp11],[1,tmp11],[0,tmp14],[1,tmp14] - - movq_r2r(mm0, mm2); - punpckhdq_r2r(mm4, mm6); // wsptr[0,tmp14],[1,tmp14],[2,tmp14],[3,tmp14] - - punpckldq_r2r(mm4, mm1); // wsptr[0,tmp11],[1,tmp11],[2,tmp11],[3,tmp11] - psllw_i2r(2, mm6); - - pmulhw_m2r(fix_141, mm6); - punpckldq_r2r(mm3, mm0); // wsptr[0,tmp10],[1,tmp10],[2,tmp10],[3,tmp10] - - punpckhdq_r2r(mm3, mm2); // wsptr[0,tmp13],[1,tmp13],[2,tmp13],[3,tmp13] - movq_r2r(mm0, mm7); - -// tmp0 = tmp10 + tmp13; -// tmp3 = tmp10 - tmp13; - paddw_r2r(mm2, mm0); // [0,tmp0],[1,tmp0],[2,tmp0],[3,tmp0] - psubw_r2r(mm2, mm7); // [0,tmp3],[1,tmp3],[2,tmp3],[3,tmp3] - -// tmp12 = MULTIPLY(tmp14, FIX_1_414213562) - tmp13; - psubw_r2r(mm2, mm6); // wsptr[0,tmp12],[1,tmp12],[2,tmp12],[3,tmp12] -// tmp1 = tmp11 + tmp12; -// tmp2 = tmp11 - tmp12; - movq_r2r(mm1, mm5); - - //OK - - - /* Odd part */ - -// z13 = (DCTELEM) wsptr[5] + (DCTELEM) wsptr[3]; -// z10 = (DCTELEM) wsptr[5] - (DCTELEM) wsptr[3]; -// z11 = (DCTELEM) wsptr[1] + (DCTELEM) wsptr[7]; -// z12 = (DCTELEM) wsptr[1] - (DCTELEM) wsptr[7]; - movq_m2r(*(wsptr), mm3); // wsptr[0,0],[0,1],[0,2],[0,3] - paddw_r2r(mm6, mm1); // [0,tmp1],[1,tmp1],[2,tmp1],[3,tmp1] - - movq_m2r(*(wsptr+1), mm4); // wsptr[0,4],[0,5],[0,6],[0,7] - psubw_r2r(mm6, mm5); // [0,tmp2],[1,tmp2],[2,tmp2],[3,tmp2] - - movq_r2r(mm3, mm6); - punpckldq_r2r(mm4, mm3); // wsptr[0,0],[0,1],[0,4],[0,5] - - punpckhdq_r2r(mm6, mm4); // wsptr[0,6],[0,7],[0,2],[0,3] - movq_r2r(mm3, mm2); - -//Save tmp0 and tmp1 in wsptr - movq_r2m(mm0, *(wsptr)); // save tmp0 - paddw_r2r(mm4, mm2); // wsptr[xxx],[0,z11],[xxx],[0,z13] - - -//Continue with z10 --- z13 - movq_m2r(*(wsptr+2), mm6); // wsptr[1,0],[1,1],[1,2],[1,3] - psubw_r2r(mm4, mm3); // wsptr[xxx],[0,z12],[xxx],[0,z10] - - movq_m2r(*(wsptr+3), mm0); // wsptr[1,4],[1,5],[1,6],[1,7] - movq_r2r(mm6, mm4); - - movq_r2m(mm1, *(wsptr+1)); // save tmp1 - punpckldq_r2r(mm0, mm6); // wsptr[1,0],[1,1],[1,4],[1,5] - - punpckhdq_r2r(mm4, mm0); // wsptr[1,6],[1,7],[1,2],[1,3] - movq_r2r(mm6, mm1); - -//Save tmp2 and tmp3 in wsptr - paddw_r2r(mm0, mm6); // wsptr[xxx],[1,z11],[xxx],[1,z13] - movq_r2r(mm2, mm4); - -//Continue with z10 --- z13 - movq_r2m(mm5, *(wsptr+2)); // save tmp2 - punpcklwd_r2r(mm6, mm2); // wsptr[xxx],[xxx],[0,z11],[1,z11] - - psubw_r2r(mm0, mm1); // wsptr[xxx],[1,z12],[xxx],[1,z10] - punpckhwd_r2r(mm6, mm4); // wsptr[xxx],[xxx],[0,z13],[1,z13] - - movq_r2r(mm3, mm0); - punpcklwd_r2r(mm1, mm3); // wsptr[xxx],[xxx],[0,z12],[1,z12] - - movq_r2m(mm7, *(wsptr+3)); // save tmp3 - punpckhwd_r2r(mm1, mm0); // wsptr[xxx],[xxx],[0,z10],[1,z10] - - movq_m2r(*(wsptr+4), mm6); // wsptr[2,0],[2,1],[2,2],[2,3] - punpckhdq_r2r(mm2, mm0); // wsptr[0,z10],[1,z10],[0,z11],[1,z11] - - movq_m2r(*(wsptr+5), mm7); // wsptr[2,4],[2,5],[2,6],[2,7] - punpckhdq_r2r(mm4, mm3); // wsptr[0,z12],[1,z12],[0,z13],[1,z13] - - movq_m2r(*(wsptr+6), mm1); // wsptr[3,0],[3,1],[3,2],[3,3] - movq_r2r(mm6, mm4); - - punpckldq_r2r(mm7, mm6); // wsptr[2,0],[2,1],[2,4],[2,5] - movq_r2r(mm1, mm5); - - punpckhdq_r2r(mm4, mm7); // wsptr[2,6],[2,7],[2,2],[2,3] - movq_r2r(mm6, mm2); - - movq_m2r(*(wsptr+7), mm4); // wsptr[3,4],[3,5],[3,6],[3,7] - paddw_r2r(mm7, mm6); // wsptr[xxx],[2,z11],[xxx],[2,z13] - - psubw_r2r(mm7, mm2); // wsptr[xxx],[2,z12],[xxx],[2,z10] - punpckldq_r2r(mm4, mm1); // wsptr[3,0],[3,1],[3,4],[3,5] - - punpckhdq_r2r(mm5, mm4); // wsptr[3,6],[3,7],[3,2],[3,3] - movq_r2r(mm1, mm7); - - paddw_r2r(mm4, mm1); // wsptr[xxx],[3,z11],[xxx],[3,z13] - psubw_r2r(mm4, mm7); // wsptr[xxx],[3,z12],[xxx],[3,z10] - - movq_r2r(mm6, mm5); - punpcklwd_r2r(mm1, mm6); // wsptr[xxx],[xxx],[2,z11],[3,z11] - - punpckhwd_r2r(mm1, mm5); // wsptr[xxx],[xxx],[2,z13],[3,z13] - movq_r2r(mm2, mm4); - - punpcklwd_r2r(mm7, mm2); // wsptr[xxx],[xxx],[2,z12],[3,z12] - - punpckhwd_r2r(mm7, mm4); // wsptr[xxx],[xxx],[2,z10],[3,z10] - - punpckhdq_r2r(mm6, mm4); // wsptr[2,z10],[3,z10],[2,z11],[3,z11] - - punpckhdq_r2r(mm5, mm2); // wsptr[2,z12],[3,z12],[2,z13],[3,z13] - movq_r2r(mm0, mm5); - - punpckldq_r2r(mm4, mm0); // wsptr[0,z10],[1,z10],[2,z10],[3,z10] - - punpckhdq_r2r(mm4, mm5); // wsptr[0,z11],[1,z11],[2,z11],[3,z11] - movq_r2r(mm3, mm4); - - punpckhdq_r2r(mm2, mm4); // wsptr[0,z13],[1,z13],[2,z13],[3,z13] - movq_r2r(mm5, mm1); - - punpckldq_r2r(mm2, mm3); // wsptr[0,z12],[1,z12],[2,z12],[3,z12] -// tmp7 = z11 + z13; /* phase 5 */ -// tmp8 = z11 - z13; /* phase 5 */ - psubw_r2r(mm4, mm1); // tmp8 - - paddw_r2r(mm4, mm5); // tmp7 -// tmp21 = MULTIPLY(tmp8, FIX_1_414213562); /* 2*c4 */ - psllw_i2r(2, mm1); - - psllw_i2r(2, mm0); - - pmulhw_m2r(fix_141, mm1); // tmp21 -// tmp20 = MULTIPLY(z12, (FIX_1_082392200- FIX_1_847759065)) /* 2*(c2-c6) */ -// + MULTIPLY(z10, - FIX_1_847759065); /* 2*c2 */ - psllw_i2r(2, mm3); - movq_r2r(mm0, mm7); - - pmulhw_m2r(fix_n184, mm7); - movq_r2r(mm3, mm6); - - movq_m2r(*(wsptr), mm2); // tmp0,final1 - - pmulhw_m2r(fix_108n184, mm6); -// tmp22 = MULTIPLY(z10,(FIX_1_847759065 - FIX_2_613125930)) /* -2*(c2+c6) */ -// + MULTIPLY(z12, FIX_1_847759065); /* 2*c2 */ - movq_r2r(mm2, mm4); // final1 - - pmulhw_m2r(fix_184n261, mm0); - paddw_r2r(mm5, mm2); // tmp0+tmp7,final1 - - pmulhw_m2r(fix_184, mm3); - psubw_r2r(mm5, mm4); // tmp0-tmp7,final1 - -// tmp6 = tmp22 - tmp7; /* phase 2 */ - psraw_i2r(3, mm2); // outptr[0,0],[1,0],[2,0],[3,0],final1 - - paddw_r2r(mm6, mm7); // tmp20 - psraw_i2r(3, mm4); // outptr[0,7],[1,7],[2,7],[3,7],final1 - - paddw_r2r(mm0, mm3); // tmp22 - -// tmp5 = tmp21 - tmp6; - psubw_r2r(mm5, mm3); // tmp6 - -// tmp4 = tmp20 + tmp5; - movq_m2r(*(wsptr+1), mm0); // tmp1,final2 - psubw_r2r(mm3, mm1); // tmp5 - - movq_r2r(mm0, mm6); // final2 - paddw_r2r(mm3, mm0); // tmp1+tmp6,final2 - - /* Final output stage: scale down by a factor of 8 and range-limit */ - -// outptr[0] = range_limit[IDESCALE(tmp0 + tmp7, PASS1_BITS+3) -// & RANGE_MASK]; -// outptr[7] = range_limit[IDESCALE(tmp0 - tmp7, PASS1_BITS+3) -// & RANGE_MASK]; final1 - - -// outptr[1] = range_limit[IDESCALE(tmp1 + tmp6, PASS1_BITS+3) -// & RANGE_MASK]; -// outptr[6] = range_limit[IDESCALE(tmp1 - tmp6, PASS1_BITS+3) -// & RANGE_MASK]; final2 - psubw_r2r(mm3, mm6); // tmp1-tmp6,final2 - psraw_i2r(3, mm0); // outptr[0,1],[1,1],[2,1],[3,1] - - psraw_i2r(3, mm6); // outptr[0,6],[1,6],[2,6],[3,6] - - packuswb_r2r(mm4, mm0); // out[0,1],[1,1],[2,1],[3,1],[0,7],[1,7],[2,7],[3,7] - - movq_m2r(*(wsptr+2), mm5); // tmp2,final3 - packuswb_r2r(mm6, mm2); // out[0,0],[1,0],[2,0],[3,0],[0,6],[1,6],[2,6],[3,6] - -// outptr[2] = range_limit[IDESCALE(tmp2 + tmp5, PASS1_BITS+3) -// & RANGE_MASK]; -// outptr[5] = range_limit[IDESCALE(tmp2 - tmp5, PASS1_BITS+3) -// & RANGE_MASK]; final3 - paddw_r2r(mm1, mm7); // tmp4 - movq_r2r(mm5, mm3); - - paddw_r2r(mm1, mm5); // tmp2+tmp5 - psubw_r2r(mm1, mm3); // tmp2-tmp5 - - psraw_i2r(3, mm5); // outptr[0,2],[1,2],[2,2],[3,2] - - movq_m2r(*(wsptr+3), mm4); // tmp3,final4 - psraw_i2r(3, mm3); // outptr[0,5],[1,5],[2,5],[3,5] - - - -// outptr[4] = range_limit[IDESCALE(tmp3 + tmp4, PASS1_BITS+3) -// & RANGE_MASK]; -// outptr[3] = range_limit[IDESCALE(tmp3 - tmp4, PASS1_BITS+3) -// & RANGE_MASK]; final4 - movq_r2r(mm4, mm6); - paddw_r2r(mm7, mm4); // tmp3+tmp4 - - psubw_r2r(mm7, mm6); // tmp3-tmp4 - psraw_i2r(3, mm4); // outptr[0,4],[1,4],[2,4],[3,4] - - psraw_i2r(3, mm6); // outptr[0,3],[1,3],[2,3],[3,3] - - /* - movq_r2m(mm4, *dummy); - fprintf(stderr, "3-4 %016llx\n", dummy); - movq_r2m(mm4, *dummy); - fprintf(stderr, "3+4 %016llx\n", dummy); - */ - - - packuswb_r2r(mm4, mm5); // out[0,2],[1,2],[2,2],[3,2],[0,4],[1,4],[2,4],[3,4] - - packuswb_r2r(mm3, mm6); // out[0,3],[1,3],[2,3],[3,3],[0,5],[1,5],[2,5],[3,5] - movq_r2r(mm2, mm4); - - movq_r2r(mm5, mm7); - punpcklbw_r2r(mm0, mm2); // out[0,0],[0,1],[1,0],[1,1],[2,0],[2,1],[3,0],[3,1] - - punpckhbw_r2r(mm0, mm4); // out[0,6],[0,7],[1,6],[1,7],[2,6],[2,7],[3,6],[3,7] - movq_r2r(mm2, mm1); - - punpcklbw_r2r(mm6, mm5); // out[0,2],[0,3],[1,2],[1,3],[2,2],[2,3],[3,2],[3,3] - - punpckhbw_r2r(mm6, mm7); // out[0,4],[0,5],[1,4],[1,5],[2,4],[2,5],[3,4],[3,5] - - punpcklwd_r2r(mm5, mm2); // out[0,0],[0,1],[0,2],[0,3],[1,0],[1,1],[1,2],[1,3] - - movq_r2r(mm7, mm6); - punpckhwd_r2r(mm5, mm1); // out[2,0],[2,1],[2,2],[2,3],[3,0],[3,1],[3,2],[3,3] - - movq_r2r(mm2, mm0); - punpcklwd_r2r(mm4, mm6); // out[0,4],[0,5],[0,6],[0,7],[1,4],[1,5],[1,6],[1,7] - - punpckldq_r2r(mm6, mm2); // out[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7] - - movq_r2r(mm1, mm3); - - punpckhwd_r2r(mm4, mm7); // out[2,4],[2,5],[2,6],[2,7],[3,4],[3,5],[3,6],[3,7] - - dataptr += rskip; - movq_r2m(mm2, *(dataptr)); - - punpckhdq_r2r(mm6, mm0); // out[1,0],[1,1],[1,2],[1,3],[1,4],[1,5],[1,6],[1,7] - - dataptr += rskip; - movq_r2m(mm0, *(dataptr)); - - punpckldq_r2r(mm7, mm1); // out[2,0],[2,1],[2,2],[2,3],[2,4],[2,5],[2,6],[2,7] - - punpckhdq_r2r(mm7, mm3); // out[3,0],[3,1],[3,2],[3,3],[3,4],[3,5],[3,6],[3,7] - - dataptr += rskip; - movq_r2m(mm1, *(dataptr)); - - dataptr += rskip; - movq_r2m(mm3, *(dataptr)); - -#else - __s32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; - __s32 tmp10, tmp11, tmp12, tmp13; - __s32 z5, z10, z11, z12, z13; - __s16 *inptr; - __s32 *wsptr; - __u8 *outptr; - int ctr; - __s32 dcval; - __s32 workspace[64]; - - inptr = data; - wsptr = workspace; - for (ctr = 8; ctr > 0; ctr--) { - - if ((inptr[8] | inptr[16] | inptr[24] | - inptr[32] | inptr[40] | inptr[48] | inptr[56]) == 0) { - dcval = inptr[0]; - wsptr[0] = dcval; - wsptr[8] = dcval; - wsptr[16] = dcval; - wsptr[24] = dcval; - wsptr[32] = dcval; - wsptr[40] = dcval; - wsptr[48] = dcval; - wsptr[56] = dcval; - - inptr++; - wsptr++; - continue; - } - - tmp0 = inptr[0]; - tmp1 = inptr[16]; - tmp2 = inptr[32]; - tmp3 = inptr[48]; - - tmp10 = tmp0 + tmp2; - tmp11 = tmp0 - tmp2; - - tmp13 = tmp1 + tmp3; - tmp12 = MULTIPLY(tmp1 - tmp3, FIX_1_414213562) - tmp13; - - tmp0 = tmp10 + tmp13; - tmp3 = tmp10 - tmp13; - tmp1 = tmp11 + tmp12; - tmp2 = tmp11 - tmp12; - - tmp4 = inptr[8]; - tmp5 = inptr[24]; - tmp6 = inptr[40]; - tmp7 = inptr[56]; - - z13 = tmp6 + tmp5; - z10 = tmp6 - tmp5; - z11 = tmp4 + tmp7; - z12 = tmp4 - tmp7; - - tmp7 = z11 + z13; - tmp11 = MULTIPLY(z11 - z13, FIX_1_414213562); - - z5 = MULTIPLY(z10 + z12, FIX_1_847759065); - tmp10 = MULTIPLY(z12, FIX_1_082392200) - z5; - tmp12 = MULTIPLY(z10, - FIX_2_613125930) + z5; - - tmp6 = tmp12 - tmp7; - tmp5 = tmp11 - tmp6; - tmp4 = tmp10 + tmp5; - - wsptr[0] = (__s32) (tmp0 + tmp7); - wsptr[56] = (__s32) (tmp0 - tmp7); - wsptr[8] = (__s32) (tmp1 + tmp6); - wsptr[48] = (__s32) (tmp1 - tmp6); - wsptr[16] = (__s32) (tmp2 + tmp5); - wsptr[40] = (__s32) (tmp2 - tmp5); - wsptr[32] = (__s32) (tmp3 + tmp4); - wsptr[24] = (__s32) (tmp3 - tmp4); - - inptr++; - wsptr++; - } - - wsptr = workspace; - for (ctr = 0; ctr < 8; ctr++) { - outptr = &(odata[ctr*rskip]); - - tmp10 = wsptr[0] + wsptr[4]; - tmp11 = wsptr[0] - wsptr[4]; - - tmp13 = wsptr[2] + wsptr[6]; - tmp12 = MULTIPLY(wsptr[2] - wsptr[6], FIX_1_414213562) - tmp13; - - tmp0 = tmp10 + tmp13; - tmp3 = tmp10 - tmp13; - tmp1 = tmp11 + tmp12; - tmp2 = tmp11 - tmp12; - - z13 = wsptr[5] + wsptr[3]; - z10 = wsptr[5] - wsptr[3]; - z11 = wsptr[1] + wsptr[7]; - z12 = wsptr[1] - wsptr[7]; - - tmp7 = z11 + z13; - tmp11 = MULTIPLY(z11 - z13, FIX_1_414213562); - - z5 = MULTIPLY(z10 + z12, FIX_1_847759065); - tmp10 = MULTIPLY(z12, FIX_1_082392200) - z5; - tmp12 = MULTIPLY(z10, - FIX_2_613125930) + z5; - - tmp6 = tmp12 - tmp7; - tmp5 = tmp11 - tmp6; - tmp4 = tmp10 + tmp5; - - outptr[0] = RL(DESCALE(tmp0 + tmp7)); - outptr[7] = RL(DESCALE(tmp0 - tmp7)); - outptr[1] = RL(DESCALE(tmp1 + tmp6)); - outptr[6] = RL(DESCALE(tmp1 - tmp6)); - outptr[2] = RL(DESCALE(tmp2 + tmp5)); - outptr[5] = RL(DESCALE(tmp2 - tmp5)); - outptr[4] = RL(DESCALE(tmp3 + tmp4)); - outptr[3] = RL(DESCALE(tmp3 - tmp4)); - - wsptr += 8; - } -#endif -} /* Main Routines @@ -2754,7 +1466,6 @@ static void RTjpeg_init_Q(__u8 Q) RTjpeg_cb8--; RTjpeg_dct_init(); - RTjpeg_idct_init(); RTjpeg_quant_init(); } @@ -2816,35 +1527,6 @@ void RTjpeg_init_compress(__u32 *buf, in buf[64+i]=le2me_32(RTjpeg_ciqt[i]); } -void RTjpeg_init_decompress(__u32 *buf, int width, int height) -{ - int i; - - RTjpeg_init_data(); - - RTjpeg_width=width; - RTjpeg_height=height; - RTjpeg_Ywidth = RTjpeg_width>>3; - RTjpeg_Ysize=width * height; - RTjpeg_Cwidth = RTjpeg_width>>4; - RTjpeg_Csize= (width>>1) * height; - - for(i=0; i<64; i++) - { - RTjpeg_liqt[i]=le2me_32(buf[i]); - RTjpeg_ciqt[i]=le2me_32(buf[i+64]); - } - - RTjpeg_lb8=0; - while(RTjpeg_liqt[RTjpeg_ZZ[++RTjpeg_lb8]]<=8); - RTjpeg_lb8--; - RTjpeg_cb8=0; - while(RTjpeg_ciqt[RTjpeg_ZZ[++RTjpeg_cb8]]<=8); - RTjpeg_cb8--; - - RTjpeg_idct_init(); -} - int RTjpeg_compressYUV420(__s8 *sp, unsigned char *bp) { __s8 * sb; @@ -2899,68 +1581,6 @@ int RTjpeg_compressYUV420(__s8 *sp, unsi return (sp-sb); } -void RTjpeg_decompressYUV420(__s8 *sp, __u8 *bp) -{ - register __s8 * bp1 = bp + (RTjpeg_width<<3); - register __s8 * bp2 = bp + RTjpeg_Ysize; - register __s8 * bp3 = bp2 + (RTjpeg_Csize>>1); - int i, j,k; - -#if HAVE_MMX - emms(); -#endif - -/* Y */ - for(i=RTjpeg_height>>1; i; i-=8) - { - for(k=0, j=0; j>1); - } - if(*sp==-1)sp++; - else - { - sp+=RTjpeg_s2b(RTjpeg_block, sp, RTjpeg_cb8, RTjpeg_ciqt); - RTjpeg_idct(bp3+k, RTjpeg_block, RTjpeg_width>>1); - } - } - bp+=RTjpeg_width<<4; - bp1+=RTjpeg_width<<4; - bp2+=RTjpeg_width<<2; - bp3+=RTjpeg_width<<2; - } -#if HAVE_MMX - emms(); -#endif -} - /* External Function Modified: trunk/libmpcodecs/native/rtjpegn.h ============================================================================== --- trunk/libmpcodecs/native/rtjpegn.h Sun Mar 8 14:21:00 2009 (r28887) +++ trunk/libmpcodecs/native/rtjpegn.h Sun Mar 8 14:32:42 2009 (r28888) @@ -36,9 +36,7 @@ #define __s64 int64_t void RTjpeg_init_compress(__u32 *buf, int width, int height, __u8 Q); -void RTjpeg_init_decompress(__u32 *buf, int width, int height); int RTjpeg_compressYUV420(__s8 *sp, unsigned char *bp); -void RTjpeg_decompressYUV420(__s8 *sp, __u8 *bp); void RTjpeg_init_mcompress(void); int RTjpeg_mcompressYUV420(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask); Modified: trunk/libmpcodecs/vd.c ============================================================================== --- trunk/libmpcodecs/vd.c Sun Mar 8 14:21:00 2009 (r28887) +++ trunk/libmpcodecs/vd.c Sun Mar 8 14:32:42 2009 (r28888) @@ -35,7 +35,6 @@ extern vd_functions_t mpcodecs_vd_vfwex; extern vd_functions_t mpcodecs_vd_raw; extern vd_functions_t mpcodecs_vd_hmblck; extern vd_functions_t mpcodecs_vd_xanim; -extern vd_functions_t mpcodecs_vd_nuv; extern vd_functions_t mpcodecs_vd_mpng; extern vd_functions_t mpcodecs_vd_ijpg; extern vd_functions_t mpcodecs_vd_mtga; @@ -70,7 +69,6 @@ const vd_functions_t * const mpcodecs_vd &mpcodecs_vd_lzo, &mpcodecs_vd_raw, &mpcodecs_vd_hmblck, - &mpcodecs_vd_nuv, #ifdef CONFIG_XANIM &mpcodecs_vd_xanim, #endif From subversion at mplayerhq.hu Sun Mar 8 14:56:36 2009 From: subversion at mplayerhq.hu (reimar) Date: Sun, 8 Mar 2009 14:56:36 +0100 (CET) Subject: [MPlayer-cvslog] r28889 - trunk/Makefile Message-ID: <20090308135636.429473B3F2@natsuki.mplayerhq.hu> Author: reimar Date: Sun Mar 8 14:56:35 2009 New Revision: 28889 Log: rtjpegn.c is only needed by the NuppelVideo encoder, change Makefile accordingly Modified: trunk/Makefile Modified: trunk/Makefile ============================================================================== --- trunk/Makefile Sun Mar 8 14:32:42 2009 (r28888) +++ trunk/Makefile Sun Mar 8 14:56:35 2009 (r28889) @@ -92,7 +92,6 @@ SRCS_COMMON = asxparser.c \ libmpcodecs/dec_video.c \ libmpcodecs/img_format.c \ libmpcodecs/mp_image.c \ - libmpcodecs/native/rtjpegn.c \ libmpcodecs/native/xa_gsm.c \ libmpcodecs/pullup.c \ libmpcodecs/vd.c \ @@ -686,7 +685,7 @@ SRCS_MENCODER-$(FAAC) += lib SRCS_MENCODER-$(LIBAVCODEC) += libmpcodecs/ae_lavc.c libmpcodecs/ve_lavc.c SRCS_MENCODER-$(LIBAVFORMAT) += libmpdemux/muxer_lavf.c SRCS_MENCODER-$(LIBDV) += libmpcodecs/ve_libdv.c -SRCS_MENCODER-$(LIBLZO) += libmpcodecs/ve_nuv.c +SRCS_MENCODER-$(LIBLZO) += libmpcodecs/ve_nuv.c libmpcodecs/native/rtjpegn.c SRCS_MENCODER-$(MP3LAME) += libmpcodecs/ae_lame.c SRCS_MENCODER-$(QTX_CODECS_WIN32) += libmpcodecs/ve_qtvideo.c SRCS_MENCODER-$(TOOLAME) += libmpcodecs/ae_toolame.c From Reimar.Doeffinger at gmx.de Sun Mar 8 15:01:25 2009 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Sun, 8 Mar 2009 15:01:25 +0100 Subject: [MPlayer-cvslog] r26345 - trunk/libao2/ao_sun.c In-Reply-To: <20090308091620.GB7839@1und1.de> References: <20080407173941.5E5E63B410@natsuki.mplayerhq.hu> <200902071802.03518.jknutar@nic.fi> <20090207181017.GA7639@1und1.de> <20090308091620.GB7839@1und1.de> Message-ID: <20090308140125.GA21590@1und1.de> On Sun, Mar 08, 2009 at 10:16:20AM +0100, Reimar D?ffinger wrote: > On Sat, Feb 07, 2009 at 07:10:17PM +0100, Reimar D?ffinger wrote: > > On Sat, Feb 07, 2009 at 06:01:48PM +0200, Jan Knutar wrote: > > > On Monday 07 April 2008, reimar wrote: > > > > Author: reimar > > > > Date: Mon Apr 7 19:39:41 2008 > > > > New Revision: 26345 > > > > > > > > Log: > > > > reset() should not senselessly close and reopen > > > > the device but instead just call flush_audio() > > > > > > This seems to have broken seeking on Opensolaris, from irc: > > > > Please get someone to try this patch: > > Index: libao2/ao_sun.c > > =================================================================== > > --- libao2/ao_sun.c (revision 28469) > > +++ libao2/ao_sun.c (working copy) > > @@ -91,6 +91,11 @@ > > #elif defined(__svr4__) > > ioctl(fd, I_FLUSH, FLUSHW); > > #endif > > + AUDIO_INITINFO(&info); > > + info.play.samples = 0; > > + info.play.eof = 0; > > + info.play.error = 0; > > + ioctl (audio_fd, AUDIO_SETINFO, &info); > > } > > > > // convert an OSS audio format specification into a sun audio encoding > > ping? Forget about that, I was informed that I had fixed it already, though in a different way. From subversion at mplayerhq.hu Sun Mar 8 16:20:15 2009 From: subversion at mplayerhq.hu (michael) Date: Sun, 8 Mar 2009 16:20:15 +0100 (CET) Subject: [MPlayer-cvslog] r28890 - trunk/TOOLS/fastmemcpybench.c Message-ID: <20090308152015.50D913B453@natsuki.mplayerhq.hu> Author: michael Date: Sun Mar 8 16:20:14 2009 New Revision: 28890 Log: Revert r3082 | michael | 2001-11-23 13:00:40 +0100 (Fri, 23 Nov 2001) | 2 lines missaligned arrays, as nick requested Reason: idiotic idea Modified: trunk/TOOLS/fastmemcpybench.c Modified: trunk/TOOLS/fastmemcpybench.c ============================================================================== --- trunk/TOOLS/fastmemcpybench.c Sun Mar 8 14:56:35 2009 (r28889) +++ trunk/TOOLS/fastmemcpybench.c Sun Mar 8 16:20:14 2009 (r28890) @@ -105,9 +105,9 @@ int main( void ) mga_init(); marr1 = &frame[3]; #else - marr1 = &arr1[3]; + marr1 = &arr1[0]; #endif - marr2 = &arr2[9]; + marr2 = &arr2[0]; for(i=0; i Author: greg Date: Sun Mar 8 16:30:27 2009 New Revision: 28891 Log: Don't assume width == stride for bitmap composition. Fixes http://bugzilla.mplayerhq.hu/show_bug.cgi?id=1421 Modified: trunk/libass/ass_render.c Modified: trunk/libass/ass_render.c ============================================================================== --- trunk/libass/ass_render.c Sun Mar 8 16:20:14 2009 (r28890) +++ trunk/libass/ass_render.c Sun Mar 8 16:30:27 2009 (r28891) @@ -423,10 +423,12 @@ static void render_overlap(ass_image_t** int ax = (*last_tail)->dst_x; int ay = (*last_tail)->dst_y; int aw = (*last_tail)->w; + int as = (*last_tail)->stride; int ah = (*last_tail)->h; int bx = (*tail)->dst_x; int by = (*tail)->dst_y; int bw = (*tail)->w; + int bs = (*tail)->stride; int bh = (*tail)->h; unsigned char* a; unsigned char* b; @@ -472,16 +474,16 @@ static void render_overlap(ass_image_t** // Allocate new bitmaps and copy over data a = (*last_tail)->bitmap; b = (*tail)->bitmap; - (*last_tail)->bitmap = malloc(aw*ah); - (*tail)->bitmap = malloc(bw*bh); - memcpy((*last_tail)->bitmap, a, aw*ah); - memcpy((*tail)->bitmap, b, bw*bh); + (*last_tail)->bitmap = malloc(as*ah); + (*tail)->bitmap = malloc(bs*bh); + memcpy((*last_tail)->bitmap, a, as*ah); + memcpy((*tail)->bitmap, b, bs*bh); // Composite overlapping area for (y=0; y b[cpos]) ? a[opos] : b[cpos]; (*last_tail)->bitmap[opos] = 0; (*tail)->bitmap[cpos] = m; From subversion at mplayerhq.hu Sun Mar 8 16:30:40 2009 From: subversion at mplayerhq.hu (greg) Date: Sun, 8 Mar 2009 16:30:40 +0100 (CET) Subject: [MPlayer-cvslog] r28892 - trunk/libass/ass_render.c Message-ID: <20090308153040.A064A50007@natsuki.mplayerhq.hu> Author: greg Date: Sun Mar 8 16:30:40 2009 New Revision: 28892 Log: Remove extraneous braces. Modified: trunk/libass/ass_render.c Modified: trunk/libass/ass_render.c ============================================================================== --- trunk/libass/ass_render.c Sun Mar 8 16:30:27 2009 (r28891) +++ trunk/libass/ass_render.c Sun Mar 8 16:30:40 2009 (r28892) @@ -446,12 +446,12 @@ static void render_overlap(ass_image_t** bottom = ((ay+ah) < (by+bh)) ? (ay+ah) : (by+bh); if ((right <= left) || (bottom <= top)) return; - old_left = left-(ax); - old_top = top-(ay); + old_left = left-ax; + old_top = top-ay; w = right-left; h = bottom-top; - cur_left = left-(bx); - cur_top = top-(by); + cur_left = left-bx; + cur_top = top-by; // Query cache memcpy(&hk.a, last_hash, sizeof(*last_hash)); From subversion at mplayerhq.hu Sun Mar 8 16:43:53 2009 From: subversion at mplayerhq.hu (michael) Date: Sun, 8 Mar 2009 16:43:53 +0100 (CET) Subject: [MPlayer-cvslog] r28893 - trunk/TOOLS/fastmem.sh Message-ID: <20090308154353.269663B476@natsuki.mplayerhq.hu> Author: michael Date: Sun Mar 8 16:43:52 2009 New Revision: 28893 Log: Resurrect script needed for easy use of fastmemcpybench.c. Added: trunk/TOOLS/fastmem.sh - copied unchanged from r22855, trunk/TOOLS/fastmem.sh From subversion at mplayerhq.hu Sun Mar 8 16:56:20 2009 From: subversion at mplayerhq.hu (michael) Date: Sun, 8 Mar 2009 16:56:20 +0100 (CET) Subject: [MPlayer-cvslog] r28894 - in trunk: Makefile TOOLS/fastmem.sh Message-ID: <20090308155621.0C7223B4B6@natsuki.mplayerhq.hu> Author: michael Date: Sun Mar 8 16:56:20 2009 New Revision: 28894 Log: Add test for C memcpy() Modified: trunk/Makefile trunk/TOOLS/fastmem.sh Modified: trunk/Makefile ============================================================================== --- trunk/Makefile Sun Mar 8 16:43:52 2009 (r28893) +++ trunk/Makefile Sun Mar 8 16:56:20 2009 (r28894) @@ -1018,6 +1018,7 @@ TOOLS/netstream$(EXESUF) TOOLS/vivodump$ $(CC) $(CFLAGS) -o $@ $^ $(EXTRALIBS_MPLAYER) $(EXTRALIBS_MENCODER) $(COMMON_LDFLAGS) fastmemcpybench: TOOLS/fastmemcpybench.c + $(CC) $(CFLAGS) $< -o TOOLS/fastmem-c$(EXESUF) -DNAME=\"c\" $(CC) $(CFLAGS) $< -o TOOLS/fastmem-mmx$(EXESUF) -DNAME=\"mmx\" -DHAVE_MMX $(CC) $(CFLAGS) $< -o TOOLS/fastmem-k6$(EXESUF) -DNAME=\"k6\ \" -DHAVE_MMX -DHAVE_AMD3DNOW $(CC) $(CFLAGS) $< -o TOOLS/fastmem-k7$(EXESUF) -DNAME=\"k7\ \" -DHAVE_MMX -DHAVE_AMD3DNOW -DHAVE_MMX2 Modified: trunk/TOOLS/fastmem.sh ============================================================================== --- trunk/TOOLS/fastmem.sh Sun Mar 8 16:43:52 2009 (r28893) +++ trunk/TOOLS/fastmem.sh Sun Mar 8 16:56:20 2009 (r28894) @@ -9,6 +9,8 @@ sleep 2 sleep 2 ./fastmem-sse sleep 2 +./fastmem-c +sleep 2 ./fastmem2-k6 sleep 2 ./fastmem2-k7 From subversion at mplayerhq.hu Sun Mar 8 17:13:22 2009 From: subversion at mplayerhq.hu (eugeni) Date: Sun, 8 Mar 2009 17:13:22 +0100 (CET) Subject: [MPlayer-cvslog] r28895 - in trunk: DOCS/man/en/mplayer.1 libass/ass_cache.c libass/ass_font.c libass/ass_font.h libass/ass_fontconfig.c libass/ass_fontconfig.h libass/ass_mp.c libass/ass_render.c libass/ass_types.h Message-ID: <20090308161322.79FC23B3A3@natsuki.mplayerhq.hu> Author: eugeni Date: Sun Mar 8 17:13:21 2009 New Revision: 28895 Log: Treat -font/-subfont as Fontconfig pattern in libass. Patch by Adrian Stutz (adrian sttz ch). Modified: trunk/libass/ass_cache.c trunk/libass/ass_font.c trunk/libass/ass_font.h trunk/libass/ass_fontconfig.c trunk/libass/ass_fontconfig.h trunk/libass/ass_mp.c trunk/libass/ass_render.c trunk/libass/ass_types.h Changes in other areas also in this revision: Modified: trunk/DOCS/man/en/mplayer.1 Modified: trunk/libass/ass_cache.c ============================================================================== --- trunk/libass/ass_cache.c Sun Mar 8 16:56:20 2009 (r28894) +++ trunk/libass/ass_cache.c Sun Mar 8 17:13:21 2009 (r28895) @@ -192,6 +192,8 @@ static int font_compare(void* key1, void return 0; if (a->italic != b->italic) return 0; + if (a->treat_family_as_pattern != b->treat_family_as_pattern) + return 0; return 1; } Modified: trunk/libass/ass_font.c ============================================================================== --- trunk/libass/ass_font.c Sun Mar 8 16:56:20 2009 (r28894) +++ trunk/libass/ass_font.c Sun Mar 8 17:13:21 2009 (r28895) @@ -125,7 +125,7 @@ static int add_face(void* fc_priv, ass_f if (font->n_faces == ASS_FONT_MAX_FACES) return -1; - path = fontconfig_select(fc_priv, font->desc.family, font->desc.bold, + path = fontconfig_select(fc_priv, font->desc.family, font->desc.treat_family_as_pattern, font->desc.bold, font->desc.italic, &index, ch); mem_idx = find_font(font->library, path); @@ -169,6 +169,7 @@ ass_font_t* ass_font_new(ass_library_t* font.ftlibrary = ftlibrary; font.n_faces = 0; font.desc.family = strdup(desc->family); + font.desc.treat_family_as_pattern = desc->treat_family_as_pattern; font.desc.bold = desc->bold; font.desc.italic = desc->italic; Modified: trunk/libass/ass_font.h ============================================================================== --- trunk/libass/ass_font.h Sun Mar 8 16:56:20 2009 (r28894) +++ trunk/libass/ass_font.h Sun Mar 8 17:13:21 2009 (r28895) @@ -33,6 +33,7 @@ typedef struct ass_font_desc_s { char* family; unsigned bold; unsigned italic; + int treat_family_as_pattern; } ass_font_desc_t; #define ASS_FONT_MAX_FACES 10 Modified: trunk/libass/ass_fontconfig.c ============================================================================== --- trunk/libass/ass_fontconfig.c Sun Mar 8 16:56:20 2009 (r28894) +++ trunk/libass/ass_fontconfig.c Sun Mar 8 17:13:21 2009 (r28895) @@ -66,14 +66,15 @@ struct fc_instance_s { * \brief Low-level font selection. * \param priv private data * \param family font family + * \param treat_family_as_pattern treat family as fontconfig pattern * \param bold font weight value * \param italic font slant value * \param index out: font index inside a file * \param code: the character that should be present in the font, can be 0 * \return font file path */ -static char* _select_font(fc_instance_t* priv, const char* family, unsigned bold, unsigned italic, int* index, - uint32_t code) +static char* _select_font(fc_instance_t* priv, const char* family, int treat_family_as_pattern, + unsigned bold, unsigned italic, int* index, uint32_t code) { FcBool rc; FcResult result; @@ -89,10 +90,15 @@ static char* _select_font(fc_instance_t* *index = 0; - pat = FcPatternCreate(); + if (treat_family_as_pattern) + pat = FcNameParse((const FcChar8*)family); + else + pat = FcPatternCreate(); + if (!pat) goto error; + if (!treat_family_as_pattern) { FcPatternAddString(pat, FC_FAMILY, (const FcChar8*)family); // In SSA/ASS fonts are sometimes referenced by their "full name", @@ -118,6 +124,7 @@ static char* _select_font(fc_instance_t* } free(s); } + } FcPatternAddBool(pat, FC_OUTLINE, FcTrue); FcPatternAddInteger(pat, FC_SLANT, italic); FcPatternAddInteger(pat, FC_WEIGHT, bold); @@ -182,7 +189,8 @@ static char* _select_font(fc_instance_t* if (result != FcResultMatch) r_fullname = NULL; - if (!(r_family && strcasecmp((const char*)r_family, family) == 0) && + if (!treat_family_as_pattern && + !(r_family && strcasecmp((const char*)r_family, family) == 0) && !(r_fullname && strcasecmp((const char*)r_fullname, family) == 0)) mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_SelectedFontFamilyIsNotTheRequestedOne, (const char*)(r_fullname ? r_fullname : r_family), family); @@ -219,14 +227,15 @@ static char* _select_font(fc_instance_t* * \brief Find a font. Use default family or path if necessary. * \param priv_ private data * \param family font family + * \param treat_family_as_pattern treat family as fontconfig pattern * \param bold font weight value * \param italic font slant value * \param index out: font index inside a file * \param code: the character that should be present in the font, can be 0 * \return font file path */ -char* fontconfig_select(fc_instance_t* priv, const char* family, unsigned bold, unsigned italic, int* index, - uint32_t code) +char* fontconfig_select(fc_instance_t* priv, const char* family, int treat_family_as_pattern, + unsigned bold, unsigned italic, int* index, uint32_t code) { char* res = 0; if (!priv->config) { @@ -234,9 +243,9 @@ char* fontconfig_select(fc_instance_t* p return priv->path_default; } if (family && *family) - res = _select_font(priv, family, bold, italic, index, code); + res = _select_font(priv, family, treat_family_as_pattern, bold, italic, index, code); if (!res && priv->family_default) { - res = _select_font(priv, priv->family_default, bold, italic, index, code); + res = _select_font(priv, priv->family_default, 0, bold, italic, index, code); if (res) mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_UsingDefaultFontFamily, family, bold, italic, res, *index); @@ -248,7 +257,7 @@ char* fontconfig_select(fc_instance_t* p family, bold, italic, res, *index); } if (!res) { - res = _select_font(priv, "Arial", bold, italic, index, code); + res = _select_font(priv, "Arial", 0, bold, italic, index, code); if (res) mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_UsingArialFontFamily, family, bold, italic, res, *index); @@ -474,8 +483,8 @@ exit: #else /* CONFIG_FONTCONFIG */ -char* fontconfig_select(fc_instance_t* priv, const char* family, unsigned bold, unsigned italic, int* index, - uint32_t code) +char* fontconfig_select(fc_instance_t* priv, const char* family, int treat_family_as_pattern, + unsigned bold, unsigned italic, int* index, uint32_t code) { *index = priv->index_default; return priv->path_default; Modified: trunk/libass/ass_fontconfig.h ============================================================================== --- trunk/libass/ass_fontconfig.h Sun Mar 8 16:56:20 2009 (r28894) +++ trunk/libass/ass_fontconfig.h Sun Mar 8 17:13:21 2009 (r28895) @@ -35,7 +35,7 @@ typedef struct fc_instance_s fc_instance_t; fc_instance_t* fontconfig_init(ass_library_t* library, FT_Library ftlibrary, const char* family, const char* path, int fc); -char* fontconfig_select(fc_instance_t* priv, const char* family, unsigned bold, unsigned italic, int* index, uint32_t code); +char* fontconfig_select(fc_instance_t* priv, const char* family, int treat_family_as_pattern, unsigned bold, unsigned italic, int* index, uint32_t code); void fontconfig_done(fc_instance_t* priv); #endif /* LIBASS_FONTCONFIG_H */ Modified: trunk/libass/ass_mp.c ============================================================================== --- trunk/libass/ass_mp.c Sun Mar 8 16:56:20 2009 (r28894) +++ trunk/libass/ass_mp.c Sun Mar 8 17:13:21 2009 (r28895) @@ -94,6 +94,7 @@ ass_track_t* ass_default_track(ass_libra style = track->styles + sid; style->Name = strdup("Default"); style->FontName = (font_fontconfig >= 0 && sub_font_name) ? strdup(sub_font_name) : (font_fontconfig >= 0 && font_name) ? strdup(font_name) : strdup("Sans"); + style->treat_fontname_as_pattern = 1; fs = track->PlayResY * text_font_scale_factor / 100.; // approximate autoscale coefficients Modified: trunk/libass/ass_render.c ============================================================================== --- trunk/libass/ass_render.c Sun Mar 8 16:56:20 2009 (r28894) +++ trunk/libass/ass_render.c Sun Mar 8 17:13:21 2009 (r28895) @@ -184,6 +184,7 @@ typedef struct render_context_s { char* family; unsigned bold; unsigned italic; + int treat_family_as_pattern; } render_context_t; @@ -676,6 +677,7 @@ static void update_font(void) ass_renderer_t* priv = frame_context.ass_priv; ass_font_desc_t desc; desc.family = strdup(render_context.family); + desc.treat_family_as_pattern = render_context.treat_family_as_pattern; val = render_context.bold; // 0 = normal, 1 = bold, >1 = exact weight @@ -1359,6 +1361,7 @@ static void reset_render_context(void) if (render_context.family) free(render_context.family); render_context.family = strdup(render_context.style->FontName); + render_context.treat_family_as_pattern = render_context.style->treat_fontname_as_pattern; render_context.bold = render_context.style->Bold; render_context.italic = render_context.style->Italic; update_font(); Modified: trunk/libass/ass_types.h ============================================================================== --- trunk/libass/ass_types.h Sun Mar 8 16:56:20 2009 (r28894) +++ trunk/libass/ass_types.h Sun Mar 8 17:13:21 2009 (r28895) @@ -58,6 +58,7 @@ typedef struct ass_style_s { int MarginV; // int AlphaLevel; int Encoding; + int treat_fontname_as_pattern; } ass_style_t; typedef struct render_priv_s render_priv_t; From subversion at mplayerhq.hu Sun Mar 8 17:13:26 2009 From: subversion at mplayerhq.hu (eugeni) Date: Sun, 8 Mar 2009 17:13:26 +0100 (CET) Subject: [MPlayer-cvslog] r28896 - trunk/libass/ass_fontconfig.c Message-ID: <20090308161327.1D5373B3CA@natsuki.mplayerhq.hu> Author: eugeni Date: Sun Mar 8 17:13:26 2009 New Revision: 28896 Log: Cosmetics: reindent. Modified: trunk/libass/ass_fontconfig.c Modified: trunk/libass/ass_fontconfig.c ============================================================================== --- trunk/libass/ass_fontconfig.c Sun Mar 8 17:13:21 2009 (r28895) +++ trunk/libass/ass_fontconfig.c Sun Mar 8 17:13:26 2009 (r28896) @@ -99,31 +99,31 @@ static char* _select_font(fc_instance_t* goto error; if (!treat_family_as_pattern) { - FcPatternAddString(pat, FC_FAMILY, (const FcChar8*)family); + FcPatternAddString(pat, FC_FAMILY, (const FcChar8*)family); - // In SSA/ASS fonts are sometimes referenced by their "full name", - // which is usually a concatenation of family name and font - // style (ex. Ottawa Bold). Full name is available from - // FontConfig pattern element FC_FULLNAME, but it is never - // used for font matching. - // Therefore, I'm removing words from the end of the name one - // by one, and adding shortened names to the pattern. It seems - // that the first value (full name in this case) has - // precedence in matching. - // An alternative approach could be to reimplement FcFontSort - // using FC_FULLNAME instead of FC_FAMILY. - family_cnt = 1; - { - char* s = strdup(family); - char* p = s + strlen(s); - while (--p > s) - if (*p == ' ' || *p == '-') { - *p = '\0'; - FcPatternAddString(pat, FC_FAMILY, (const FcChar8*)s); - ++ family_cnt; - } - free(s); - } + // In SSA/ASS fonts are sometimes referenced by their "full name", + // which is usually a concatenation of family name and font + // style (ex. Ottawa Bold). Full name is available from + // FontConfig pattern element FC_FULLNAME, but it is never + // used for font matching. + // Therefore, I'm removing words from the end of the name one + // by one, and adding shortened names to the pattern. It seems + // that the first value (full name in this case) has + // precedence in matching. + // An alternative approach could be to reimplement FcFontSort + // using FC_FULLNAME instead of FC_FAMILY. + family_cnt = 1; + { + char* s = strdup(family); + char* p = s + strlen(s); + while (--p > s) + if (*p == ' ' || *p == '-') { + *p = '\0'; + FcPatternAddString(pat, FC_FAMILY, (const FcChar8*)s); + ++ family_cnt; + } + free(s); + } } FcPatternAddBool(pat, FC_OUTLINE, FcTrue); FcPatternAddInteger(pat, FC_SLANT, italic); From subversion at mplayerhq.hu Mon Mar 9 01:48:04 2009 From: subversion at mplayerhq.hu (diego) Date: Mon, 9 Mar 2009 01:48:04 +0100 (CET) Subject: [MPlayer-cvslog] r28899 - trunk/Makefile Message-ID: <20090309004804.17B263B4EB@natsuki.mplayerhq.hu> Author: diego Date: Mon Mar 9 01:48:03 2009 New Revision: 28899 Log: Fix fastmemcpybench tools build: - HAVE_MMX and friends now have 0/1 values and are always defined. - Use proper file dependencies instead of a phony target. Modified: trunk/Makefile Modified: trunk/Makefile ============================================================================== --- trunk/Makefile Sun Mar 8 21:27:31 2009 (r28898) +++ trunk/Makefile Mon Mar 9 01:48:03 2009 (r28899) @@ -1000,7 +1000,7 @@ alltools: $(addsuffix $(EXESUF),$(ALLTOO toolsclean: -rm -f $(foreach file,$(ALLTOOLS),$(call ADD_ALL_EXESUFS,$(file))) - -rm -f TOOLS/fastmem*-* TOOLS/realcodecs/*.so.6.0 + -rm -f TOOLS/fastmem-* TOOLS/realcodecs/*.so.6.0 TOOLS/bmovl-test$(EXESUF): -lSDL_image @@ -1017,16 +1017,20 @@ TOOLS/vivodump$(EXESUF): TOOLS/vivodump. TOOLS/netstream$(EXESUF) TOOLS/vivodump$(EXESUF): $(subst mplayer.o,mplayer-nomain.o,$(OBJS_MPLAYER)) $(filter-out %mencoder.o,$(OBJS_MENCODER)) $(OBJS_COMMON) $(COMMON_LIBS) $(CC) $(CFLAGS) -o $@ $^ $(EXTRALIBS_MPLAYER) $(EXTRALIBS_MENCODER) $(COMMON_LDFLAGS) -fastmemcpybench: TOOLS/fastmemcpybench.c - $(CC) $(CFLAGS) $< -o TOOLS/fastmem-c$(EXESUF) -DNAME=\"c\" - $(CC) $(CFLAGS) $< -o TOOLS/fastmem-mmx$(EXESUF) -DNAME=\"mmx\" -DHAVE_MMX - $(CC) $(CFLAGS) $< -o TOOLS/fastmem-k6$(EXESUF) -DNAME=\"k6\ \" -DHAVE_MMX -DHAVE_AMD3DNOW - $(CC) $(CFLAGS) $< -o TOOLS/fastmem-k7$(EXESUF) -DNAME=\"k7\ \" -DHAVE_MMX -DHAVE_AMD3DNOW -DHAVE_MMX2 - $(CC) $(CFLAGS) $< -o TOOLS/fastmem-sse$(EXESUF) -DNAME=\"sse\" -DHAVE_MMX -DHAVE_SSE -DHAVE_MMX2 - $(CC) $(CFLAGS) $< -o TOOLS/fastmem2-mmx$(EXESUF) -DNAME=\"mga-mmx\" -DCONFIG_MGA -DHAVE_MMX - $(CC) $(CFLAGS) $< -o TOOLS/fastmem2-k6$(EXESUF) -DNAME=\"mga-k6\ \" -DCONFIG_MGA -DHAVE_MMX -DHAVE_AMD3DNOW - $(CC) $(CFLAGS) $< -o TOOLS/fastmem2-k7$(EXESUF) -DNAME=\"mga-k7\ \" -DCONFIG_MGA -DHAVE_MMX -DHAVE_AMD3DNOW -DHAVE_MMX2 - $(CC) $(CFLAGS) $< -o TOOLS/fastmem2-sse$(EXESUF) -DNAME=\"mga-sse\" -DCONFIG_MGA -DHAVE_MMX -DHAVE_SSE -DHAVE_MMX2 +TOOLS/fastmem-c$(EXESUF): CFLAGS += -DHAVE_MMX=0 -DHAVE_AMD3DNOW=0 -DHAVE_MMX2=0 -DHAVE_SSE=0 -DNAME=\"C\" +TOOLS/fastmem-mmx$(EXESUF): CFLAGS += -DHAVE_MMX=1 -DHAVE_AMD3DNOW=0 -DHAVE_MMX2=0 -DHAVE_SSE=0 -DNAME=\"MMX\" +TOOLS/fastmem-k6$(EXESUF): CFLAGS += -DHAVE_MMX=1 -DHAVE_AMD3DNOW=1 -DHAVE_MMX2=0 -DHAVE_SSE=0 -DNAME=\"K6\" +TOOLS/fastmem-k7$(EXESUF): CFLAGS += -DHAVE_MMX=1 -DHAVE_AMD3DNOW=1 -DHAVE_MMX2=1 -DHAVE_SSE=0 -DNAME=\"K7\" +TOOLS/fastmem-sse$(EXESUF): CFLAGS += -DHAVE_MMX=1 -DHAVE_AMD3DNOW=0 -DHAVE_MMX2=1 -DHAVE_SSE=1 -DNAME=\"SSE\" +TOOLS/fastmem-mga-mmx$(EXESUF): CFLAGS += -DHAVE_MMX=1 -DHAVE_AMD3DNOW=0 -DHAVE_MMX2=0 -DHAVE_SSE=0 -DNAME=\"MGA-MMX\" -DCONFIG_MGA +TOOLS/fastmem-mga-k6$(EXESUF): CFLAGS += -DHAVE_MMX=1 -DHAVE_AMD3DNOW=1 -DHAVE_MMX2=0 -DHAVE_SSE=0 -DNAME=\"MGA-K6\" -DCONFIG_MGA +TOOLS/fastmem-mga-k7$(EXESUF): CFLAGS += -DHAVE_MMX=1 -DHAVE_AMD3DNOW=1 -DHAVE_MMX2=1 -DHAVE_SSE=0 -DNAME=\"MGA-K7\" -DCONFIG_MGA +TOOLS/fastmem-mga-sse$(EXESUF): CFLAGS += -DHAVE_MMX=1 -DHAVE_AMD3DNOW=0 -DHAVE_MMX2=1 -DHAVE_SSE=1 -DNAME=\"MGA-SSE\" -DCONFIG_MGA + +fastmemcpybench: $(addsuffix $(EXESUF),$(addprefix TOOLS/fastmem-,c mmx k6 k7 sse mga-mmx mga-k6 mga-k7 mga-sse)) + +TOOLS/fastmem-%$(EXESUF): TOOLS/fastmemcpybench.c + $(CC) $(CFLAGS) -o $@ $< REAL_SRCS = $(wildcard TOOLS/realcodecs/*.c) REAL_TARGETS = $(REAL_SRCS:.c=.so.6.0) From subversion at mplayerhq.hu Mon Mar 9 02:48:42 2009 From: subversion at mplayerhq.hu (greg) Date: Mon, 9 Mar 2009 02:48:42 +0100 (CET) Subject: [MPlayer-cvslog] r28900 - trunk/libvo/font_load_ft.c Message-ID: <20090309014843.078573B358@natsuki.mplayerhq.hu> Author: greg Date: Mon Mar 9 02:48:42 2009 New Revision: 28900 Log: Change default OSD/subtitle font sizes. This was discussed on -dev-eng and IRC. The consensus seems to be that 3-4% of the diagonal is a good default, and most people use something along these lines. The subtitle font size is set to 3.5% and the OSD is kept a little bigger with 4%. Modified: trunk/libvo/font_load_ft.c Modified: trunk/libvo/font_load_ft.c ============================================================================== --- trunk/libvo/font_load_ft.c Mon Mar 9 01:48:03 2009 (r28899) +++ trunk/libvo/font_load_ft.c Mon Mar 9 02:48:42 2009 (r28900) @@ -56,8 +56,8 @@ #endif char *subtitle_font_encoding = NULL; -float text_font_scale_factor = 5.0; -float osd_font_scale_factor = 6.0; +float text_font_scale_factor = 3.5; +float osd_font_scale_factor = 4.0; float subtitle_font_radius = 2.0; float subtitle_font_thickness = 2.0; // 0 = no autoscale From subversion at mplayerhq.hu Mon Mar 9 11:14:13 2009 From: subversion at mplayerhq.hu (diego) Date: Mon, 9 Mar 2009 11:14:13 +0100 (CET) Subject: [MPlayer-cvslog] r28901 - trunk/TOOLS Message-ID: <20090309101414.158063B513@natsuki.mplayerhq.hu> Author: diego Date: Mon Mar 9 11:14:11 2009 New Revision: 28901 Log: Ignore all fastmem-* binaries. Modified: trunk/TOOLS/ (props changed) From subversion at mplayerhq.hu Mon Mar 9 12:02:54 2009 From: subversion at mplayerhq.hu (diego) Date: Mon, 9 Mar 2009 12:02:54 +0100 (CET) Subject: [MPlayer-cvslog] r28902 - trunk/libvo/fastmemcpy.h Message-ID: <20090309110254.E4A003B52D@natsuki.mplayerhq.hu> Author: diego Date: Mon Mar 9 12:02:54 2009 New Revision: 28902 Log: Merge two preprocessor conditions in order to drop one duplicated #else case. Modified: trunk/libvo/fastmemcpy.h Modified: trunk/libvo/fastmemcpy.h ============================================================================== --- trunk/libvo/fastmemcpy.h Mon Mar 9 11:14:11 2009 (r28901) +++ trunk/libvo/fastmemcpy.h Mon Mar 9 12:02:54 2009 (r28902) @@ -23,20 +23,13 @@ #include #include -#ifdef CONFIG_FASTMEMCPY -#if HAVE_MMX || HAVE_MMX2 || HAVE_AMD3DNOW \ -/* || HAVE_SSE || HAVE_SSE2 */ +#if defined(CONFIG_FASTMEMCPY) && (HAVE_MMX || HAVE_MMX2 || HAVE_AMD3DNOW /* || HAVE_SSE || HAVE_SSE2 */) #include void * fast_memcpy(void * to, const void * from, size_t len); void * mem2agpcpy(void * to, const void * from, size_t len); -#else /* HAVE_MMX/MMX2/3DNOW/SSE/SSE2 */ -#define mem2agpcpy(a,b,c) memcpy(a,b,c) -#define fast_memcpy(a,b,c) memcpy(a,b,c) -#endif - -#else /* CONFIG_FASTMEMCPY */ +#else #define mem2agpcpy(a,b,c) memcpy(a,b,c) #define fast_memcpy(a,b,c) memcpy(a,b,c) #endif From subversion at mplayerhq.hu Mon Mar 9 12:28:32 2009 From: subversion at mplayerhq.hu (diego) Date: Mon, 9 Mar 2009 12:28:32 +0100 (CET) Subject: [MPlayer-cvslog] r28903 - trunk/TOOLS/fastmemcpybench.c Message-ID: <20090309112832.651373B547@natsuki.mplayerhq.hu> Author: diego Date: Mon Mar 9 12:28:31 2009 New Revision: 28903 Log: whitespace cosmetics: - Remove all tabs and trailing whitespace. - Indent with 4 spaces. - K&R-ify and prettyprint some parts. Modified: trunk/TOOLS/fastmemcpybench.c Modified: trunk/TOOLS/fastmemcpybench.c ============================================================================== --- trunk/TOOLS/fastmemcpybench.c Mon Mar 9 12:02:54 2009 (r28902) +++ trunk/TOOLS/fastmemcpybench.c Mon Mar 9 12:28:31 2009 (r28903) @@ -1,6 +1,6 @@ /* fastmemcpybench.c used to benchmark fastmemcpy.h code from libvo. - + Note: this code can not be used on PentMMX-PII because they contain a bug in rdtsc. For Intel processors since P6(PII) rdpmc should be used instead. For PIII it's disputable and seems bug was fixed but I don't @@ -27,50 +27,48 @@ #include "drivers/mga_vid.h" static mga_vid_config_t mga_vid_config; -static unsigned char* frame=NULL; +static unsigned char* frame = NULL; static int f; static int mga_init(void) { - f = open("/dev/mga_vid",O_RDWR); - if(f == -1) - { - fprintf(stderr,"Couldn't open /dev/mga_vid\n"); - return -1; - } + f = open("/dev/mga_vid", O_RDWR); + if (f == -1) { + fprintf(stderr, "Couldn't open /dev/mga_vid\n"); + return -1; + } - mga_vid_config.num_frames=1; - mga_vid_config.frame_size=ARR_SIZE; - mga_vid_config.format=MGA_VID_FORMAT_YUY2; + mga_vid_config.num_frames = 1; + mga_vid_config.frame_size = ARR_SIZE; + mga_vid_config.format = MGA_VID_FORMAT_YUY2; - mga_vid_config.colkey_on=0; - mga_vid_config.src_width = 640; - mga_vid_config.src_height= 480; - mga_vid_config.dest_width = 320; - mga_vid_config.dest_height= 200; - mga_vid_config.x_org= 0; - mga_vid_config.y_org= 0; - - mga_vid_config.version=MGA_VID_VERSION; - if (ioctl(f,MGA_VID_CONFIG,&mga_vid_config)) - { - perror("Error in mga_vid_config ioctl()"); - printf("Your mga_vid driver version is incompatible with this MPlayer version!\n"); - exit(1); - } - ioctl(f,MGA_VID_ON,0); + mga_vid_config.colkey_on = 0; + mga_vid_config.src_width = 640; + mga_vid_config.src_height = 480; + mga_vid_config.dest_width = 320; + mga_vid_config.dest_height = 200; + mga_vid_config.x_org = 0; + mga_vid_config.y_org = 0; - frame = (char*)mmap(0,mga_vid_config.frame_size*mga_vid_config.num_frames,PROT_WRITE,MAP_SHARED,f,0); - if(!frame){ - printf("Can't mmap mga frame\n"); - exit(1); - } + mga_vid_config.version = MGA_VID_VERSION; + if (ioctl(f, MGA_VID_CONFIG, &mga_vid_config)) { + perror("Error in mga_vid_config ioctl()"); + printf("Your mga_vid driver version is incompatible with this MPlayer version!\n"); + exit(1); + } + ioctl(f, MGA_VID_ON, 0); - //clear the buffer - //memset(frames[0],0x80,mga_vid_config.frame_size*mga_vid_config.num_frames); + frame = (char*)mmap(0, mga_vid_config.frame_size*mga_vid_config.num_frames, + PROT_WRITE,MAP_SHARED, f, 0); + if (!frame) { + printf("Can't mmap mga frame\n"); + exit(1); + } - return 0; + //clear the buffer + //memset(frames[0], 0x80, mga_vid_config.frame_size*mga_vid_config.num_frames); + return 0; } #endif @@ -78,45 +76,48 @@ static int mga_init(void) // Returns current time in microseconds static unsigned int GetTimer(void) { - struct timeval tv; - struct timezone tz; -// float s; - gettimeofday(&tv,&tz); -// s=tv.tv_usec;s*=0.000001;s+=tv.tv_sec; - return tv.tv_sec * 1000000 + tv.tv_usec; -} + struct timeval tv; + struct timezone tz; + //float s; + gettimeofday(&tv, &tz); + //s = tv.tv_usec; s *= 0.000001; s += tv.tv_sec; + return tv.tv_sec * 1000000 + tv.tv_usec; +} -static inline unsigned long long int read_tsc( void ) +static inline unsigned long long int read_tsc(void) { - unsigned long long int retval; - __asm__ volatile ("rdtsc":"=A"(retval)::"memory"); - return retval; + unsigned long long int retval; + __asm__ volatile ("rdtsc":"=A" (retval)::"memory"); + return retval; } -unsigned char __attribute__((aligned(4096)))arr1[ARR_SIZE],arr2[ARR_SIZE]; +unsigned char __attribute__((aligned(4096)))arr1[ARR_SIZE], arr2[ARR_SIZE]; -int main( void ) +int main(void) { - unsigned long long int v1,v2; - unsigned char * marr1,*marr2; - int i; - unsigned int t; + unsigned long long int v1, v2; + unsigned char *marr1, *marr2; + int i; + unsigned int t; #ifdef CONFIG_MGA - mga_init(); - marr1 = &frame[3]; + mga_init(); + marr1 = &frame[3]; #else - marr1 = &arr1[0]; + marr1 = &arr1[0]; #endif - marr2 = &arr2[0]; + marr2 = &arr2[0]; - for(i=0; i Author: diego Date: Mon Mar 9 12:32:43 2009 New Revision: 28904 Log: comment/output cosmetics Modified: trunk/TOOLS/fastmemcpybench.c Modified: trunk/TOOLS/fastmemcpybench.c ============================================================================== --- trunk/TOOLS/fastmemcpybench.c Mon Mar 9 12:28:31 2009 (r28903) +++ trunk/TOOLS/fastmemcpybench.c Mon Mar 9 12:32:43 2009 (r28904) @@ -1,10 +1,10 @@ /* - fastmemcpybench.c used to benchmark fastmemcpy.h code from libvo. - - Note: this code can not be used on PentMMX-PII because they contain - a bug in rdtsc. For Intel processors since P6(PII) rdpmc should be used - instead. For PIII it's disputable and seems bug was fixed but I don't - tested it. + * benchmark tool for fast_memcpy code from libvo + * + * NOTE: This code can not be used on Pentium MMX / II because they contain + * a bug in rdtsc. For Intel processors since P6(PII) rdpmc should be used + * instead. For PIII it's disputable and it seems the bug was fixed but this + * was not confirmed through testing. */ /* According to Uoti this code is broken. */ @@ -34,7 +34,7 @@ static int mga_init(void) { f = open("/dev/mga_vid", O_RDWR); if (f == -1) { - fprintf(stderr, "Couldn't open /dev/mga_vid\n"); + fprintf(stderr, "Couldn't open /dev/mga_vid.\n"); return -1; } @@ -61,7 +61,7 @@ static int mga_init(void) frame = (char*)mmap(0, mga_vid_config.frame_size*mga_vid_config.num_frames, PROT_WRITE,MAP_SHARED, f, 0); if (!frame) { - printf("Can't mmap mga frame\n"); + printf("Can't mmap MGA frame.\n"); exit(1); } @@ -117,7 +117,7 @@ int main(void) v2 = read_tsc(); t = GetTimer() - t; // ARR_SIZE*100 / (1024*1024) / (t/1000000) = ARR_SIZE*95.36743 / t - printf(NAME ": cpu clocks=%llu = %dus (%5.3ffps) %5.1fMB/s\n", v2-v1, t, + printf(NAME ": CPU clocks=%llu = %dus (%5.3ffps) %5.1fMB/s\n", v2-v1, t, 100000000.0f/(float)t, (float)ARR_SIZE*95.36743f/(float)t); return 0; } From subversion at mplayerhq.hu Mon Mar 9 13:59:17 2009 From: subversion at mplayerhq.hu (reimar) Date: Mon, 9 Mar 2009 13:59:17 +0100 (CET) Subject: [MPlayer-cvslog] r28906 - in trunk: Makefile TOOLS/fastmemcpybench.c Message-ID: <20090309125918.18E963B55B@natsuki.mplayerhq.hu> Author: reimar Date: Mon Mar 9 13:59:14 2009 New Revision: 28906 Log: Make fastmemcpybench almost working - only thing missing is a way to override HAVE_MMX etc. from config.h. Modified: trunk/Makefile trunk/TOOLS/fastmemcpybench.c Modified: trunk/Makefile ============================================================================== --- trunk/Makefile Mon Mar 9 13:29:42 2009 (r28905) +++ trunk/Makefile Mon Mar 9 13:59:14 2009 (r28906) @@ -1029,8 +1029,8 @@ TOOLS/fastmem-mga-sse$(EXESUF): CFLAGS + fastmemcpybench: $(addsuffix $(EXESUF),$(addprefix TOOLS/fastmem-,c mmx k6 k7 sse mga-mmx mga-k6 mga-k7 mga-sse)) -TOOLS/fastmem-%$(EXESUF): TOOLS/fastmemcpybench.c - $(CC) $(CFLAGS) -o $@ $< +TOOLS/fastmem-%$(EXESUF): TOOLS/fastmemcpybench.c libvo/aclib.c + $(CC) $(CFLAGS) -o $@ $^ REAL_SRCS = $(wildcard TOOLS/realcodecs/*.c) REAL_TARGETS = $(REAL_SRCS:.c=.so.6.0) Modified: trunk/TOOLS/fastmemcpybench.c ============================================================================== --- trunk/TOOLS/fastmemcpybench.c Mon Mar 9 13:29:42 2009 (r28905) +++ trunk/TOOLS/fastmemcpybench.c Mon Mar 9 13:59:14 2009 (r28906) @@ -18,6 +18,7 @@ #include #include #include +#include "libvo/fastmemcpy.h" //#define ARR_SIZE 100000 #define ARR_SIZE (1024*768*2) @@ -113,7 +114,7 @@ int main(void) t = GetTimer(); v1 = read_tsc(); for (i = 0; i < 100; i++) - memcpy(marr1, marr2, ARR_SIZE - 16); + fast_memcpy(marr1, marr2, ARR_SIZE - 16); v2 = read_tsc(); t = GetTimer() - t; // ARR_SIZE*100 / (1024*1024) / (t/1000000) = ARR_SIZE*95.36743 / t From subversion at mplayerhq.hu Mon Mar 9 14:11:38 2009 From: subversion at mplayerhq.hu (reimar) Date: Mon, 9 Mar 2009 14:11:38 +0100 (CET) Subject: [MPlayer-cvslog] r28907 - in trunk: DOCS/tech/MAINTAINERS Makefile libmpdemux/demux_nuv.c libmpdemux/demuxer.c Message-ID: <20090309131138.379113B5D3@natsuki.mplayerhq.hu> Author: reimar Date: Mon Mar 9 14:11:37 2009 New Revision: 28907 Log: Remove native nuv demuxer, it only needs more code to achieve the same thing as the libavformat demuxer. Deleted: trunk/libmpdemux/demux_nuv.c Modified: trunk/DOCS/tech/MAINTAINERS trunk/Makefile trunk/libmpdemux/demuxer.c Modified: trunk/DOCS/tech/MAINTAINERS ============================================================================== --- trunk/DOCS/tech/MAINTAINERS Mon Mar 9 13:59:14 2009 (r28906) +++ trunk/DOCS/tech/MAINTAINERS Mon Mar 9 14:11:37 2009 (r28907) @@ -116,7 +116,6 @@ demuxers: * demux_rtp* - Ross Finlayson * demux_mpg and demux_ts - Nico Sabbi * demux_mpc.c - Reimar D?ffinger - * demux_nuv.c - Reimar D?ffinger muxers: * muxer_lavf.c - Michael Niedermayer Modified: trunk/Makefile ============================================================================== --- trunk/Makefile Mon Mar 9 13:59:14 2009 (r28906) +++ trunk/Makefile Mon Mar 9 14:11:37 2009 (r28907) @@ -184,7 +184,6 @@ SRCS_COMMON = asxparser.c \ libmpdemux/demux_mov.c \ libmpdemux/demux_mpg.c \ libmpdemux/demux_nsv.c \ - libmpdemux/demux_nuv.c \ libmpdemux/demux_pva.c \ libmpdemux/demux_rawaudio.c \ libmpdemux/demux_rawvideo.c \ Modified: trunk/libmpdemux/demuxer.c ============================================================================== --- trunk/libmpdemux/demuxer.c Mon Mar 9 13:59:14 2009 (r28906) +++ trunk/libmpdemux/demuxer.c Mon Mar 9 14:11:37 2009 (r28907) @@ -45,7 +45,6 @@ extern const demuxer_desc_t demuxer_desc extern const demuxer_desc_t demuxer_desc_avi; extern const demuxer_desc_t demuxer_desc_y4m; extern const demuxer_desc_t demuxer_desc_asf; -extern const demuxer_desc_t demuxer_desc_nuv; extern const demuxer_desc_t demuxer_desc_real; extern const demuxer_desc_t demuxer_desc_smjpeg; extern const demuxer_desc_t demuxer_desc_matroska; @@ -100,7 +99,6 @@ const demuxer_desc_t *const demuxer_list &demuxer_desc_y4m, &demuxer_desc_asf, &demuxer_desc_nsv, - &demuxer_desc_nuv, &demuxer_desc_real, &demuxer_desc_smjpeg, &demuxer_desc_matroska, From subversion at mplayerhq.hu Mon Mar 9 14:23:28 2009 From: subversion at mplayerhq.hu (reimar) Date: Mon, 9 Mar 2009 14:23:28 +0100 (CET) Subject: [MPlayer-cvslog] r28908 - trunk/libmpdemux/nuppelvideo.h Message-ID: <20090309132328.4E6353B5BE@natsuki.mplayerhq.hu> Author: reimar Date: Mon Mar 9 14:23:27 2009 New Revision: 28908 Log: Remove now unused parts of nuppelvideo.h Modified: trunk/libmpdemux/nuppelvideo.h Modified: trunk/libmpdemux/nuppelvideo.h ============================================================================== --- trunk/libmpdemux/nuppelvideo.h Mon Mar 9 14:11:37 2009 (r28907) +++ trunk/libmpdemux/nuppelvideo.h Mon Mar 9 14:23:27 2009 (r28908) @@ -20,29 +20,6 @@ #ifndef MPLAYER_NUPPELVIDEO_H #define MPLAYER_NUPPELVIDEO_H -#include "libavutil/intfloat_readwrite.h" - -typedef struct __attribute__((packed)) rtfileheader -{ - char finfo[12]; // "NuppelVideo" + \0 - char version[5]; // "0.05" + \0 - char pad1[3]; - int width; - int height; - int desiredwidth; // 0 .. as it is - int desiredheight; // 0 .. as it is - char pimode; // P .. progressive - // I .. interlaced (2 half pics) [NI] - char pad2[3]; - double aspect; // 1.0 .. square pixel (1.5 .. e.g. width=480: width*1.5=720 - // for capturing for svcd material - double fps; - int videoblocks; // count of video-blocks -1 .. unknown 0 .. no video - int audioblocks; // count of audio-blocks -1 .. unknown 0 .. no audio - int textsblocks; // count of text-blocks -1 .. unknown 0 .. no text - int keyframedist; -} rtfileheader; - typedef struct __attribute__((packed)) rtframeheader { char frametype; // A .. Audio, V .. Video, S .. Sync, T .. Text @@ -93,87 +70,11 @@ typedef struct __attribute__((packed)) // R: do not use here! (fixed 'RTjjjjjjjjjjjjjj') } rtframeheader; -/* for MythTV */ -typedef struct __attribute__((packed)) extendeddata -{ - int version; // yes, this is repeated from the file header - int video_fourcc; // video encoding method used - int audio_fourcc; // audio encoding method used - // generic data - int audio_sample_rate; - int audio_bits_per_sample; - int audio_channels; - // codec specific - // mp3lame - int audio_compression_ratio; - int audio_quality; - // rtjpeg - int rtjpeg_quality; - int rtjpeg_luma_filter; - int rtjpeg_chroma_filter; - // libavcodec - int lavc_bitrate; - int lavc_qmin; - int lavc_qmax; - int lavc_maxqdiff; - // unused for later -- total size of 128 integers. - // new fields must be added at the end, above this comment. - int expansion[113]; -} extendeddata; - #define FRAMEHEADERSIZE sizeof(rtframeheader) -#define FILEHEADERSIZE sizeof(rtfileheader) -typedef struct vidbuffertype -{ - int sample; - int timecode; - int freeToEncode; - int freeToBuffer; - unsigned char *buffer_offset; -} vidbuffertyp; - -typedef struct audbuffertype -{ - int sample; - int timecode; - int freeToEncode; - int freeToBuffer; - unsigned char *buffer_offset; -} audbuffertyp; - -#define le2me_rtfileheader(h) { \ - (h)->width = le2me_32((h)->width); \ - (h)->height = le2me_32((h)->height); \ - (h)->desiredwidth = le2me_32((h)->desiredwidth); \ - (h)->desiredheight = le2me_32((h)->desiredheight); \ - (h)->aspect = av_int2dbl(le2me_64(*(uint64_t *)&(h)->aspect));\ - (h)->fps = av_int2dbl(le2me_64(*(uint64_t *)&(h)->fps)); \ - (h)->videoblocks = le2me_32((h)->videoblocks); \ - (h)->audioblocks = le2me_32((h)->audioblocks); \ - (h)->textsblocks = le2me_32((h)->textsblocks); \ - (h)->keyframedist = le2me_32((h)->keyframedist); \ - } #define le2me_rtframeheader(h) { \ (h)->timecode = le2me_32((h)->timecode); \ (h)->packetlength = le2me_32((h)->packetlength); \ } -#define le2me_extendeddata(h) { \ - (h)->version = le2me_32((h)->version); \ - (h)->video_fourcc = le2me_32((h)->video_fourcc); \ - (h)->audio_fourcc = le2me_32((h)->audio_fourcc); \ - (h)->audio_sample_rate = le2me_32((h)->audio_sample_rate); \ - (h)->audio_bits_per_sample = le2me_32((h)->audio_bits_per_sample);\ - (h)->audio_channels = le2me_32((h)->audio_channels); \ - (h)->audio_compression_ratio = le2me_32((h)->audio_compression_ratio);\ - (h)->audio_quality = le2me_32((h)->audio_quality); \ - (h)->rtjpeg_quality = le2me_32((h)->rtjpeg_quality); \ - (h)->rtjpeg_luma_filter = le2me_32((h)->rtjpeg_luma_filter); \ - (h)->rtjpeg_chroma_filter = le2me_32((h)->rtjpeg_chroma_filter);\ - (h)->lavc_bitrate = le2me_32((h)->lavc_bitrate); \ - (h)->lavc_qmin = le2me_32((h)->lavc_qmin); \ - (h)->lavc_qmax = le2me_32((h)->lavc_qmax); \ - (h)->lavc_maxqdiff = le2me_32((h)->lavc_maxqdiff); \ - } #endif /* MPLAYER_NUPPELVIDEO_H */ From subversion at mplayerhq.hu Mon Mar 9 14:37:55 2009 From: subversion at mplayerhq.hu (reimar) Date: Mon, 9 Mar 2009 14:37:55 +0100 (CET) Subject: [MPlayer-cvslog] r28909 - trunk/libmpcodecs/ve_nuv.c Message-ID: <20090309133755.A82F53B49C@natsuki.mplayerhq.hu> Author: reimar Date: Mon Mar 9 14:37:55 2009 New Revision: 28909 Log: nuv encoder 64 bit fix: avoid using long/sizeof(long) Modified: trunk/libmpcodecs/ve_nuv.c Modified: trunk/libmpcodecs/ve_nuv.c ============================================================================== --- trunk/libmpcodecs/ve_nuv.c Mon Mar 9 14:23:27 2009 (r28908) +++ trunk/libmpcodecs/ve_nuv.c Mon Mar 9 14:37:55 2009 (r28909) @@ -68,6 +68,8 @@ m_option_t nuvopts_conf[]={ //===========================================================================// +#define COMPDATASIZE (128*4) + static int config(struct vf_instance_s* vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ @@ -75,8 +77,8 @@ static int config(struct vf_instance_s* // We need a buffer wich can holda header and a whole YV12 picture // or a RTJpeg table vf->priv->buf_size = width*height*3/2+FRAMEHEADERSIZE; - if(vf->priv->buf_size < (int)(128*sizeof(long int) + FRAMEHEADERSIZE)) - vf->priv->buf_size = 128*sizeof(long int) + FRAMEHEADERSIZE; + if(vf->priv->buf_size < COMPDATASIZE + FRAMEHEADERSIZE) + vf->priv->buf_size = COMPDATASIZE + FRAMEHEADERSIZE; mux_v->bih->biWidth=width; mux_v->bih->biHeight=height; @@ -110,16 +112,16 @@ static int put_image(struct vf_instance_ // This has to be don here otherwise tv with sound doesn't work if(!vf->priv->tbl_wrote) { - RTjpeg_init_compress((long int*)data,mpi->width,mpi->height,vf->priv->q); + RTjpeg_init_compress((uint32_t *)data,mpi->width,mpi->height,vf->priv->q); RTjpeg_init_mcompress(); ench->frametype = 'D'; // compressor data ench->comptype = 'R'; // compressor data for RTjpeg - ench->packetlength = 128*sizeof(long int); + ench->packetlength = COMPDATASIZE; le2me_rtframeheader(ench); mux_v->buffer=vf->priv->buffer; - muxer_write_chunk(mux_v,FRAMEHEADERSIZE + 128*sizeof(long int), 0x10, MP_NOPTS_VALUE, MP_NOPTS_VALUE); + muxer_write_chunk(mux_v,FRAMEHEADERSIZE + COMPDATASIZE, 0x10, MP_NOPTS_VALUE, MP_NOPTS_VALUE); vf->priv->tbl_wrote = 1; memset(ench,0,FRAMEHEADERSIZE); // Reset the header } From tempn at twmi.rr.com Mon Mar 9 16:24:34 2009 From: tempn at twmi.rr.com (compn) Date: Mon, 9 Mar 2009 10:24:34 -0500 Subject: [MPlayer-cvslog] r28907 - in trunk: DOCS/tech/MAINTAINERS Makefile libmpdemux/demux_nuv.c libmpdemux/demuxer.c In-Reply-To: <20090309131138.379113B5D3@natsuki.mplayerhq.hu> References: <20090309131138.379113B5D3@natsuki.mplayerhq.hu> Message-ID: <20090309102434.d1ff3b68.tempn@twmi.rr.com> On Mon, 9 Mar 2009 14:11:38 +0100 (CET), reimar wrote: > * demux_mpc.c - Reimar D?ffinger >- * demux_nuv.c - Reimar D?ffinger while you are here, is there any difference between libmpdemux and libavformat musepack demuxer ? -compn From subversion at mplayerhq.hu Mon Mar 9 15:30:42 2009 From: subversion at mplayerhq.hu (reimar) Date: Mon, 9 Mar 2009 15:30:42 +0100 (CET) Subject: [MPlayer-cvslog] r28910 - trunk/libmpcodecs/ve_nuv.c Message-ID: <20090309143042.3F3B73B324@natsuki.mplayerhq.hu> Author: reimar Date: Mon Mar 9 15:30:41 2009 New Revision: 28910 Log: Allocate buffer for lzo compression correctly also for large frame sizes. Modified: trunk/libmpcodecs/ve_nuv.c Modified: trunk/libmpcodecs/ve_nuv.c ============================================================================== --- trunk/libmpcodecs/ve_nuv.c Mon Mar 9 14:37:55 2009 (r28909) +++ trunk/libmpcodecs/ve_nuv.c Mon Mar 9 15:30:41 2009 (r28910) @@ -24,8 +24,7 @@ #include "native/rtjpegn.h" #define LZO_AL(size) (((size) + (sizeof(long) - 1)) / sizeof(long)) -#define LZO_IN_LEN (1024*1024L) -#define LZO_OUT_LEN (LZO_IN_LEN + LZO_IN_LEN / 64 + 16 + 3) +#define LZO_OUT_LEN(in) ((in) + (in) / 64 + 16 + 3) //===========================================================================// @@ -85,6 +84,8 @@ static int config(struct vf_instance_s* mux_v->bih->biSizeImage=mux_v->bih->biWidth*mux_v->bih->biHeight*(mux_v->bih->biBitCount/8); mux_v->aspect = (float)d_width/d_height; vf->priv->buffer = realloc(vf->priv->buffer,vf->priv->buf_size); + if (vf->priv->lzo) + vf->priv->zbuffer = realloc(vf->priv->zbuffer, FRAMEHEADERSIZE + LZO_OUT_LEN(vf->priv->buf_size)); vf->priv->tbl_wrote = 0; return 1; @@ -218,8 +219,7 @@ static int vf_open(vf_instance_t *vf, ch if(lzo_init() != LZO_E_OK) { mp_msg(MSGT_VFILTER,MSGL_WARN,"LZO init failed: no lzo compression\n"); vf->priv->lzo = 0; - } - vf->priv->zbuffer = (lzo_bytep)malloc(FRAMEHEADERSIZE + LZO_OUT_LEN); + } else vf->priv->zmem = malloc(sizeof(long)*LZO_AL(LZO1X_1_MEM_COMPRESS)); } From subversion at mplayerhq.hu Mon Mar 9 15:32:19 2009 From: subversion at mplayerhq.hu (reimar) Date: Mon, 9 Mar 2009 15:32:19 +0100 (CET) Subject: [MPlayer-cvslog] r28911 - trunk/libmpcodecs/ve_nuv.c Message-ID: <20090309143219.9DAFF3B324@natsuki.mplayerhq.hu> Author: reimar Date: Mon Mar 9 15:32:19 2009 New Revision: 28911 Log: Do not calculate the same value twice Modified: trunk/libmpcodecs/ve_nuv.c Modified: trunk/libmpcodecs/ve_nuv.c ============================================================================== --- trunk/libmpcodecs/ve_nuv.c Mon Mar 9 15:30:41 2009 (r28910) +++ trunk/libmpcodecs/ve_nuv.c Mon Mar 9 15:32:19 2009 (r28911) @@ -132,7 +132,7 @@ static int put_image(struct vf_instance_ len = mpi->width*mpi->height*3/2; // Try lzo ??? if(vf->priv->lzo) { - r = lzo1x_1_compress(mpi->planes[0],mpi->width*mpi->height*3/2, + r = lzo1x_1_compress(mpi->planes[0],len, zdata,&zlen,vf->priv->zmem); if(r != LZO_E_OK) { mp_msg(MSGT_VFILTER,MSGL_ERR,"LZO compress error\n"); From Reimar.Doeffinger at gmx.de Mon Mar 9 15:34:38 2009 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Mon, 9 Mar 2009 15:34:38 +0100 Subject: [MPlayer-cvslog] r28907 - in trunk: DOCS/tech/MAINTAINERS Makefile libmpdemux/demux_nuv.c libmpdemux/demuxer.c In-Reply-To: <20090309102434.d1ff3b68.tempn@twmi.rr.com> References: <20090309131138.379113B5D3@natsuki.mplayerhq.hu> <20090309102434.d1ff3b68.tempn@twmi.rr.com> Message-ID: <20090309143438.GA28468@1und1.de> On Mon, Mar 09, 2009 at 10:24:34AM -0500, compn wrote: > On Mon, 9 Mar 2009 14:11:38 +0100 (CET), reimar wrote: > > * demux_mpc.c - Reimar D?ffinger > >- * demux_nuv.c - Reimar D?ffinger > > while you are here, is there any difference between libmpdemux > and libavformat musepack demuxer ? Yes, unfortunately the bitstream formats are completely different. Probably they should be removed anyway though... From subversion at mplayerhq.hu Mon Mar 9 15:40:55 2009 From: subversion at mplayerhq.hu (reimar) Date: Mon, 9 Mar 2009 15:40:55 +0100 (CET) Subject: [MPlayer-cvslog] r28912 - trunk/libmpcodecs/ve_nuv.c Message-ID: <20090309144055.B20903B526@natsuki.mplayerhq.hu> Author: reimar Date: Mon Mar 9 15:40:55 2009 New Revision: 28912 Log: Fix type of zlen, fixes crashes on 64 bit systems. Modified: trunk/libmpcodecs/ve_nuv.c Modified: trunk/libmpcodecs/ve_nuv.c ============================================================================== --- trunk/libmpcodecs/ve_nuv.c Mon Mar 9 15:32:19 2009 (r28911) +++ trunk/libmpcodecs/ve_nuv.c Mon Mar 9 15:40:55 2009 (r28912) @@ -105,7 +105,8 @@ static int put_image(struct vf_instance_ struct rtframeheader* ench = (struct rtframeheader*)vf->priv->buffer; uint8_t* data = vf->priv->buffer + FRAMEHEADERSIZE; uint8_t* zdata = vf->priv->zbuffer + FRAMEHEADERSIZE; - int len = 0, zlen = 0,r; + int len = 0, r; + size_t zlen = 0; memset(vf->priv->buffer,0,FRAMEHEADERSIZE); // Reset the header if(vf->priv->lzo) From subversion at mplayerhq.hu Mon Mar 9 15:49:18 2009 From: subversion at mplayerhq.hu (compn) Date: Mon, 9 Mar 2009 15:49:18 +0100 (CET) Subject: [MPlayer-cvslog] r28913 - trunk/Changelog Message-ID: <20090309144918.601703B543@natsuki.mplayerhq.hu> Author: compn Date: Mon Mar 9 15:49:17 2009 New Revision: 28913 Log: people are forgetting to update the changelog Modified: trunk/Changelog Modified: trunk/Changelog ============================================================================== --- trunk/Changelog Mon Mar 9 15:40:55 2009 (r28912) +++ trunk/Changelog Mon Mar 9 15:49:17 2009 (r28913) @@ -37,6 +37,7 @@ MPlayer (1.0) * Brooktree YUV 4:1:1 Raw (Y41P) via binary DLL * many rare/obscure fourccs for known formats added * lower priority for binary Linux rv3040 codecs due to bugs + * remove native NuppleVideo decoder, use lavc instead Demuxers: * -lavfdopts cryptokey allows decrypting MXF and ASF files @@ -55,6 +56,7 @@ MPlayer (1.0) * support seeking in multirate RealMedia files * FLAC speedup in lavf demuxer * MNG demuxer + * remove native NuppleVideo demuxer, use lavf demuxer instead Filters: * vf_ow new overcomplete wavelet denoiser @@ -166,6 +168,8 @@ MPlayer (1.0) * libdvdcss updated to 1.2.10, now same as upstream version * fix -endchapter support again for -dump* options * add startup volume option + * add option to disable default key binds + * change default OSD and subtitle font size to a smaller default libass: * various fixes and updates to match VSFilter renderer From subversion at mplayerhq.hu Mon Mar 9 16:01:12 2009 From: subversion at mplayerhq.hu (reimar) Date: Mon, 9 Mar 2009 16:01:12 +0100 (CET) Subject: [MPlayer-cvslog] r28914 - in trunk: libmpcodecs/ve_nuv.c libmpdemux/nuppelvideo.h Message-ID: <20090309150113.0FECD3B558@natsuki.mplayerhq.hu> Author: reimar Date: Mon Mar 9 16:01:12 2009 New Revision: 28914 Log: Get rid of nuppelvideo.h and its ugly packed struct and instead write the frame header directly in nuv encoder. Deleted: trunk/libmpdemux/nuppelvideo.h Modified: trunk/libmpcodecs/ve_nuv.c Modified: trunk/libmpcodecs/ve_nuv.c ============================================================================== --- trunk/libmpcodecs/ve_nuv.c Mon Mar 9 15:49:17 2009 (r28913) +++ trunk/libmpcodecs/ve_nuv.c Mon Mar 9 16:01:12 2009 (r28914) @@ -19,7 +19,7 @@ #include "mp_image.h" #include "vf.h" -#include "libmpdemux/nuppelvideo.h" +#include "libavutil/intreadwrite.h" #include #include "native/rtjpegn.h" @@ -68,6 +68,7 @@ m_option_t nuvopts_conf[]={ #define COMPDATASIZE (128*4) +#define FRAMEHEADERSIZE 12 static int config(struct vf_instance_s* vf, int width, int height, int d_width, int d_height, @@ -102,13 +103,13 @@ static int query_format(struct vf_instan } static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ - struct rtframeheader* ench = (struct rtframeheader*)vf->priv->buffer; + uint8_t *header = vf->priv->buffer; uint8_t* data = vf->priv->buffer + FRAMEHEADERSIZE; uint8_t* zdata = vf->priv->zbuffer + FRAMEHEADERSIZE; int len = 0, r; size_t zlen = 0; - memset(vf->priv->buffer,0,FRAMEHEADERSIZE); // Reset the header + memset(header, 0, FRAMEHEADERSIZE); // Reset the header if(vf->priv->lzo) memset(vf->priv->zbuffer,0,FRAMEHEADERSIZE); @@ -117,15 +118,14 @@ static int put_image(struct vf_instance_ RTjpeg_init_compress((uint32_t *)data,mpi->width,mpi->height,vf->priv->q); RTjpeg_init_mcompress(); - ench->frametype = 'D'; // compressor data - ench->comptype = 'R'; // compressor data for RTjpeg - ench->packetlength = COMPDATASIZE; + header[0] = 'D'; // frametype: compressor data + header[1] = 'R'; // comptype: compressor data for RTjpeg + AV_WL32(header + 8, COMPDATASIZE); // packetlength - le2me_rtframeheader(ench); mux_v->buffer=vf->priv->buffer; muxer_write_chunk(mux_v,FRAMEHEADERSIZE + COMPDATASIZE, 0x10, MP_NOPTS_VALUE, MP_NOPTS_VALUE); vf->priv->tbl_wrote = 1; - memset(ench,0,FRAMEHEADERSIZE); // Reset the header + memset(header, 0, FRAMEHEADERSIZE); // Reset the header } // Raw picture @@ -143,10 +143,10 @@ static int put_image(struct vf_instance_ if(zlen <= 0 || zlen > len) { memcpy(data,mpi->planes[0],len); - ench->comptype = '0'; + header[1] = '0'; // comptype: uncompressed } else { // Use lzo only if it's littler - ench = (struct rtframeheader*)vf->priv->zbuffer; - ench->comptype = '3'; + header = vf->priv->zbuffer; + header[1] = '3'; //comptype: lzo len = zlen; } @@ -167,19 +167,18 @@ static int put_image(struct vf_instance_ } if(zlen <= 0 || zlen > len) - ench->comptype = '1'; + header[1] = '1'; // comptype: RTjpeg else { - ench = (struct rtframeheader*)vf->priv->zbuffer; - ench->comptype = '2'; + header = vf->priv->zbuffer; + header[1] = '2'; // comptype: RTjpeg + LZO len = zlen; } } - ench->frametype = 'V'; // video frame - ench->packetlength = len; - le2me_rtframeheader(ench); - mux_v->buffer=(void*)ench; + header[0] = 'V'; // frametype: video frame + AV_WL32(header + 8, len); // packetlength + mux_v->buffer = header; muxer_write_chunk(mux_v, len + FRAMEHEADERSIZE, 0x10, pts, pts); return 1; } From kostya.shishkov at gmail.com Mon Mar 9 16:56:54 2009 From: kostya.shishkov at gmail.com (Kostya) Date: Mon, 9 Mar 2009 17:56:54 +0200 Subject: [MPlayer-cvslog] r28913 - trunk/Changelog In-Reply-To: <20090309144918.601703B543@natsuki.mplayerhq.hu> References: <20090309144918.601703B543@natsuki.mplayerhq.hu> Message-ID: <20090309155654.GA19730@localhost.localdomain> On Mon, Mar 09, 2009 at 03:49:18PM +0100, compn wrote: > Author: compn > Date: Mon Mar 9 15:49:17 2009 > New Revision: 28913 > > Log: > people are forgetting to update the changelog > > Modified: > trunk/Changelog > > Modified: trunk/Changelog > ============================================================================== > --- trunk/Changelog Mon Mar 9 15:40:55 2009 (r28912) > +++ trunk/Changelog Mon Mar 9 15:49:17 2009 (r28913) > @@ -37,6 +37,7 @@ MPlayer (1.0) > * Brooktree YUV 4:1:1 Raw (Y41P) via binary DLL > * many rare/obscure fourccs for known formats added > * lower priority for binary Linux rv3040 codecs due to bugs > + * remove native NuppleVideo decoder, use lavc instead ^^^^^^ And other people make grammar mistakes It's called NuppelVideo From subversion at mplayerhq.hu Mon Mar 9 16:01:54 2009 From: subversion at mplayerhq.hu (reimar) Date: Mon, 9 Mar 2009 16:01:54 +0100 (CET) Subject: [MPlayer-cvslog] r28915 - trunk/libmpdemux/demuxer.h Message-ID: <20090309150154.653143B495@natsuki.mplayerhq.hu> Author: reimar Date: Mon Mar 9 16:01:53 2009 New Revision: 28915 Log: Get rid of DEMUXER_TYPE_NUV define, it is no longer used. Modified: trunk/libmpdemux/demuxer.h Modified: trunk/libmpdemux/demuxer.h ============================================================================== --- trunk/libmpdemux/demuxer.h Mon Mar 9 16:01:12 2009 (r28914) +++ trunk/libmpdemux/demuxer.h Mon Mar 9 16:01:53 2009 (r28915) @@ -35,7 +35,6 @@ #define DEMUXER_TYPE_FLI 10 #define DEMUXER_TYPE_REAL 11 #define DEMUXER_TYPE_Y4M 12 -#define DEMUXER_TYPE_NUV 13 #define DEMUXER_TYPE_FILM 14 #define DEMUXER_TYPE_ROQ 15 #define DEMUXER_TYPE_MF 16 From tempn at twmi.rr.com Mon Mar 9 17:32:52 2009 From: tempn at twmi.rr.com (compn) Date: Mon, 9 Mar 2009 11:32:52 -0500 Subject: [MPlayer-cvslog] r28913 - trunk/Changelog In-Reply-To: <20090309155654.GA19730@localhost.localdomain> References: <20090309144918.601703B543@natsuki.mplayerhq.hu> <20090309155654.GA19730@localhost.localdomain> Message-ID: <20090309113252.dd3fe1ef.tempn@twmi.rr.com> On Mon, 9 Mar 2009 17:56:54 +0200, Kostya wrote: >On Mon, Mar 09, 2009 at 03:49:18PM +0100, compn wrote: >> Author: compn >> Date: Mon Mar 9 15:49:17 2009 >> New Revision: 28913 >> >> Log: >> people are forgetting to update the changelog >> >> Modified: >> trunk/Changelog >> >> Modified: trunk/Changelog >> ============================================================================== >> --- trunk/Changelog Mon Mar 9 15:40:55 2009 (r28912) >> +++ trunk/Changelog Mon Mar 9 15:49:17 2009 (r28913) >> @@ -37,6 +37,7 @@ MPlayer (1.0) >> * Brooktree YUV 4:1:1 Raw (Y41P) via binary DLL >> * many rare/obscure fourccs for known formats added >> * lower priority for binary Linux rv3040 codecs due to bugs >> + * remove native NuppleVideo decoder, use lavc instead > ^^^^^^ >And other people make grammar mistakes >It's called NuppelVideo thats a spelling mistake then, not grammar :) -compn From subversion at mplayerhq.hu Mon Mar 9 19:21:48 2009 From: subversion at mplayerhq.hu (reimar) Date: Mon, 9 Mar 2009 19:21:48 +0100 (CET) Subject: [MPlayer-cvslog] r28917 - in trunk/libao2: ao_jack.c ao_sdl.c Message-ID: <20090309182148.51FC53B52B@natsuki.mplayerhq.hu> Author: reimar Date: Mon Mar 9 19:21:47 2009 New Revision: 28917 Log: Reuse libavutil fifo code instead of reimplementing it over and over. Modified: trunk/libao2/ao_jack.c trunk/libao2/ao_sdl.c Modified: trunk/libao2/ao_jack.c ============================================================================== --- trunk/libao2/ao_jack.c Mon Mar 9 18:25:43 2009 (r28916) +++ trunk/libao2/ao_jack.c Mon Mar 9 19:21:47 2009 (r28917) @@ -36,7 +36,7 @@ #include "osdep/timer.h" #include "subopt-helper.h" -#include "libvo/fastmemcpy.h" +#include "libavutil/fifo.h" #include @@ -68,47 +68,10 @@ static volatile float callback_time = 0; #define CHUNK_SIZE (16 * 1024) //! number of "virtual" chunks the buffer consists of #define NUM_CHUNKS 8 -// This type of ring buffer may never fill up completely, at least -// one byte must always be unused. -// For performance reasons (alignment etc.) one whole chunk always stays -// empty, not only one byte. -#define BUFFSIZE ((NUM_CHUNKS + 1) * CHUNK_SIZE) +#define BUFFSIZE (NUM_CHUNKS * CHUNK_SIZE) //! buffer for audio data -static unsigned char *buffer = NULL; - -//! buffer read position, may only be modified by playback thread or while it is stopped -static volatile int read_pos; -//! buffer write position, may only be modified by MPlayer's thread -static volatile int write_pos; - -/** - * \brief get the number of free bytes in the buffer - * \return number of free bytes in buffer - * - * may only be called by MPlayer's thread - * return value may change between immediately following two calls, - * and the real number of free bytes might be larger! - */ -static int buf_free(void) { - int free = read_pos - write_pos - CHUNK_SIZE; - if (free < 0) free += BUFFSIZE; - return free; -} - -/** - * \brief get amount of data available in the buffer - * \return number of bytes available in buffer - * - * may only be called by the playback thread - * return value may change between immediately following two calls, - * and the real number of buffered bytes might be larger! - */ -static int buf_used(void) { - int used = write_pos - read_pos; - if (used < 0) used += BUFFSIZE; - return used; -} +static AVFifoBuffer *buffer; /** * \brief insert len bytes into buffer @@ -119,22 +82,34 @@ static int buf_used(void) { * If there is not enough room, the buffer is filled up */ static int write_buffer(unsigned char* data, int len) { - int first_len = BUFFSIZE - write_pos; - int free = buf_free(); + int free = BUFFSIZE - av_fifo_size(buffer); if (len > free) len = free; - if (first_len > len) first_len = len; - // till end of buffer - fast_memcpy (&buffer[write_pos], data, first_len); - if (len > first_len) { // we have to wrap around - // remaining part from beginning of buffer - fast_memcpy (buffer, &data[first_len], len - first_len); - } - write_pos = (write_pos + len) % BUFFSIZE; - return len; + return av_fifo_generic_write(buffer, data, len, NULL); } static void silence(float **bufs, int cnt, int num_bufs); +struct deinterleave { + float **bufs; + int num_bufs; + int cur_buf; + int pos; +}; + +static void deinterleave(void *info, void *src, int len) { + struct deinterleave *di = info; + float *s = src; + int i; + len /= sizeof(float); + for (i = 0; i < len; i++) { + di->bufs[di->cur_buf++][di->pos] = s[i]; + if (di->cur_buf >= di->num_bufs) { + di->cur_buf = 0; + di->pos++; + } + } +} + /** * \brief read data from buffer and splitting it into channels * \param bufs num_bufs float buffers, each will contain the data of one channel @@ -149,18 +124,13 @@ static void silence(float **bufs, int cn * with silence. */ static int read_buffer(float **bufs, int cnt, int num_bufs) { - int buffered = buf_used(); - int i, j; + struct deinterleave di = {bufs, num_bufs, 0, 0}; + int buffered = av_fifo_size(buffer); if (cnt * sizeof(float) * num_bufs > buffered) { silence(bufs, cnt, num_bufs); cnt = buffered / sizeof(float) / num_bufs; } - for (i = 0; i < cnt; i++) { - for (j = 0; j < num_bufs; j++) { - bufs[j][i] = *(float *)&buffer[read_pos]; - read_pos = (read_pos + sizeof(float)) % BUFFSIZE; - } - } + av_fifo_generic_read(buffer, &di, cnt * num_bufs * sizeof(float), deinterleave); return cnt; } @@ -268,7 +238,7 @@ static int init(int rate, int channels, mp_msg(MSGT_AO, MSGL_FATAL, "[JACK] cannot open server\n"); goto err_out; } - reset(); + buffer = av_fifo_alloc(BUFFSIZE); jack_set_process_callback(client, outputaudio, 0); // list matching ports @@ -308,7 +278,6 @@ static int init(int rate, int channels, jack_latency = (float)(jack_port_get_total_latency(client, ports[0]) + jack_get_buffer_size(client)) / (float)rate; callback_interval = 0; - buffer = malloc(BUFFSIZE); ao_data.channels = channels; ao_data.samplerate = rate; @@ -327,7 +296,7 @@ err_out: free(client_name); if (client) jack_client_close(client); - free(buffer); + av_fifo_free(buffer); buffer = NULL; return 0; } @@ -340,7 +309,7 @@ static void uninit(int immed) { reset(); usec_sleep(100 * 1000); jack_client_close(client); - free(buffer); + av_fifo_free(buffer); buffer = NULL; } @@ -349,8 +318,7 @@ static void uninit(int immed) { */ static void reset(void) { paused = 1; - read_pos = 0; - write_pos = 0; + av_fifo_reset(buffer); paused = 0; } @@ -369,7 +337,7 @@ static void audio_resume(void) { } static int get_space(void) { - return buf_free(); + return BUFFSIZE - av_fifo_size(buffer); } /** @@ -383,7 +351,7 @@ static int play(void *data, int len, int } static float get_delay(void) { - int buffered = BUFFSIZE - CHUNK_SIZE - buf_free(); // could be less + int buffered = av_fifo_size(buffer); // could be less float in_jack = jack_latency; if (estimate && callback_interval > 0) { float elapsed = (float)GetTimer() / 1000000.0 - callback_time; Modified: trunk/libao2/ao_sdl.c ============================================================================== --- trunk/libao2/ao_sdl.c Mon Mar 9 18:25:43 2009 (r28916) +++ trunk/libao2/ao_sdl.c Mon Mar 9 19:21:47 2009 (r28917) @@ -3,8 +3,6 @@ * * Copyleft 2001 by Felix B?nemann (atmosfear at users.sf.net) * - * Thanks to Arpi for nice ringbuffer-code! - * * This file is part of MPlayer. * * MPlayer is free software; you can redistribute it and/or modify @@ -36,7 +34,7 @@ #include #include "osdep/timer.h" -#include "libvo/fastmemcpy.h" +#include "libavutil/fifo.h" static const ao_info_t info = { @@ -60,76 +58,34 @@ LIBAO_EXTERN(sdl) #define CHUNK_SIZE 4096 #define NUM_CHUNKS 8 -// This type of ring buffer may never fill up completely, at least -// one byte must always be unused. -// For performance reasons (alignment etc.) one whole chunk always stays -// empty, not only one byte. -#define BUFFSIZE ((NUM_CHUNKS + 1) * CHUNK_SIZE) +#define BUFFSIZE (NUM_CHUNKS * CHUNK_SIZE) -static unsigned char *buffer; +static AVFifoBuffer *buffer; -// may only be modified by SDL's playback thread or while it is stopped -static volatile int read_pos; -// may only be modified by mplayer's thread -static volatile int write_pos; #ifdef USE_SDL_INTERNAL_MIXER static unsigned char volume=SDL_MIX_MAXVOLUME; #endif -// may only be called by mplayer's thread -// return value may change between immediately following two calls, -// and the real number of free bytes might be larger! -static int buf_free(void) { - int free = read_pos - write_pos - CHUNK_SIZE; - if (free < 0) free += BUFFSIZE; - return free; -} - -// may only be called by SDL's playback thread -// return value may change between immediately following two calls, -// and the real number of buffered bytes might be larger! -static int buf_used(void) { - int used = write_pos - read_pos; - if (used < 0) used += BUFFSIZE; - return used; -} - static int write_buffer(unsigned char* data,int len){ - int first_len = BUFFSIZE - write_pos; - int free = buf_free(); + int free = BUFFSIZE - av_fifo_size(buffer); if (len > free) len = free; - if (first_len > len) first_len = len; - // till end of buffer - fast_memcpy (&buffer[write_pos], data, first_len); - if (len > first_len) { // we have to wrap around - // remaining part from beginning of buffer - fast_memcpy (buffer, &data[first_len], len - first_len); - } - write_pos = (write_pos + len) % BUFFSIZE; - return len; + return av_fifo_generic_write(buffer, data, len, NULL); } -static int read_buffer(unsigned char* data,int len){ - int first_len = BUFFSIZE - read_pos; - int buffered = buf_used(); - if (len > buffered) len = buffered; - if (first_len > len) first_len = len; - // till end of buffer #ifdef USE_SDL_INTERNAL_MIXER - SDL_MixAudio (data, &buffer[read_pos], first_len, volume); -#else - fast_memcpy (data, &buffer[read_pos], first_len); +static void mix_audio(void *dst, void *src, int len) { + SDL_MixAudio(dst, src, len, volume); +} #endif - if (len > first_len) { // we have to wrap around - // remaining part from beginning of buffer + +static int read_buffer(unsigned char* data,int len){ + int buffered = av_fifo_size(buffer); + if (len > buffered) len = buffered; #ifdef USE_SDL_INTERNAL_MIXER - SDL_MixAudio (&data[first_len], buffer, len - first_len, volume); + return av_fifo_generic_read(buffer, data, len, mix_audio); #else - fast_memcpy (&data[first_len], buffer, len - first_len); + return av_fifo_generic_read(buffer, data, len, NULL); #endif - } - read_pos = (read_pos + len) % BUFFSIZE; - return len; } // end ring buffer stuff @@ -175,7 +131,7 @@ static int init(int rate,int channels,in SDL_AudioSpec aspec, obtained; /* Allocate ring-buffer memory */ - buffer = (unsigned char *) malloc(BUFFSIZE); + buffer = av_fifo_alloc(BUFFSIZE); mp_msg(MSGT_AO,MSGL_INFO,MSGTR_AO_SDL_INFO, rate, (channels > 1) ? "Stereo" : "Mono", af_fmt2str_short(format)); @@ -278,7 +234,6 @@ void callback(void *userdata, Uint8 *str ao_data.buffersize=obtained.size; ao_data.outburst = CHUNK_SIZE; - reset(); /* unsilence audio, if callback is ready */ SDL_PauseAudio(0); @@ -292,6 +247,7 @@ static void uninit(int immed){ usec_sleep(get_delay() * 1000 * 1000); SDL_CloseAudio(); SDL_QuitSubSystem(SDL_INIT_AUDIO); + av_fifo_free(buffer); } // stop playing and empty buffers (for seeking/pause) @@ -301,8 +257,7 @@ static void reset(void){ SDL_PauseAudio(1); /* Reset ring-buffer state */ - read_pos = 0; - write_pos = 0; + av_fifo_reset(buffer); SDL_PauseAudio(0); } @@ -325,7 +280,7 @@ static void audio_resume(void) // return: how many bytes can be played without blocking static int get_space(void){ - return buf_free(); + return BUFFSIZE - av_fifo_size(buffer); } // plays 'len' bytes of 'data' @@ -352,7 +307,7 @@ static int play(void* data,int len,int f // return: delay in seconds between first and last sample in buffer static float get_delay(void){ - int buffered = BUFFSIZE - CHUNK_SIZE - buf_free(); // could be less + int buffered = av_fifo_size(buffer); // could be less return (float)(buffered + ao_data.buffersize)/(float)ao_data.bps; } From subversion at mplayerhq.hu Mon Mar 9 20:15:21 2009 From: subversion at mplayerhq.hu (reimar) Date: Mon, 9 Mar 2009 20:15:21 +0100 (CET) Subject: [MPlayer-cvslog] r28918 - trunk/libao2/ao_win32.c Message-ID: <20090309191521.683EC3B3DC@natsuki.mplayerhq.hu> Author: reimar Date: Mon Mar 9 20:15:20 2009 New Revision: 28918 Log: Do not call waveOutReset in uninit if you should wait till playing finishes, and retry waveOutClose if it fails due to still playing. Modified: trunk/libao2/ao_win32.c Modified: trunk/libao2/ao_win32.c ============================================================================== --- trunk/libao2/ao_win32.c Mon Mar 9 19:21:47 2009 (r28917) +++ trunk/libao2/ao_win32.c Mon Mar 9 20:15:20 2009 (r28918) @@ -243,8 +243,9 @@ static void uninit(int immed) { if(!immed) usec_sleep(get_delay() * 1000 * 1000); + else waveOutReset(hWaveOut); - waveOutClose(hWaveOut); + while (waveOutClose(hWaveOut) == WAVERR_STILLPLAYING) usec_sleep(0); mp_msg(MSGT_AO, MSGL_V,"waveOut device closed\n"); free(waveBlocks); mp_msg(MSGT_AO, MSGL_V,"buffer memory freed\n"); From subversion at mplayerhq.hu Mon Mar 9 21:30:25 2009 From: subversion at mplayerhq.hu (ben) Date: Mon, 9 Mar 2009 21:30:25 +0100 (CET) Subject: [MPlayer-cvslog] r28919 - trunk/stream/freesdp/parser.c Message-ID: <20090309203025.33E4C3B4B6@natsuki.mplayerhq.hu> Author: ben Date: Mon Mar 9 21:30:24 2009 New Revision: 28919 Log: The first valid index is total count - 1 (usually 0) Modified: trunk/stream/freesdp/parser.c Modified: trunk/stream/freesdp/parser.c ============================================================================== --- trunk/stream/freesdp/parser.c Mon Mar 9 20:15:20 2009 (r28918) +++ trunk/stream/freesdp/parser.c Mon Mar 9 21:30:24 2009 (r28919) @@ -1644,7 +1644,7 @@ const char * fsdp_get_media_format (const fsdp_media_description_t * dsc, unsigned int index) { - if (!dsc || (index < dsc->formats_count)) + if (!dsc || (index < dsc->formats_count - 1)) return NULL; return dsc->formats[index]; } From subversion at mplayerhq.hu Mon Mar 9 21:31:03 2009 From: subversion at mplayerhq.hu (ben) Date: Mon, 9 Mar 2009 21:31:03 +0100 (CET) Subject: [MPlayer-cvslog] r28920 - trunk/stream/librtsp/rtsp_rtp.c Message-ID: <20090309203103.ED7193B4C5@natsuki.mplayerhq.hu> Author: ben Date: Mon Mar 9 21:31:03 2009 New Revision: 28920 Log: Ensure the string we're trying to compare is actually not NULL. Modified: trunk/stream/librtsp/rtsp_rtp.c Modified: trunk/stream/librtsp/rtsp_rtp.c ============================================================================== --- trunk/stream/librtsp/rtsp_rtp.c Mon Mar 9 21:30:24 2009 (r28919) +++ trunk/stream/librtsp/rtsp_rtp.c Mon Mar 9 21:31:03 2009 (r28920) @@ -507,7 +507,8 @@ rtp_setup_and_play (rtsp_t *rtsp_session } /* only MPEG-TS is supported at the moment */ - if (!strstr (fsdp_get_media_format (med_dsc, 0), + if (!fsdp_get_media_format (med_dsc, 0) || + !strstr (fsdp_get_media_format (med_dsc, 0), RTSP_MEDIA_CONTAINER_MPEG_TS)) { fsdp_description_delete (dsc); From subversion at mplayerhq.hu Mon Mar 9 21:56:19 2009 From: subversion at mplayerhq.hu (diego) Date: Mon, 9 Mar 2009 21:56:19 +0100 (CET) Subject: [MPlayer-cvslog] r28922 - trunk/Copyright Message-ID: <20090309205619.A2DB250032@natsuki.mplayerhq.hu> Author: diego Date: Mon Mar 9 21:56:19 2009 New Revision: 28922 Log: libmpdemux/nuppelvideo.h was removed. Modified: trunk/Copyright Modified: trunk/Copyright ============================================================================== --- trunk/Copyright Mon Mar 9 21:48:20 2009 (r28921) +++ trunk/Copyright Mon Mar 9 21:56:19 2009 (r28922) @@ -154,7 +154,7 @@ License: GNU General Public License Name: NuppelVideo / RTJPEG Version: 0.52a + patches Homepage: http://web.archive.org/web/20060219034716/http://frost.htu.tuwien.ac.at/~roman/nuppelvideo/ -Directory: libmpcodecs/native/rtjpegn.[ch] libmpdemux/nuppelvideo.h +Directory: libmpcodecs/native/rtjpegn.[ch] Copyright: 1998 Justin Schoeman (justin at suntiger.ee.up.ac.za) 1998, 1999 Joerg Walter 1999 Wim Taymans From subversion at mplayerhq.hu Mon Mar 9 22:31:36 2009 From: subversion at mplayerhq.hu (kraymer) Date: Mon, 9 Mar 2009 22:31:36 +0100 (CET) Subject: [MPlayer-cvslog] r28923 - trunk/DOCS/tech/mingw-crosscompile.txt Message-ID: <20090309213136.B5EEF50035@natsuki.mplayerhq.hu> Author: kraymer Date: Mon Mar 9 22:31:36 2009 New Revision: 28923 Log: typo Modified: trunk/DOCS/tech/mingw-crosscompile.txt Modified: trunk/DOCS/tech/mingw-crosscompile.txt ============================================================================== --- trunk/DOCS/tech/mingw-crosscompile.txt Mon Mar 9 21:56:19 2009 (r28922) +++ trunk/DOCS/tech/mingw-crosscompile.txt Mon Mar 9 22:31:36 2009 (r28923) @@ -2,7 +2,8 @@ Due to a lack of Windows developers, it developers to do at least some basic check of their code. This HOWTO explains how to set up MinGW cross-compilation under Debian. -First, you need to install the "mingw32" package and get a MPlayer SVN checkou. +First, you need to install the "mingw32" package and get a MPlayer SVN +checkout. Next, you need quite a lot of dependencies. Since this is for testing and not actually use, the easiest way is to use this package: From subversion at mplayerhq.hu Mon Mar 9 22:40:20 2009 From: subversion at mplayerhq.hu (diego) Date: Mon, 9 Mar 2009 22:40:20 +0100 (CET) Subject: [MPlayer-cvslog] r28924 - trunk/DOCS/tech/win32-codec-howto.txt Message-ID: <20090309214020.C5B8F3B31D@natsuki.mplayerhq.hu> Author: diego Date: Mon Mar 9 22:40:20 2009 New Revision: 28924 Log: GraphEdit is also available in the Microsoft SDK nowadays. Modified: trunk/DOCS/tech/win32-codec-howto.txt Modified: trunk/DOCS/tech/win32-codec-howto.txt ============================================================================== --- trunk/DOCS/tech/win32-codec-howto.txt Mon Mar 9 22:31:36 2009 (r28923) +++ trunk/DOCS/tech/win32-codec-howto.txt Mon Mar 9 22:40:20 2009 (r28924) @@ -53,7 +53,7 @@ New Method: Using Microsoft GraphEdit (fast) -- Get GraphEdit from either DirectX SDK or doom9. +- Get GraphEdit from the Microsoft SDK, DirectX SDK or doom9. - Start 'graphedit.exe'. - From the menu select "Graph -> Insert Filters". - Expand item "DirectShow Filters". From subversion at mplayerhq.hu Tue Mar 10 00:15:26 2009 From: subversion at mplayerhq.hu (diego) Date: Tue, 10 Mar 2009 00:15:26 +0100 (CET) Subject: [MPlayer-cvslog] r28925 - trunk/Copyright Message-ID: <20090309231526.657C63B47A@natsuki.mplayerhq.hu> Author: diego Date: Tue Mar 10 00:15:26 2009 New Revision: 28925 Log: cosmetics: Add newlines for better readability, rename Homepage entry to URL. Modified: trunk/Copyright Modified: trunk/Copyright ============================================================================== --- trunk/Copyright Mon Mar 9 22:40:20 2009 (r28924) +++ trunk/Copyright Tue Mar 10 00:15:26 2009 (r28925) @@ -9,22 +9,24 @@ from several external sources: Name: FFmpeg Version: Subversion HEAD -Homepage: http://www.ffmpeg.org +URL: http://www.ffmpeg.org Directory: libavcodec, libavformat, libavutil, libpostproc Copyright: Many, see individual files for copyright notices. License: GNU Lesser General Public License, some parts GNU General Public License, GNU General Public License when combined + Name: FAAD2 Version: 2.1 beta (20040915 CVS snapshot) + fixes and portability patches -Homepage: http://www.audiocoding.com +URL: http://www.audiocoding.com Directory: libfaad2 Copyright: 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com License: GNU General Public License + Name: GSM 06.10 library Version: patchlevel 10 -Homepage: http://kbs.cs.tu-berlin.de/~jutta/toast.html +URL: http://kbs.cs.tu-berlin.de/~jutta/toast.html Directory: libmpcodecs/native/ Copyright: 1992 by Jutta Degener and Carsten Bormann, TU Berlin License: permissive, see libmpcodecs/native/xa_gsm.c @@ -32,7 +34,7 @@ License: permissive, see libmpcodecs/ Name: liba52 Version: 0.7.4 + patches -Homepage: http://liba52.sourceforge.net/ +URL: http://liba52.sourceforge.net/ Directory: liba52 Copyright: 1999-2000 Aaron Holtzman 2000-2001 Michel Lespinasse @@ -41,13 +43,15 @@ Copyright: 1999-2000 Aaron Holtzman License: GNU General Public License + Name: libdvdcss Version: 1.2.10 -Homepage: http://developers.videolan.org/libdvdcss/ +URL: http://developers.videolan.org/libdvdcss/ Directory: libdvdcss Copyright: 1998-2008 VideoLAN License: GNU General Public License + Name: libdvdread Version: 0.9.7 + patches Homepage: http://www.dtek.chalmers.se/groups/dvd/development.shtml @@ -60,9 +64,10 @@ Copyright: 1998, 1999 Eric Smith License: GNU General Public License + Name: libmpeg2 Version: 0.5.1 + patches -Homepage: http://libmpeg2.sourceforge.net/ +URL: http://libmpeg2.sourceforge.net/ Directory: libmpeg2 Copyright: 1999-2000 Aaron Holtzman 2000-2004 Michel Lespinasse @@ -72,25 +77,28 @@ Copyright: 1999-2000 Aaron Holtzman License: GNU General Public License + Name: mpg123 Version: 0.59s + significant changes -Homepage: http://www.mpg123.de/ +URL: http://www.mpg123.de/ Directory: mp3lib Copyright: 1995-1999 by Michael Hipp 2004 Romain Dolbeau 2006 Zuxy Meng License: GNU General Public License + Name: librtsp Version: xine CVS 2003/04/10 + patches -Homepage: http://www.xinehq.de +URL: http://www.xinehq.de Directory: stream/librtsp/ Copyright: 2000-2002 the xine project License: GNU General Public License + Name: realrtsp Version: xine CVS 2003/04/17 + patches -Homepage: http://www.xinehq.de +URL: http://www.xinehq.de Directory: stream/realrtsp/ Copyright: 2002 the xine project License: GNU General Public License + Name: pnm protocol implementation Version: xine CVS 2002/12/26 + patches -Homepage: http://www.xinehq.de +URL: http://www.xinehq.de Directory: stream/pnm.[ch] Copyright: 2000-2002 the xine project License: GNU General Public License + Name: id3edit Version: 1.9 + patches -Homepage: http://id3edit.sourceforge.net/ +URL: http://id3edit.sourceforge.net/ Directory: libmpdemux/genres.h Copyright: 2001 Jason Carter License: GNU General Public License + Name: FreeSDP Version: 0.4.1 -Homepage: https://savannah.nongnu.org/projects/freesdp/ +URL: https://savannah.nongnu.org/projects/freesdp/ Directory: stream/freesdp/ Copyright: 2001-2003 Federico Montesino Pouzols License: GNU General Public License + Name: MJPEG Tools Version: post 2001-12-03 release or CVS snapshot -Homepage: http://mjpeg.sourceforge.net/ +URL: http://mjpeg.sourceforge.net/ Directory: libmpdemux/yuv4mpeg* Copyright: 2001 Matthew J. Marjanovic 2001 Andrew Stevens License: GNU General Public License + Name: NuppelVideo / RTJPEG Version: 0.52a + patches -Homepage: http://web.archive.org/web/20060219034716/http://frost.htu.tuwien.ac.at/~roman/nuppelvideo/ +URL: http://web.archive.org/web/20060219034716/http://frost.htu.tuwien.ac.at/~roman/nuppelvideo/ Directory: libmpcodecs/native/rtjpegn.[ch] Copyright: 1998 Justin Schoeman (justin at suntiger.ee.up.ac.za) 1998, 1999 Joerg Walter 1999 Wim Taymans License: GNU General Public License + Name: ReactOS Version: r25937 -Homepage: http://www.reactos.org/ +URL: http://www.reactos.org/ Directory: vidix/dhahelperwin/ntverp.h vidix/dhahelperwin/common.ver Copyright: Alex Ionescu (alex.ionescu at reactos.org) License: GNU General Public License From subversion at mplayerhq.hu Tue Mar 10 00:19:16 2009 From: subversion at mplayerhq.hu (diego) Date: Tue, 10 Mar 2009 00:19:16 +0100 (CET) Subject: [MPlayer-cvslog] r28926 - trunk/Copyright Message-ID: <20090309231916.708683B5A0@natsuki.mplayerhq.hu> Author: diego Date: Tue Mar 10 00:19:16 2009 New Revision: 28926 Log: Update entry for libdvdread; add entry for libdvdnav. Modified: trunk/Copyright Modified: trunk/Copyright ============================================================================== --- trunk/Copyright Tue Mar 10 00:15:26 2009 (r28925) +++ trunk/Copyright Tue Mar 10 00:19:16 2009 (r28926) @@ -53,15 +53,25 @@ License: GNU General Public License Name: libdvdread -Version: 0.9.7 + patches -Homepage: http://www.dtek.chalmers.se/groups/dvd/development.shtml -Directory: libdvdread +Version: Subversion HEAD +URL: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread/src +Directory: libdvdread4 Copyright: 1998, 1999 Eric Smith 1999 Christian Wolff for convergence integrated media - 2000-2001 Billy Biggs , + 2000-2004 Billy Biggs , 2001-2002 Samuel Hocevar , - 2000-2003 Bj?rn Englund , - 2000-2003 H?kan Hjort + 2000-2004 Bj?rn Englund , + 2000-2004 H?kan Hjort +License: GNU General Public License + + +Name: libdvdnav +Version: Subversion HEAD from +URL: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdnav/src +Directory: libdvdnav +Copyright: 2000, 2001 Martin Norb?ck, H?kan Hjort + 2000-2004 Rich Wareham + 2001-2004 the dvdnav project License: GNU General Public License From subversion at mplayerhq.hu Tue Mar 10 00:46:28 2009 From: subversion at mplayerhq.hu (cehoyos) Date: Tue, 10 Mar 2009 00:46:28 +0100 (CET) Subject: [MPlayer-cvslog] r28927 - trunk/libvo/vo_vdpau.c Message-ID: <20090309234628.DDD1D3B613@natsuki.mplayerhq.hu> Author: cehoyos Date: Tue Mar 10 00:46:28 2009 New Revision: 28927 Log: Output number of reference frames before creating H264 vdpau decoder. Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Tue Mar 10 00:19:16 2009 (r28926) +++ trunk/libvo/vo_vdpau.c Tue Mar 10 00:46:28 2009 (r28927) @@ -786,6 +786,7 @@ static int draw_slice(uint8_t *image[], break; case IMGFMT_VDPAU_H264: vdp_decoder_profile = VDP_DECODER_PROFILE_H264_HIGH; + mp_msg(MSGT_VO, MSGL_V, "[vdpau] Creating H264 hardware decoder for %d reference frames.\n", max_refs); break; case IMGFMT_VDPAU_WMV3: vdp_decoder_profile = VDP_DECODER_PROFILE_VC1_MAIN; From subversion at mplayerhq.hu Tue Mar 10 03:21:49 2009 From: subversion at mplayerhq.hu (compn) Date: Tue, 10 Mar 2009 03:21:49 +0100 (CET) Subject: [MPlayer-cvslog] r28928 - trunk/Changelog Message-ID: <20090310022149.65CE73B379@natsuki.mplayerhq.hu> Author: compn Date: Tue Mar 10 03:21:49 2009 New Revision: 28928 Log: typo nuppelvideo spotted by kostya Modified: trunk/Changelog Modified: trunk/Changelog ============================================================================== --- trunk/Changelog Tue Mar 10 00:46:28 2009 (r28927) +++ trunk/Changelog Tue Mar 10 03:21:49 2009 (r28928) @@ -37,7 +37,7 @@ MPlayer (1.0) * Brooktree YUV 4:1:1 Raw (Y41P) via binary DLL * many rare/obscure fourccs for known formats added * lower priority for binary Linux rv3040 codecs due to bugs - * remove native NuppleVideo decoder, use lavc instead + * remove native NuppelVideo decoder, use lavc instead Demuxers: * -lavfdopts cryptokey allows decrypting MXF and ASF files @@ -56,7 +56,7 @@ MPlayer (1.0) * support seeking in multirate RealMedia files * FLAC speedup in lavf demuxer * MNG demuxer - * remove native NuppleVideo demuxer, use lavf demuxer instead + * remove native NuppelVideo demuxer, use lavf demuxer instead Filters: * vf_ow new overcomplete wavelet denoiser From subversion at mplayerhq.hu Tue Mar 10 11:05:09 2009 From: subversion at mplayerhq.hu (diego) Date: Tue, 10 Mar 2009 11:05:09 +0100 (CET) Subject: [MPlayer-cvslog] r28929 - in trunk: Makefile TOOLS TOOLS/fastmem.sh TOOLS/fastmemcpybench.c Message-ID: <20090310100509.C3AAC3B24D@natsuki.mplayerhq.hu> Author: diego Date: Tue Mar 10 11:05:09 2009 New Revision: 28929 Log: Fix and restructure fastmemcpybench. It is now one binary that runs all available memcpy variants and prints benchmark results about them. Deleted: trunk/TOOLS/fastmem.sh Modified: trunk/Makefile trunk/TOOLS/ (props changed) trunk/TOOLS/fastmemcpybench.c Modified: trunk/Makefile ============================================================================== --- trunk/Makefile Tue Mar 10 03:21:49 2009 (r28928) +++ trunk/Makefile Tue Mar 10 11:05:09 2009 (r28929) @@ -986,7 +986,7 @@ tests: $(addsuffix $(EXESUF),$(TESTS)) testsclean: -rm -f $(foreach file,$(TESTS),$(call ADD_ALL_EXESUFS,$(file))) -TOOLS = $(addprefix TOOLS/,alaw-gen asfinfo avi-fix avisubdump compare dump_mp4 movinfo netstream subrip vivodump) +TOOLS = $(addprefix TOOLS/,alaw-gen asfinfo avi-fix avisubdump compare dump_mp4 fastmemcpybench movinfo netstream subrip vivodump) ifdef ARCH_X86 TOOLS += TOOLS/modify_reg @@ -999,7 +999,7 @@ alltools: $(addsuffix $(EXESUF),$(ALLTOO toolsclean: -rm -f $(foreach file,$(ALLTOOLS),$(call ADD_ALL_EXESUFS,$(file))) - -rm -f TOOLS/fastmem-* TOOLS/realcodecs/*.so.6.0 + -rm -f TOOLS/realcodecs/*.so.6.0 TOOLS/bmovl-test$(EXESUF): -lSDL_image @@ -1016,27 +1016,11 @@ TOOLS/vivodump$(EXESUF): TOOLS/vivodump. TOOLS/netstream$(EXESUF) TOOLS/vivodump$(EXESUF): $(subst mplayer.o,mplayer-nomain.o,$(OBJS_MPLAYER)) $(filter-out %mencoder.o,$(OBJS_MENCODER)) $(OBJS_COMMON) $(COMMON_LIBS) $(CC) $(CFLAGS) -o $@ $^ $(EXTRALIBS_MPLAYER) $(EXTRALIBS_MENCODER) $(COMMON_LDFLAGS) -TOOLS/fastmem-c$(EXESUF): CFLAGS += -DHAVE_MMX=0 -DHAVE_AMD3DNOW=0 -DHAVE_MMX2=0 -DHAVE_SSE=0 -DNAME=\"C\" -TOOLS/fastmem-mmx$(EXESUF): CFLAGS += -DHAVE_MMX=1 -DHAVE_AMD3DNOW=0 -DHAVE_MMX2=0 -DHAVE_SSE=0 -DNAME=\"MMX\" -TOOLS/fastmem-k6$(EXESUF): CFLAGS += -DHAVE_MMX=1 -DHAVE_AMD3DNOW=1 -DHAVE_MMX2=0 -DHAVE_SSE=0 -DNAME=\"K6\" -TOOLS/fastmem-k7$(EXESUF): CFLAGS += -DHAVE_MMX=1 -DHAVE_AMD3DNOW=1 -DHAVE_MMX2=1 -DHAVE_SSE=0 -DNAME=\"K7\" -TOOLS/fastmem-sse$(EXESUF): CFLAGS += -DHAVE_MMX=1 -DHAVE_AMD3DNOW=0 -DHAVE_MMX2=1 -DHAVE_SSE=1 -DNAME=\"SSE\" -TOOLS/fastmem-mga-mmx$(EXESUF): CFLAGS += -DHAVE_MMX=1 -DHAVE_AMD3DNOW=0 -DHAVE_MMX2=0 -DHAVE_SSE=0 -DNAME=\"MGA-MMX\" -DCONFIG_MGA -TOOLS/fastmem-mga-k6$(EXESUF): CFLAGS += -DHAVE_MMX=1 -DHAVE_AMD3DNOW=1 -DHAVE_MMX2=0 -DHAVE_SSE=0 -DNAME=\"MGA-K6\" -DCONFIG_MGA -TOOLS/fastmem-mga-k7$(EXESUF): CFLAGS += -DHAVE_MMX=1 -DHAVE_AMD3DNOW=1 -DHAVE_MMX2=1 -DHAVE_SSE=0 -DNAME=\"MGA-K7\" -DCONFIG_MGA -TOOLS/fastmem-mga-sse$(EXESUF): CFLAGS += -DHAVE_MMX=1 -DHAVE_AMD3DNOW=0 -DHAVE_MMX2=1 -DHAVE_SSE=1 -DNAME=\"MGA-SSE\" -DCONFIG_MGA - -fastmemcpybench: $(addsuffix $(EXESUF),$(addprefix TOOLS/fastmem-,c mmx k6 k7 sse mga-mmx mga-k6 mga-k7 mga-sse)) - -TOOLS/fastmem-%$(EXESUF): TOOLS/fastmemcpybench.c libvo/aclib.c - $(CC) $(CFLAGS) -o $@ $^ - REAL_SRCS = $(wildcard TOOLS/realcodecs/*.c) REAL_TARGETS = $(REAL_SRCS:.c=.so.6.0) realcodecs: $(REAL_TARGETS) - -fastmemcpybench realcodecs: CFLAGS += -g +realcodecs: CFLAGS += -g %.so.6.0: %.o ld -shared -o $@ $< -ldl -lc Modified: trunk/TOOLS/fastmemcpybench.c ============================================================================== --- trunk/TOOLS/fastmemcpybench.c Tue Mar 10 03:21:49 2009 (r28928) +++ trunk/TOOLS/fastmemcpybench.c Tue Mar 10 11:05:09 2009 (r28929) @@ -7,8 +7,6 @@ * was not confirmed through testing. */ -/* According to Uoti this code is broken. */ - #include #include #include @@ -18,7 +16,92 @@ #include #include #include -#include "libvo/fastmemcpy.h" + +#include "config.h" +#include "cpudetect.h" + +#define BLOCK_SIZE 4096 +#define CONFUSION_FACTOR 0 + +#if HAVE_MMX +#define COMPILE_MMX +#endif + +#if HAVE_MMX2 +#define COMPILE_MMX2 +#endif + +#if HAVE_AMD3DNOW +#define COMPILE_AMD3DNOW +#endif + +#if HAVE_SSE +#define COMPILE_SSE +#endif + +#ifdef COMPILE_MMX +#undef RENAME +#undef HAVE_MMX +#undef HAVE_MMX2 +#undef HAVE_AMD3DNOW +#undef HAVE_SSE +#undef HAVE_SSE2 +#define HAVE_MMX 1 +#define HAVE_MMX2 0 +#define HAVE_AMD3DNOW 0 +#define HAVE_SSE 0 +#define HAVE_SSE2 0 +#define RENAME(a) a ## _MMX +#include "libvo/aclib_template.c" +#endif + +#ifdef COMPILE_MMX2 +#undef RENAME +#undef HAVE_MMX +#undef HAVE_MMX2 +#undef HAVE_AMD3DNOW +#undef HAVE_SSE +#undef HAVE_SSE2 +#define HAVE_MMX 1 +#define HAVE_MMX2 1 +#define HAVE_AMD3DNOW 0 +#define HAVE_SSE 0 +#define HAVE_SSE2 0 +#define RENAME(a) a ## _MMX2 +#include "libvo/aclib_template.c" +#endif + +#ifdef COMPILE_AMD3DNOW +#undef RENAME +#undef HAVE_MMX +#undef HAVE_MMX2 +#undef HAVE_AMD3DNOW +#undef HAVE_SSE +#undef HAVE_SSE2 +#define HAVE_MMX 1 +#define HAVE_MMX2 0 +#define HAVE_AMD3DNOW 1 +#define HAVE_SSE 0 +#define HAVE_SSE2 0 +#define RENAME(a) a ## _3DNow +#include "libvo/aclib_template.c" +#endif + +#ifdef COMPILE_SSE +#undef RENAME +#undef HAVE_MMX +#undef HAVE_MMX2 +#undef HAVE_AMD3DNOW +#undef HAVE_SSE +#undef HAVE_SSE2 +#define HAVE_MMX 1 +#define HAVE_MMX2 1 +#define HAVE_AMD3DNOW 0 +#define HAVE_SSE 1 +#define HAVE_SSE2 1 +#define RENAME(a) a ## _SSE +#include "libvo/aclib_template.c" +#endif //#define ARR_SIZE 100000 #define ARR_SIZE (1024*768*2) @@ -114,11 +197,60 @@ int main(void) t = GetTimer(); v1 = read_tsc(); for (i = 0; i < 100; i++) - fast_memcpy(marr1, marr2, ARR_SIZE - 16); + memcpy(marr1, marr2, ARR_SIZE - 16); v2 = read_tsc(); t = GetTimer() - t; // ARR_SIZE*100 / (1024*1024) / (t/1000000) = ARR_SIZE*95.36743 / t - printf(NAME ": CPU clocks=%llu = %dus (%5.3ffps) %5.1fMB/s\n", v2-v1, t, + printf("libc: CPU clocks=%llu = %dus (%5.3ffps) %5.1fMB/s\n", v2-v1, t, + 100000000.0f/(float)t, (float)ARR_SIZE*95.36743f/(float)t); + +#if HAVE_MMX + t = GetTimer(); + v1 = read_tsc(); + for (i = 0; i < 100; i++) + fast_memcpy_MMX(marr1, marr2, ARR_SIZE - 16); + v2 = read_tsc(); + t = GetTimer() - t; + // ARR_SIZE*100 / (1024*1024) / (t/1000000) = ARR_SIZE*95.36743 / t + printf("MMX: CPU clocks=%llu = %dus (%5.3ffps) %5.1fMB/s\n", v2-v1, t, 100000000.0f/(float)t, (float)ARR_SIZE*95.36743f/(float)t); +#endif + +#if HAVE_AMD3DNOW + t = GetTimer(); + v1 = read_tsc(); + for (i = 0; i < 100; i++) + fast_memcpy_3DNow(marr1, marr2, ARR_SIZE - 16); + v2 = read_tsc(); + t = GetTimer() - t; + // ARR_SIZE*100 / (1024*1024) / (t/1000000) = ARR_SIZE*95.36743 / t + printf("3DNow!: CPU clocks=%llu = %dus (%5.3ffps) %5.1fMB/s\n", v2-v1, t, + 100000000.0f/(float)t, (float)ARR_SIZE*95.36743f/(float)t); +#endif + +#if HAVE_MMX2 + t = GetTimer(); + v1 = read_tsc(); + for (i = 0; i < 100; i++) + fast_memcpy_MMX2(marr1, marr2, ARR_SIZE - 16); + v2 = read_tsc(); + t = GetTimer() - t; + // ARR_SIZE*100 / (1024*1024) / (t/1000000) = ARR_SIZE*95.36743 / t + printf("MMX2: CPU clocks=%llu = %dus (%5.3ffps) %5.1fMB/s\n", v2-v1, t, + 100000000.0f/(float)t, (float)ARR_SIZE*95.36743f/(float)t); +#endif + +#if HAVE_SSE + t = GetTimer(); + v1 = read_tsc(); + for (i = 0; i < 100; i++) + fast_memcpy_SSE(marr1, marr2, ARR_SIZE - 16); + v2 = read_tsc(); + t = GetTimer() - t; + // ARR_SIZE*100 / (1024*1024) / (t/1000000) = ARR_SIZE*95.36743 / t + printf("SSE: CPU clocks=%llu = %dus (%5.3ffps) %5.1fMB/s\n", v2-v1, t, + 100000000.0f/(float)t, (float)ARR_SIZE*95.36743f/(float)t); +#endif + return 0; } From Reimar.Doeffinger at gmx.de Tue Mar 10 11:48:11 2009 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Tue, 10 Mar 2009 11:48:11 +0100 Subject: [MPlayer-cvslog] r28929 - in trunk: Makefile TOOLS TOOLS/fastmem.sh TOOLS/fastmemcpybench.c In-Reply-To: <20090310100509.C3AAC3B24D@natsuki.mplayerhq.hu> References: <20090310100509.C3AAC3B24D@natsuki.mplayerhq.hu> Message-ID: <20090310104811.GA1046@1und1.de> On Tue, Mar 10, 2009 at 11:05:09AM +0100, diego wrote: > Author: diego > Date: Tue Mar 10 11:05:09 2009 > New Revision: 28929 > > Log: > Fix and restructure fastmemcpybench. It is now one binary that runs all > available memcpy variants and prints benchmark results about them. Great, and if you have one of the newest CPUs the C benchmark will probably show 3 GB/s and the following ones > 10 GB/s because only the first one operates on memory and the others only on cache. From subversion at mplayerhq.hu Tue Mar 10 21:16:17 2009 From: subversion at mplayerhq.hu (compn) Date: Tue, 10 Mar 2009 21:16:17 +0100 (CET) Subject: [MPlayer-cvslog] r28930 - trunk/etc/codecs.conf Message-ID: <20090310201617.1254F3B312@natsuki.mplayerhq.hu> Author: compn Date: Tue Mar 10 21:16:16 2009 New Revision: 28930 Log: sn40 decodes with ffodivx Modified: trunk/etc/codecs.conf Modified: trunk/etc/codecs.conf ============================================================================== --- trunk/etc/codecs.conf Tue Mar 10 11:05:09 2009 (r28929) +++ trunk/etc/codecs.conf Tue Mar 10 21:16:16 2009 (r28930) @@ -883,7 +883,7 @@ videocodec ffodivx fourcc FFDS fourcc DCOD,MVXM,EM4A,PM4V fourcc M4T3,DMK2,DIGI,INMC - fourcc EPHV + fourcc EPHV,SN40 driver ffmpeg dll mpeg4 ;opendivx out YV12,I420,IYUV @@ -934,7 +934,7 @@ videocodec xvid fourcc FFDS fourcc DCOD,MVXM,EM4A,PM4V fourcc M4T3,DMK2,DIGI,INMC - fourcc EPHV + fourcc EPHV,SN40 format 0x10000004 ; mpeg 4 es driver xvid out YV12 From subversion at mplayerhq.hu Wed Mar 11 00:23:01 2009 From: subversion at mplayerhq.hu (compn) Date: Wed, 11 Mar 2009 00:23:01 +0100 (CET) Subject: [MPlayer-cvslog] r28931 - trunk/etc/codecs.conf Message-ID: <20090310232301.D56BE3B195@natsuki.mplayerhq.hu> Author: compn Date: Wed Mar 11 00:23:01 2009 New Revision: 28931 Log: add sn40 binary codec Modified: trunk/etc/codecs.conf Modified: trunk/etc/codecs.conf ============================================================================== --- trunk/etc/codecs.conf Tue Mar 10 21:16:16 2009 (r28930) +++ trunk/etc/codecs.conf Wed Mar 11 00:23:01 2009 (r28931) @@ -525,6 +525,15 @@ videocodec theora ;WIN32: +videocodec smartsight + info "Verint Video Manager" + status working + fourcc SN40 + fourcc SN41,SJPG ; untested + driver vfw + dll "SN4Codec.dll" + out BGR24 flip + videocodec msuscls info "MSU Screen Capture Lossless Codec" status working From subversion at mplayerhq.hu Wed Mar 11 01:25:24 2009 From: subversion at mplayerhq.hu (diego) Date: Wed, 11 Mar 2009 01:25:24 +0100 (CET) Subject: [MPlayer-cvslog] r28932 - trunk/AUTHORS Message-ID: <20090311002524.45A873B363@natsuki.mplayerhq.hu> Author: diego Date: Wed Mar 11 01:25:23 2009 New Revision: 28932 Log: Update email address for Vajna, Mikl?s. Modified: trunk/AUTHORS Modified: trunk/AUTHORS ============================================================================== --- trunk/AUTHORS Wed Mar 11 00:23:01 2009 (r28931) +++ trunk/AUTHORS Wed Mar 11 01:25:23 2009 (r28932) @@ -808,7 +808,7 @@ Ulion Urpala, Uoti (uau) * A/V sync fixes -Vajna, Mikl?s (VMiklos) +Vajna, Mikl?s (VMiklos) * TOOLS/divx2svcd author * TOOLS/ directory documentation From diego at biurrun.de Wed Mar 11 13:45:02 2009 From: diego at biurrun.de (Diego Biurrun) Date: Wed, 11 Mar 2009 13:45:02 +0100 Subject: [MPlayer-cvslog] r28929 - in trunk: Makefile TOOLS TOOLS/fastmem.sh TOOLS/fastmemcpybench.c In-Reply-To: <20090310104811.GA1046@1und1.de> References: <20090310100509.C3AAC3B24D@natsuki.mplayerhq.hu> <20090310104811.GA1046@1und1.de> Message-ID: <20090311124502.GG2027@biurrun.de> On Tue, Mar 10, 2009 at 11:48:11AM +0100, Reimar D?ffinger wrote: > On Tue, Mar 10, 2009 at 11:05:09AM +0100, diego wrote: > > > > Log: > > Fix and restructure fastmemcpybench. It is now one binary that runs all > > available memcpy variants and prints benchmark results about them. > > Great, and if you have one of the newest CPUs the C benchmark will > probably show 3 GB/s and the following ones > 10 GB/s because only the > first one operates on memory and the others only on cache. What do you suggest? Diego From Reimar.Doeffinger at gmx.de Wed Mar 11 14:14:34 2009 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Wed, 11 Mar 2009 14:14:34 +0100 Subject: [MPlayer-cvslog] r28929 - in trunk: Makefile TOOLS TOOLS/fastmem.sh TOOLS/fastmemcpybench.c In-Reply-To: <20090311124502.GG2027@biurrun.de> References: <20090310100509.C3AAC3B24D@natsuki.mplayerhq.hu> <20090310104811.GA1046@1und1.de> <20090311124502.GG2027@biurrun.de> Message-ID: <20090311131434.GA27324@1und1.de> On Wed, Mar 11, 2009 at 01:45:02PM +0100, Diego Biurrun wrote: > On Tue, Mar 10, 2009 at 11:48:11AM +0100, Reimar D?ffinger wrote: > > On Tue, Mar 10, 2009 at 11:05:09AM +0100, diego wrote: > > > > > > Log: > > > Fix and restructure fastmemcpybench. It is now one binary that runs all > > > available memcpy variants and prints benchmark results about them. > > > > Great, and if you have one of the newest CPUs the C benchmark will > > probably show 3 GB/s and the following ones > 10 GB/s because only the > > first one operates on memory and the others only on cache. > > What do you suggest? The only really reliable way to avoid it is to use separate binaries and powerdown between each two runs. Selecting which variant to run via a commandline-option should be mostly as good, too. Running them in a loop for a few times would at least allow to detect the issue. From subversion at mplayerhq.hu Wed Mar 11 21:15:16 2009 From: subversion at mplayerhq.hu (sdrik) Date: Wed, 11 Mar 2009 21:15:16 +0100 (CET) Subject: [MPlayer-cvslog] [propchange]: r28933 - svn:log Message-ID: <20090311201516.48E153B343@natsuki.mplayerhq.hu> Author: sdrik Revision: 28933 Property Name: svn:log Action: modified Property diff: --- old property value +++ new property value @@ -1 +1,2 @@ -In initMMX2HScaler, when chrDstW is not divisible by 4, the last filterPos element is initialized on the wrong index (not evenly aligned). This fixes it \ No newline at end of file +In initMMX2HScaler, when chrDstW is not divisible by 4, the last filterPos +element is initialized on the wrong index (not evenly aligned). This fixes it. From subversion at mplayerhq.hu Wed Mar 11 23:55:23 2009 From: subversion at mplayerhq.hu (greg) Date: Wed, 11 Mar 2009 23:55:23 +0100 (CET) Subject: [MPlayer-cvslog] r28935 - trunk/libass/ass.c Message-ID: <20090311225523.E84044E011@natsuki.mplayerhq.hu> Author: greg Date: Wed Mar 11 23:55:23 2009 New Revision: 28935 Log: Use ScaledBorderAndShadow: yes by default. Modified: trunk/libass/ass.c Modified: trunk/libass/ass.c ============================================================================== --- trunk/libass/ass.c Wed Mar 11 15:44:22 2009 (r28934) +++ trunk/libass/ass.c Wed Mar 11 23:55:23 2009 (r28935) @@ -1128,6 +1128,7 @@ long long ass_step_sub(ass_track_t* trac ass_track_t* ass_new_track(ass_library_t* library) { ass_track_t* track = calloc(1, sizeof(ass_track_t)); track->library = library; + track->ScaledBorderAndShadow = 1; track->parser_priv = calloc(1, sizeof(parser_priv_t)); return track; } From subversion at mplayerhq.hu Thu Mar 12 11:50:22 2009 From: subversion at mplayerhq.hu (diego) Date: Thu, 12 Mar 2009 11:50:22 +0100 (CET) Subject: [MPlayer-cvslog] r28936 - in trunk: cpudetect.c cpudetect.h Message-ID: <20090312105022.8D7C73B22E@natsuki.mplayerhq.hu> Author: diego Date: Thu Mar 12 11:50:21 2009 New Revision: 28936 Log: SSE3 support patch by Zhou Zongyi, zhouzongyi pset.suntec net Modified: trunk/cpudetect.c trunk/cpudetect.h Modified: trunk/cpudetect.c ============================================================================== --- trunk/cpudetect.c Wed Mar 11 23:55:23 2009 (r28935) +++ trunk/cpudetect.c Thu Mar 12 11:50:21 2009 (r28936) @@ -143,6 +143,7 @@ void GetCpuCaps( CpuCaps *caps) caps->hasMMX = (regs2[3] & (1 << 23 )) >> 23; // 0x0800000 caps->hasSSE = (regs2[3] & (1 << 25 )) >> 25; // 0x2000000 caps->hasSSE2 = (regs2[3] & (1 << 26 )) >> 26; // 0x4000000 + caps->hasSSE3 = (regs2[2] & 1); // 0x0000001 caps->hasSSSE3 = (regs2[2] & (1 << 9 )) >> 9; // 0x0000200 caps->hasMMX2 = caps->hasSSE; // SSE cpus supports mmxext too cl_size = ((regs2[1] >> 8) & 0xFF)*8; @@ -458,6 +459,7 @@ void GetCpuCaps( CpuCaps *caps) caps->has3DNowExt=0; caps->hasSSE=0; caps->hasSSE2=0; + caps->hasSSE3=0; caps->hasSSSE3=0; caps->hasSSE4a=0; caps->isX86=0; Modified: trunk/cpudetect.h ============================================================================== --- trunk/cpudetect.h Wed Mar 11 23:55:23 2009 (r28935) +++ trunk/cpudetect.h Thu Mar 12 11:50:21 2009 (r28936) @@ -46,6 +46,7 @@ typedef struct cpucaps_s { int has3DNowExt; int hasSSE; int hasSSE2; + int hasSSE3; int hasSSSE3; int hasSSE4a; int isX86; From subversion at mplayerhq.hu Thu Mar 12 12:16:53 2009 From: subversion at mplayerhq.hu (compn) Date: Thu, 12 Mar 2009 12:16:53 +0100 (CET) Subject: [MPlayer-cvslog] r28937 - trunk/DOCS/tech/win32-codec-howto.txt Message-ID: <20090312111653.730A93B20C@natsuki.mplayerhq.hu> Author: compn Date: Thu Mar 12 12:16:51 2009 New Revision: 28937 Log: add some info for acm and tips for searching Modified: trunk/DOCS/tech/win32-codec-howto.txt Modified: trunk/DOCS/tech/win32-codec-howto.txt ============================================================================== --- trunk/DOCS/tech/win32-codec-howto.txt Thu Mar 12 11:50:21 2009 (r28936) +++ trunk/DOCS/tech/win32-codec-howto.txt Thu Mar 12 12:16:51 2009 (r28937) @@ -25,17 +25,36 @@ Cannot find codec matching selected -vo It means your AVI is encoded with a codec which has the HFYU fourcc (HFYU = HuffYUV codec, DIV3 = DivX Low Motion, etc.). Now that you know this, you -have to find out which DLL Windows loads in order to play this file. In our -case, the 'system.ini' contains this information in a line that reads: +have to find out which DLL Windows loads in order to play this file. +You can find the vfw codec by searching the internet for e.g. VIDC.HFYU. + +In our case, the 'system.ini' also contains this information in a line that reads: VIDC.HFYU=huffyuv.dll -So you need the 'huffyuv.dll' file. Note that the audio codecs are -specified by the MSACM prefix: +So you need the 'huffyuv.dll' file. + + + +ACM Codecs: +~~~~~~~~~~~~ +MPlayer may fail at playing the audio in your file with this message: + +Cannot find codec for audio format 0x55. +Read DOCS/HTML/en/codecs.html! +Audio: no sound + +MPlayer calls this the TwoCC format identifier. From the TwoCC list we find: + +0x0055 MPEG-1 Layer 3 (MP3) + +If you are lucky, you can then just search the internet for "codec acm" +e.g. "mp3 acm". Or if the codec is already installed on Windows, +it will show up in the system.ini as: msacm.l3acm=L3codeca.acm -This is the MP3 codec. +Note that the audio codecs are specified by the MSACM prefix: @@ -86,3 +105,15 @@ Take a deep breath and start searching t If searching fails, try enabling all the checkboxes. You may have false hits, but you may get lucky... + + + +Tips: +~~~~~~~ +If you get an error loading a new codec, it may need some more files to work. +Start the filemon utility before loading MPlayer to find out which dlls are +trying to be loaded. + +Your codec may load some external .dll libraries. If the codec is already +installed in Windows, run listdlls wmplayer.exe while Windows Media +Player is playing your file to find out which. From subversion at mplayerhq.hu Thu Mar 12 12:22:33 2009 From: subversion at mplayerhq.hu (compn) Date: Thu, 12 Mar 2009 12:22:33 +0100 (CET) Subject: [MPlayer-cvslog] [propchange]: r28931 - svn:log Message-ID: <20090312112233.2D5F63B22E@natsuki.mplayerhq.hu> Author: compn Revision: 28931 Property Name: svn:log Action: modified Property diff: --- old property value +++ new property value @@ -1 +1,2 @@ -add sn40 binary codec \ No newline at end of file +add sn40 binary codec +patch by Brian Victor From subversion at mplayerhq.hu Thu Mar 12 12:56:10 2009 From: subversion at mplayerhq.hu (diego) Date: Thu, 12 Mar 2009 12:56:10 +0100 (CET) Subject: [MPlayer-cvslog] r28938 - trunk/TOOLS/fastmemcpybench.c Message-ID: <20090312115613.89CD93B1F9@natsuki.mplayerhq.hu> Author: diego Date: Thu Mar 12 12:55:26 2009 New Revision: 28938 Log: Replace duplicated code by a macro. Modified: trunk/TOOLS/fastmemcpybench.c Modified: trunk/TOOLS/fastmemcpybench.c ============================================================================== --- trunk/TOOLS/fastmemcpybench.c Thu Mar 12 12:16:51 2009 (r28937) +++ trunk/TOOLS/fastmemcpybench.c Thu Mar 12 12:55:26 2009 (r28938) @@ -194,62 +194,33 @@ int main(void) for (i = 0; i < ARR_SIZE - 16; i++) marr1[i] = marr2[i] = i; - t = GetTimer(); - v1 = read_tsc(); - for (i = 0; i < 100; i++) - memcpy(marr1, marr2, ARR_SIZE - 16); - v2 = read_tsc(); - t = GetTimer() - t; - // ARR_SIZE*100 / (1024*1024) / (t/1000000) = ARR_SIZE*95.36743 / t - printf("libc: CPU clocks=%llu = %dus (%5.3ffps) %5.1fMB/s\n", v2-v1, t, - 100000000.0f/(float)t, (float)ARR_SIZE*95.36743f/(float)t); +#define testblock(func, name) \ + t = GetTimer(); \ + v1 = read_tsc(); \ + for (i = 0; i < 100; i++) \ + func(marr1, marr2, ARR_SIZE - 16); \ + v2 = read_tsc(); \ + t = GetTimer() - t; \ + /* ARR_SIZE*100 / (1024*1024) / (t/1000000) = ARR_SIZE*95.36743 / t */ \ + printf(name "CPU clocks=%llu = %dus (%5.3ffps) %5.1fMB/s\n", v2-v1, t, \ + 100000000.0f / (float)t, (float)ARR_SIZE*95.36743f / (float)t); + + testblock(memcpy, "libc: "); #if HAVE_MMX - t = GetTimer(); - v1 = read_tsc(); - for (i = 0; i < 100; i++) - fast_memcpy_MMX(marr1, marr2, ARR_SIZE - 16); - v2 = read_tsc(); - t = GetTimer() - t; - // ARR_SIZE*100 / (1024*1024) / (t/1000000) = ARR_SIZE*95.36743 / t - printf("MMX: CPU clocks=%llu = %dus (%5.3ffps) %5.1fMB/s\n", v2-v1, t, - 100000000.0f/(float)t, (float)ARR_SIZE*95.36743f/(float)t); + testblock(fast_memcpy_MMX, "MMX: "); #endif #if HAVE_AMD3DNOW - t = GetTimer(); - v1 = read_tsc(); - for (i = 0; i < 100; i++) - fast_memcpy_3DNow(marr1, marr2, ARR_SIZE - 16); - v2 = read_tsc(); - t = GetTimer() - t; - // ARR_SIZE*100 / (1024*1024) / (t/1000000) = ARR_SIZE*95.36743 / t - printf("3DNow!: CPU clocks=%llu = %dus (%5.3ffps) %5.1fMB/s\n", v2-v1, t, - 100000000.0f/(float)t, (float)ARR_SIZE*95.36743f/(float)t); + testblock(fast_memcpy_3DNow, "3DNow!: "); #endif #if HAVE_MMX2 - t = GetTimer(); - v1 = read_tsc(); - for (i = 0; i < 100; i++) - fast_memcpy_MMX2(marr1, marr2, ARR_SIZE - 16); - v2 = read_tsc(); - t = GetTimer() - t; - // ARR_SIZE*100 / (1024*1024) / (t/1000000) = ARR_SIZE*95.36743 / t - printf("MMX2: CPU clocks=%llu = %dus (%5.3ffps) %5.1fMB/s\n", v2-v1, t, - 100000000.0f/(float)t, (float)ARR_SIZE*95.36743f/(float)t); + testblock(fast_memcpy_MMX2, "MMX2: "); #endif #if HAVE_SSE - t = GetTimer(); - v1 = read_tsc(); - for (i = 0; i < 100; i++) - fast_memcpy_SSE(marr1, marr2, ARR_SIZE - 16); - v2 = read_tsc(); - t = GetTimer() - t; - // ARR_SIZE*100 / (1024*1024) / (t/1000000) = ARR_SIZE*95.36743 / t - printf("SSE: CPU clocks=%llu = %dus (%5.3ffps) %5.1fMB/s\n", v2-v1, t, - 100000000.0f/(float)t, (float)ARR_SIZE*95.36743f/(float)t); + testblock(fast_memcpy_SSE, "SSE: "); #endif return 0; From subversion at mplayerhq.hu Fri Mar 13 17:42:43 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 13 Mar 2009 17:42:43 +0100 (CET) Subject: [MPlayer-cvslog] r28939 - trunk/configure Message-ID: <20090313164243.4FF4850014@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 13 17:42:42 2009 New Revision: 28939 Log: Fix compilation with --charset=noconv Modified: trunk/configure Modified: trunk/configure ============================================================================== --- trunk/configure Thu Mar 12 12:55:26 2009 (r28938) +++ trunk/configure Fri Mar 13 17:42:42 2009 (r28939) @@ -7768,13 +7768,11 @@ fi #if test "$_gui" # --------------- GUI specific tests end ------------------- -if test "$_charset" = "noconv" ; then - _charset="" -fi -if test "$_charset" ; then +if test "$_charset" != "noconv" ; then def_charset="#define MSG_CHARSET \"$_charset\"" else def_charset="#undef MSG_CHARSET" + _charset="UTF-8" fi if test -n "$_charset" && test "$_charset" != "UTF-8" ; then From subversion at mplayerhq.hu Fri Mar 13 18:02:15 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 13 Mar 2009 18:02:15 +0100 (CET) Subject: [MPlayer-cvslog] r28940 - in trunk/libmpcodecs: vf_decimate.c vf_divtc.c Message-ID: <20090313170215.594CA3B49C@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 13 18:02:15 2009 New Revision: 28940 Log: Add missing ecx clobber in diff_MMX code (yes, that function is duplicated). Modified: trunk/libmpcodecs/vf_decimate.c trunk/libmpcodecs/vf_divtc.c Modified: trunk/libmpcodecs/vf_decimate.c ============================================================================== --- trunk/libmpcodecs/vf_decimate.c Fri Mar 13 17:42:42 2009 (r28939) +++ trunk/libmpcodecs/vf_decimate.c Fri Mar 13 18:02:15 2009 (r28940) @@ -55,7 +55,7 @@ static int diff_MMX(unsigned char *old, "emms \n\t" : : "S" (old), "D" (new), "a" ((long)os), "b" ((long)ns), "d" (out) - : "memory" + : "%ecx", "memory" ); return out[0]+out[1]+out[2]+out[3]; } Modified: trunk/libmpcodecs/vf_divtc.c ============================================================================== --- trunk/libmpcodecs/vf_divtc.c Fri Mar 13 17:42:42 2009 (r28939) +++ trunk/libmpcodecs/vf_divtc.c Fri Mar 13 18:02:15 2009 (r28940) @@ -69,7 +69,7 @@ static int diff_MMX(unsigned char *old, "emms \n\t" : : "S" (old), "D" (new), "a" ((long)os), "b" ((long)ns), "d" (out) - : "memory" + : "%ecx", "memory" ); return out[0]+out[1]+out[2]+out[3]; } From subversion at mplayerhq.hu Fri Mar 13 18:09:39 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 13 Mar 2009 18:09:39 +0100 (CET) Subject: [MPlayer-cvslog] r28941 - trunk/libmpcodecs/vf_divtc.c Message-ID: <20090313170939.A52FF5400C@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 13 18:09:39 2009 New Revision: 28941 Log: Use the same code as in vf_decimate to select diff_MMX Modified: trunk/libmpcodecs/vf_divtc.c Modified: trunk/libmpcodecs/vf_divtc.c ============================================================================== --- trunk/libmpcodecs/vf_divtc.c Fri Mar 13 18:02:15 2009 (r28940) +++ trunk/libmpcodecs/vf_divtc.c Fri Mar 13 18:09:39 2009 (r28941) @@ -682,11 +682,10 @@ static int open(vf_instance_t *vf, char* if(!(p->history=calloc(sizeof *p->history, p->window))) goto nomem; - diff= + diff = diff_C; #if HAVE_MMX - gCpuCaps.hasMMX?diff_MMX: + if(gCpuCaps.hasMMX) diff = diff_MMX; #endif - diff_C; free(args); return 1; From subversion at mplayerhq.hu Fri Mar 13 18:12:40 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 13 Mar 2009 18:12:40 +0100 (CET) Subject: [MPlayer-cvslog] r28942 - in trunk/libmpcodecs: vf_decimate.c vf_divtc.c Message-ID: <20090313171240.890423B4A2@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 13 18:12:40 2009 New Revision: 28942 Log: Check for HAVE_EBX_AVAILABLE before enabling MMX code that needs the EBX register. Makes things a bit simpler for everyone who insists on compiling MPlayer as PIE-code. Modified: trunk/libmpcodecs/vf_decimate.c trunk/libmpcodecs/vf_divtc.c Modified: trunk/libmpcodecs/vf_decimate.c ============================================================================== --- trunk/libmpcodecs/vf_decimate.c Fri Mar 13 18:09:39 2009 (r28941) +++ trunk/libmpcodecs/vf_decimate.c Fri Mar 13 18:12:40 2009 (r28942) @@ -19,7 +19,7 @@ struct vf_priv_s { int max, last, cnt; }; -#if HAVE_MMX +#if HAVE_MMX && HAVE_EBX_AVAILABLE static int diff_MMX(unsigned char *old, unsigned char *new, int os, int ns) { volatile short out[4]; @@ -164,7 +164,7 @@ static int open(vf_instance_t *vf, char* p->frac = 0.33; if (args) sscanf(args, "%d:%d:%d:%f", &p->max, &p->hi, &p->lo, &p->frac); diff = diff_C; -#if HAVE_MMX +#if HAVE_MMX && HAVE_EBX_AVAILABLE if(gCpuCaps.hasMMX) diff = diff_MMX; #endif return 1; Modified: trunk/libmpcodecs/vf_divtc.c ============================================================================== --- trunk/libmpcodecs/vf_divtc.c Fri Mar 13 18:09:39 2009 (r28941) +++ trunk/libmpcodecs/vf_divtc.c Fri Mar 13 18:12:40 2009 (r28942) @@ -33,7 +33,7 @@ struct vf_priv_s * diff_MMX and diff_C stolen from vf_decimate.c */ -#if HAVE_MMX +#if HAVE_MMX && HAVE_EBX_AVAILABLE static int diff_MMX(unsigned char *old, unsigned char *new, int os, int ns) { volatile short out[4]; @@ -683,7 +683,7 @@ static int open(vf_instance_t *vf, char* goto nomem; diff = diff_C; -#if HAVE_MMX +#if HAVE_MMX && HAVE_EBX_AVAILABLE if(gCpuCaps.hasMMX) diff = diff_MMX; #endif From subversion at mplayerhq.hu Sat Mar 14 16:56:16 2009 From: subversion at mplayerhq.hu (diego) Date: Sat, 14 Mar 2009 16:56:16 +0100 (CET) Subject: [MPlayer-cvslog] r28945 - trunk/Makefile Message-ID: <20090314155616.E881F3B42B@natsuki.mplayerhq.hu> Author: diego Date: Sat Mar 14 16:56:16 2009 New Revision: 28945 Log: Only compile fastmemcpybench on x86. Modified: trunk/Makefile Modified: trunk/Makefile ============================================================================== --- trunk/Makefile Sat Mar 14 13:32:28 2009 (r28944) +++ trunk/Makefile Sat Mar 14 16:56:16 2009 (r28945) @@ -986,10 +986,10 @@ tests: $(addsuffix $(EXESUF),$(TESTS)) testsclean: -rm -f $(foreach file,$(TESTS),$(call ADD_ALL_EXESUFS,$(file))) -TOOLS = $(addprefix TOOLS/,alaw-gen asfinfo avi-fix avisubdump compare dump_mp4 fastmemcpybench movinfo netstream subrip vivodump) +TOOLS = $(addprefix TOOLS/,alaw-gen asfinfo avi-fix avisubdump compare dump_mp4 movinfo netstream subrip vivodump) ifdef ARCH_X86 -TOOLS += TOOLS/modify_reg +TOOLS += TOOLS/fastmemcpybench TOOLS/modify_reg endif ALLTOOLS = $(TOOLS) TOOLS/bmovl-test TOOLS/vfw2menc From subversion at mplayerhq.hu Sat Mar 14 17:00:21 2009 From: subversion at mplayerhq.hu (diego) Date: Sat, 14 Mar 2009 17:00:21 +0100 (CET) Subject: [MPlayer-cvslog] r28946 - trunk/configure Message-ID: <20090314160022.0A7C03B42B@natsuki.mplayerhq.hu> Author: diego Date: Sat Mar 14 17:00:21 2009 New Revision: 28946 Log: Add /usr/X11R7 to the list of directories in which to search for X11 includes and libraries. patch by Bernd Ernesti, mplayer-dev-eng lists veego.de Modified: trunk/configure Modified: trunk/configure ============================================================================== --- trunk/configure Sat Mar 14 16:56:16 2009 (r28945) +++ trunk/configure Sat Mar 14 17:00:21 2009 (r28946) @@ -4150,7 +4150,8 @@ echocheck "X11 headers presence" fi done if test $_cross_compile = no; then - for I in /usr/X11/include /usr/X11R6/include /usr/include/X11R6 /usr/openwin/include ; do + for I in /usr/X11/include /usr/X11R7/include /usr/X11R6/include \ + /usr/include/X11R6 /usr/openwin/include ; do if test -f "$I/X11/Xlib.h" ; then _inc_extra="$_inc_extra -I$I" _x11_headers="yes" @@ -4169,8 +4170,9 @@ if test "$_x11" = auto && test "$_x11_he #include int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; } EOF - for I in "" -L/usr/X11R6/lib -L/usr/lib/X11R6 -L/usr/X11/lib \ - -L/usr/lib32 -L/usr/openwin/lib -L/usr/X11R6/lib64 -L/usr/lib ; do + for I in "" -L/usr/X11R7/lib -L/usr/X11R6/lib -L/usr/lib/X11R6 \ + -L/usr/X11/lib -L/usr/lib32 -L/usr/openwin/lib -L/usr/X11R6/lib64 \ + -L/usr/lib ; do if netbsd; then _ld_tmp="$I -lXext -lX11 $_ld_pthread -Wl,-R`echo $I | sed s/^-L//`" else From subversion at mplayerhq.hu Sat Mar 14 17:58:23 2009 From: subversion at mplayerhq.hu (diego) Date: Sat, 14 Mar 2009 17:58:23 +0100 (CET) Subject: [MPlayer-cvslog] r28948 - trunk/DOCS/tech/codecs-in.html Message-ID: <20090314165823.3F3B73B4C8@natsuki.mplayerhq.hu> Author: diego Date: Sat Mar 14 17:58:22 2009 New Revision: 28948 Log: Give table headings more meaningful names. Modified: trunk/DOCS/tech/codecs-in.html Modified: trunk/DOCS/tech/codecs-in.html ============================================================================== --- trunk/DOCS/tech/codecs-in.html Sat Mar 14 17:43:10 2009 (r28947) +++ trunk/DOCS/tech/codecs-in.html Sat Mar 14 17:58:22 2009 (r28948) @@ -31,7 +31,7 @@ - + @@ -51,8 +51,8 @@ - - + + @@ -69,8 +69,8 @@ - - + + @@ -87,8 +87,8 @@ - - + + @@ -111,7 +111,7 @@ - + @@ -129,8 +129,8 @@ - - + + @@ -147,8 +147,8 @@ - - + + @@ -165,8 +165,8 @@ - - + + From subversion at mplayerhq.hu Sat Mar 14 18:01:28 2009 From: subversion at mplayerhq.hu (diego) Date: Sat, 14 Mar 2009 18:01:28 +0100 (CET) Subject: [MPlayer-cvslog] r28949 - trunk/DOCS/tech/codecs-in.html Message-ID: <20090314170128.516333B4C9@natsuki.mplayerhq.hu> Author: diego Date: Sat Mar 14 18:01:28 2009 New Revision: 28949 Log: Move page heading and table of contents out of the codec support table. Modified: trunk/DOCS/tech/codecs-in.html Modified: trunk/DOCS/tech/codecs-in.html ============================================================================== --- trunk/DOCS/tech/codecs-in.html Sat Mar 14 17:58:22 2009 (r28948) +++ trunk/DOCS/tech/codecs-in.html Sat Mar 14 18:01:28 2009 (r28949) @@ -6,19 +6,15 @@ -
    codec name fourcccodecfiledriver name out comments
    codec name fourcccodecfileproblemdriver namecomments
    codec name fourcccodecfileproblemdriver namecomments
    codec name fourcccodecfileproblemdriver namecomments
    codec name formatcodecfiledriver name comments
    codec name formatcodecfileproblemdriver namecomments
    codec name formatcodecfileproblemdriver namecomments
    codec name formatcodecfileproblemdriver namecomments
    - - - - - - +

    Status of codecs support

    + + + +
    -

     

    -

    Status of codecs support

    -
    -

    Video codecs
    Audio codecs

    -
    Video codecs:

    From diego at biurrun.de Sat Mar 14 18:54:02 2009 From: diego at biurrun.de (Diego Biurrun) Date: Sat, 14 Mar 2009 18:54:02 +0100 Subject: [MPlayer-cvslog] r28680 - trunk/libvo/vo_xvmc.c In-Reply-To: <20090224142543.GA28697@biurrun.de> References: <20090220234624.F0FC53B21B@natsuki.mplayerhq.hu> <20090224142543.GA28697@biurrun.de> Message-ID: <20090314175402.GJ4019@biurrun.de> On Tue, Feb 24, 2009 at 03:25:43PM +0100, Diego Biurrun wrote: > On Sat, Feb 21, 2009 at 12:46:24AM +0100, iive wrote: > > > > Log: > > Turn all remaining printf() into mp_msg(). > > Try to set appropriate levels for them. > > > > --- trunk/libvo/vo_xvmc.c Sat Feb 21 00:18:28 2009 (r28679) > > +++ trunk/libvo/vo_xvmc.c Sat Feb 21 00:46:24 2009 (r28680) > > @@ -226,58 +226,59 @@ return -1;//fail > > //print all info needed to add new format > > static void print_xvimage_format_values(XvImageFormatValues *xifv){ > > int i; > > + const msgl=MSGL_DBG4; > > > > - printf("Format_ID = 0x%X\n",xifv->id); > > + mp_msg(MSGT_VO,msgl,"Format_ID = 0x%X\n",xifv->id); > > This looks rather weird to me and generates the following warning: > > libvo/vo_xvmc.c: In function 'print_xvimage_format_values': > libvo/vo_xvmc.c:229: warning: type defaults to 'int' in declaration of 'msgl' Here is a patch that just uses search and replace to fix this. An alternative would be a #define, but I don't really see a need for indirection here. Diego -------------- next part -------------- A non-text attachment was scrubbed... Name: xvmc_dgb4.diff Type: text/x-diff Size: 5098 bytes Desc: not available URL: From subversion at mplayerhq.hu Sat Mar 14 19:44:58 2009 From: subversion at mplayerhq.hu (diego) Date: Sat, 14 Mar 2009 19:44:58 +0100 (CET) Subject: [MPlayer-cvslog] r28950 - in trunk: Changelog DOCS/man/en/mplayer.1 Makefile configure libvo/video_out.c libvo/vo_kva.c Message-ID: <20090314184459.5FA833B416@natsuki.mplayerhq.hu> Author: diego Date: Sat Mar 14 19:44:58 2009 New Revision: 28950 Log: KVA vo driver for OS/2, patch by KO Myung-Hun, komh chollian net Added: trunk/libvo/vo_kva.c Modified: trunk/Changelog trunk/Makefile trunk/configure trunk/libvo/video_out.c Changes in other areas also in this revision: Modified: trunk/DOCS/man/en/mplayer.1 Modified: trunk/Changelog ============================================================================== --- trunk/Changelog Sat Mar 14 18:01:28 2009 (r28949) +++ trunk/Changelog Sat Mar 14 19:44:58 2009 (r28950) @@ -148,6 +148,7 @@ MPlayer (1.0) * removed unnecessary code from vo x11, xv, xvmc * add OS/2 DART audio driver (-ao dart) * add VDPAU video output + * add OS/2 KVA video driver (-vo kva) MEncoder: * check for system-wide configuration file in MEncoder Modified: trunk/Makefile ============================================================================== --- trunk/Makefile Sat Mar 14 18:01:28 2009 (r28949) +++ trunk/Makefile Sat Mar 14 19:44:58 2009 (r28950) @@ -596,6 +596,7 @@ SRCS_MPLAYER-$(IVTV) += libao2/a SRCS_MPLAYER-$(JACK) += libao2/ao_jack.c SRCS_MPLAYER-$(JOYSTICK) += input/joystick.c SRCS_MPLAYER-$(JPEG) += libvo/vo_jpeg.c +SRCS_MPLAYER-$(KVA) += libvo/vo_kva.c SRCS_MPLAYER-$(LIBMENU) += libmenu/menu.c \ libmenu/menu_chapsel.c \ libmenu/menu_cmdlist.c \ Modified: trunk/configure ============================================================================== --- trunk/configure Sat Mar 14 18:01:28 2009 (r28949) +++ trunk/configure Sat Mar 14 19:44:58 2009 (r28950) @@ -366,6 +366,7 @@ Video output: --enable-vesa enable VESA video output [autodetect] --enable-svga enable SVGAlib video output [autodetect] --enable-sdl enable SDL video output [autodetect] + --enable-kva enable KVA video output [autodetect] --enable-aa enable AAlib video output [autodetect] --enable-caca enable CACA video output [autodetect] --enable-ggi enable GGI video output [autodetect] @@ -556,6 +557,7 @@ _xv=auto _xvmc=no #auto when complete _vdpau=auto _sdl=auto +_kva=auto _direct3d=auto _directx=auto _win32waveout=auto @@ -888,6 +890,8 @@ for ac_option do --disable-vdpau) _vdpau=no ;; --enable-sdl) _sdl=yes ;; --disable-sdl) _sdl=no ;; + --enable-kva) _kva=yes ;; + --disable-kva) _kva=no ;; --enable-direct3d) _direct3d=yes ;; --disable-direct3d) _direct3d=no ;; --enable-directx) _directx=yes ;; @@ -5097,6 +5101,29 @@ fi echores "$_sdl" +if os2 ; then +echocheck "KVA (SNAP/WarpOverlay!/DIVE)" +if test "$_kva" = auto; then + cat > $TMPC << EOF +#include +#include +int main( void ) { return 0; } +EOF + _kva=no; + cc_check -lkva && _kva=yes +fi +if test "$_kva" = yes ; then + def_kva='#define CONFIG_KVA 1' + _libs_mplayer="$_libs_mplayer -lkva" + _vomodules="kva $_vomodules" +else + def_kva='#undef CONFIG_KVA' + _novomodules="kva $_novomodules" +fi +echores "$_kva" +fi #if os2 + + if win32; then echocheck "Windows waveout" @@ -8145,6 +8172,7 @@ IVTV = $_ivtv JACK = $_jack JOYSTICK = $_joystick JPEG = $_jpeg +KVA = $_kva LADSPA = $_ladspa LIBA52 = $_liba52 LIBA52_INTERNAL = $_liba52_internal @@ -8647,6 +8675,7 @@ $def_gl $def_gl_win32 $def_ivtv $def_jpeg +$def_kva $def_md5sum $def_mga $def_mng Modified: trunk/libvo/video_out.c ============================================================================== --- trunk/libvo/video_out.c Sat Mar 14 18:01:28 2009 (r28949) +++ trunk/libvo/video_out.c Sat Mar 14 19:44:58 2009 (r28950) @@ -112,6 +112,7 @@ extern vo_functions_t video_out_mpegpes; extern vo_functions_t video_out_yuv4mpeg; extern vo_functions_t video_out_direct3d; extern vo_functions_t video_out_directx; +extern vo_functions_t video_out_kva; extern vo_functions_t video_out_dxr2; extern vo_functions_t video_out_dxr3; extern vo_functions_t video_out_ivtv; @@ -146,6 +147,9 @@ const vo_functions_t* const video_out_dr #ifdef CONFIG_DIRECT3D &video_out_direct3d, #endif +#ifdef CONFIG_KVA + &video_out_kva, +#endif #ifdef CONFIG_COREVIDEO &video_out_macosx, #endif Added: trunk/libvo/vo_kva.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/libvo/vo_kva.c Sat Mar 14 19:44:58 2009 (r28950) @@ -0,0 +1,1087 @@ +/* + * OS/2 video output driver + * + * Copyright (c) 2007-2009 by KO Myung-Hun (komh at chollian.net) + * + * 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. + */ + +#define INCL_WIN +#define INCL_GPI +#define INCL_DOS +#include + +#include +#include + +#include +#include +#include +#include + +#include + +#include "config.h" +#include "mp_msg.h" +#include "help_mp.h" +#include "video_out.h" +#include "video_out_internal.h" +#include "aspect.h" + +#include "fastmemcpy.h" +#include "mp_fifo.h" +#include "osdep/keycodes.h" +#include "input/input.h" +#include "input/mouse.h" +#include "subopt-helper.h" +#include "sub.h" + +#include "cpudetect.h" +#include "libswscale/swscale.h" +#include "libmpcodecs/vf_scale.h" + +static const vo_info_t info = { + "SNAP/WarpOverlay!/DIVE video output", + "kva", + "KO Myung-Hun ", + "" +}; + +LIBVO_EXTERN(kva) + +#define WC_MPLAYER "WC_MPLAYER" + +#define SRC_WIDTH m_int.kvas.szlSrcSize.cx +#define SRC_HEIGHT m_int.kvas.szlSrcSize.cy + +#define HWNDFROMWINID(wid) ((wid) + 0x80000000UL) + +static const struct keymap m_vk_map[] = { + {VK_NEWLINE, KEY_ENTER}, {VK_TAB, KEY_TAB}, {VK_SPACE, ' '}, + + // control keys + {VK_CTRL, KEY_CTRL}, {VK_BACKSPACE, KEY_BS}, + {VK_DELETE, KEY_DELETE}, {VK_INSERT, KEY_INSERT}, + {VK_HOME, KEY_HOME}, {VK_END, KEY_END}, + {VK_PAGEUP, KEY_PAGE_UP}, {VK_PAGEDOWN, KEY_PAGE_DOWN}, + {VK_ESC, KEY_ESC}, + + // cursor keys + {VK_RIGHT, KEY_RIGHT}, {VK_LEFT, KEY_LEFT}, + {VK_DOWN, KEY_DOWN}, {VK_UP, KEY_UP}, + + // function keys + {VK_F1, KEY_F+1}, {VK_F2, KEY_F+2}, {VK_F3, KEY_F+3}, {VK_F4, KEY_F+4}, + {VK_F5, KEY_F+5}, {VK_F6, KEY_F+6}, {VK_F7, KEY_F+7}, {VK_F8, KEY_F+8}, + {VK_F9, KEY_F+9}, {VK_F10, KEY_F+10}, {VK_F11, KEY_F+11}, {VK_F12, KEY_F+12}, + + {0, 0} +}; + +static const struct keymap m_keypad_map[] = { + // keypad keys + {0x52, KEY_KP0}, {0x4F, KEY_KP1}, {0x50, KEY_KP2}, {0x51, KEY_KP3}, + {0x4B, KEY_KP4}, {0x4C, KEY_KP5}, {0x4D, KEY_KP6}, {0x47, KEY_KP7}, + {0x48, KEY_KP8}, {0x49, KEY_KP9}, {0x53, KEY_KPDEC}, {0x5A, KEY_KPENTER}, + + {0, 0} +}; + +static const struct keymap m_mouse_map[] = { + {WM_BUTTON1DOWN, MOUSE_BTN0}, + {WM_BUTTON3DOWN, MOUSE_BTN1}, + {WM_BUTTON2DOWN, MOUSE_BTN2}, + {WM_BUTTON1DBLCLK, MOUSE_BTN0_DBL}, + {WM_BUTTON3DBLCLK, MOUSE_BTN1_DBL}, + {WM_BUTTON2DBLCLK, MOUSE_BTN2_DBL}, + + {0, 0} +}; + +struct { + HAB hab; + HMQ hmq; + HWND hwndFrame; + HWND hwndClient; + HWND hwndSysMenu; + HWND hwndTitleBar; + HWND hwndMinMax; + FOURCC fcc; + int iImageFormat; + int nChromaShift; + KVASETUP kvas; + KVACAPS kvac; + RECTL rclDst; + int bpp; + LONG lStride; + PBYTE pbImage; + BOOL fFixT23; + PFNWP pfnwpOldFrame; + uint8_t *planes[3]; // y = 0, u = 1, v = 2 + int stride[3]; + BOOL fHWAccel; + RECTL rclParent; + struct SwsContext *sws; +} m_int; + +static inline void setAspectRatio(ULONG ulRatio) +{ + m_int.kvas.ulRatio = ulRatio; + kvaSetup(&m_int.kvas); +} + +static int query_format_info(int format, PBOOL pfHWAccel, PFOURCC pfcc, + int *pbpp, int *pnChromaShift) +{ + BOOL fHWAccel; + FOURCC fcc; + INT bpp; + INT nChromaShift; + + switch (format) { + case IMGFMT_YV12: + fHWAccel = m_int.kvac.ulInputFormatFlags & KVAF_YV12; + fcc = FOURCC_YV12; + bpp = 1; + nChromaShift = 1; + break; + + case IMGFMT_YUY2: + fHWAccel = m_int.kvac.ulInputFormatFlags & KVAF_YUY2; + fcc = FOURCC_Y422; + bpp = 2; + nChromaShift = 0; + break; + + case IMGFMT_YVU9: + fHWAccel = m_int.kvac.ulInputFormatFlags & KVAF_YVU9; + fcc = FOURCC_YVU9; + bpp = 1; + nChromaShift = 2; + break; + + case IMGFMT_BGR24: + fHWAccel = m_int.kvac.ulInputFormatFlags & KVAF_BGR24; + fcc = FOURCC_BGR3; + bpp = 3; + nChromaShift = 0; + break; + + case IMGFMT_BGR16: + fHWAccel = m_int.kvac.ulInputFormatFlags & KVAF_BGR16; + fcc = FOURCC_R565; + bpp = 2; + nChromaShift = 0; + break; + + case IMGFMT_BGR15: + fHWAccel = m_int.kvac.ulInputFormatFlags & KVAF_BGR15; + fcc = FOURCC_R555; + bpp = 2; + nChromaShift = 0; + break; + + default: + return 1; + } + + if (pfHWAccel) + *pfHWAccel = fHWAccel; + + if (pfcc) + *pfcc = fcc; + + if (pbpp) + *pbpp = bpp; + + if (pnChromaShift) + *pnChromaShift = nChromaShift; + + return 0; +} + +static void imgCreate(void) +{ + int size = SRC_HEIGHT * m_int.lStride;; + + switch (m_int.iImageFormat) { + case IMGFMT_YV12: + size += size / 2; + break; + + case IMGFMT_YVU9: + size += size / 8; + break; + } + + m_int.pbImage = malloc(size); + + m_int.planes[0] = m_int.pbImage; + m_int.stride[0] = m_int.lStride; + + // YV12 or YVU9 ? + if (m_int.nChromaShift) { + m_int.planes[1] = m_int.planes[0] + SRC_HEIGHT * m_int.stride[0]; + m_int.stride[1] = m_int.stride[0] >> m_int.nChromaShift; + + m_int.planes[2] = m_int.planes[1] + + (SRC_HEIGHT >> m_int.nChromaShift) * m_int.stride[1]; + m_int.stride[2] = m_int.stride[1]; + } +} + +static void imgFree(void) +{ + free(m_int.pbImage); + + m_int.pbImage = NULL; +} + +static void imgDisplay(void) +{ + PVOID pBuffer; + ULONG ulBPL; + + if (!kvaLockBuffer(&pBuffer, &ulBPL)) { + uint8_t *dst[3]; + int dstStride[3]; + + // Get packed or Y + dst[0] = pBuffer; + dstStride[0] = ulBPL; + + // YV12 or YVU9 ? + if (m_int.nChromaShift) { + // Get V + dst[2] = dst[0] + SRC_HEIGHT * dstStride[0]; + dstStride[2] = dstStride[0] >> m_int.nChromaShift; + + // Get U + dst[1] = dst[2] + + (SRC_HEIGHT >> m_int.nChromaShift ) * dstStride[2]; + dstStride[1] = dstStride[2]; + } + + if (m_int.fHWAccel) { + int w, h; + + w = m_int.stride[0]; + h = SRC_HEIGHT; + + // Copy packed or Y + mem2agpcpy_pic(dst[0], m_int.planes[0], w, h, + dstStride[0], m_int.stride[0]); + + // YV12 or YVU9 ? + if (m_int.nChromaShift) { + w >>= m_int.nChromaShift; h >>= m_int.nChromaShift; + + // Copy U + mem2agpcpy_pic(dst[1], m_int.planes[1], w, h, + dstStride[1], m_int.stride[1]); + + // Copy V + mem2agpcpy_pic(dst[2], m_int.planes[2], w, h, + dstStride[2], m_int.stride[2]); + } + } else { + sws_scale(m_int.sws, m_int.planes, m_int.stride, 0, SRC_HEIGHT, + dst, dstStride); + } + + kvaUnlockBuffer(); + } +} + +// Frame window procedure to work around T23 laptop with S3 video card, +// which supports upscaling only. +static MRESULT EXPENTRY NewFrameWndProc(HWND hwnd, ULONG msg, MPARAM mp1, + MPARAM mp2) +{ + switch (msg) { + case WM_QUERYTRACKINFO: + { + PTRACKINFO pti = (PTRACKINFO)mp2; + RECTL rcl; + + if (vo_fs) + break; + + m_int.pfnwpOldFrame(hwnd, msg, mp1, mp2); + + rcl.xLeft = 0; + rcl.yBottom = 0; + rcl.xRight = SRC_WIDTH + 1; + rcl.yTop = SRC_HEIGHT + 1; + + WinCalcFrameRect(hwnd, &rcl, FALSE); + + pti->ptlMinTrackSize.x = rcl.xRight - rcl.xLeft; + pti->ptlMinTrackSize.y = rcl.yTop - rcl.yBottom; + + pti->ptlMaxTrackSize.x = vo_screenwidth; + pti->ptlMaxTrackSize.y = vo_screenheight; + + return (MRESULT)TRUE; + } + + case WM_ADJUSTWINDOWPOS: + { + PSWP pswp = (PSWP)mp1; + RECTL rcl; + + if (vo_fs) + break; + + if (pswp->fl & SWP_SIZE) { + rcl.xLeft = pswp->x; + rcl.yBottom = pswp->y; + rcl.xRight = rcl.xLeft + pswp->cx; + rcl.yTop = rcl.yBottom + pswp->cy; + + WinCalcFrameRect(hwnd, &rcl, TRUE); + + if (rcl.xRight - rcl.xLeft <= SRC_WIDTH) + rcl.xRight = rcl.xLeft + (SRC_WIDTH + 1); + + if (rcl.yTop - rcl.yBottom <= SRC_HEIGHT) + rcl.yTop = rcl.yBottom + (SRC_HEIGHT + 1); + + WinCalcFrameRect(hwnd, &rcl, FALSE); + + if (rcl.xRight - rcl.xLeft > vo_screenwidth) { + rcl.xLeft = 0; + rcl.xRight = vo_screenwidth; + } + + if (rcl.yTop - rcl.yBottom > vo_screenheight) { + rcl.yBottom = 0; + rcl.yTop = vo_screenheight; + } + + pswp->fl |= SWP_MOVE; + pswp->x = rcl.xLeft; + pswp->y = rcl.yBottom; + pswp->cx = rcl.xRight - rcl.xLeft; + pswp->cy = rcl.yTop - rcl.yBottom; + } + break; + } + } + + return m_int.pfnwpOldFrame(hwnd, msg, mp1, mp2); +} + +static MRESULT EXPENTRY WndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) +{ + // if slave mode, ignore mouse events and deliver them to a parent window + if (WinID != -1 && + ((msg >= WM_MOUSEFIRST && msg <= WM_MOUSELAST) || + (msg >= WM_EXTMOUSEFIRST && msg <= WM_EXTMOUSELAST))) { + WinPostMsg(HWNDFROMWINID(WinID), msg, mp1, mp2); + + return (MRESULT)TRUE; + } + + switch (msg) { + case WM_CLOSE: + mplayer_put_key(KEY_CLOSE_WIN); + + return 0; + + case WM_CHAR: + { + USHORT fsFlags = SHORT1FROMMP(mp1); + UCHAR uchScan = CHAR4FROMMP(mp1); + USHORT usCh = SHORT1FROMMP(mp2); + USHORT usVk = SHORT2FROMMP(mp2); + int mpkey; + + if (fsFlags & KC_KEYUP) + break; + + if (fsFlags & KC_SCANCODE) { + mpkey = lookup_keymap_table(m_keypad_map, uchScan); + if (mpkey) { + // distinguish KEY_KP0 and KEY_KPINS + if (mpkey == KEY_KP0 && usCh != '0') + mpkey = KEY_KPINS; + + // distinguish KEY_KPDEC and KEY_KPDEL + if (mpkey == KEY_KPDEC && usCh != '.') + mpkey = KEY_KPDEL; + + mplayer_put_key(mpkey); + + return (MRESULT)TRUE; + } + } + + if (fsFlags & KC_VIRTUALKEY) { + mpkey = lookup_keymap_table(m_vk_map, usVk); + if (mpkey) { + mplayer_put_key(mpkey); + + return (MRESULT)TRUE; + } + } + + if ((fsFlags & KC_CHAR) && !HIBYTE(usCh)) + mplayer_put_key(usCh); + + return (MRESULT)TRUE; + } + + case WM_BUTTON1DOWN: + case WM_BUTTON3DOWN: + case WM_BUTTON2DOWN: + case WM_BUTTON1DBLCLK: + case WM_BUTTON3DBLCLK: + case WM_BUTTON2DBLCLK: + if (WinQueryFocus(HWND_DESKTOP) != hwnd) + WinSetFocus(HWND_DESKTOP, hwnd); + else if (!vo_nomouse_input) + mplayer_put_key(lookup_keymap_table(m_mouse_map, msg)); + + return (MRESULT)TRUE; + + case WM_PAINT: + { + HPS hps; + RECTL rcl, rclDst; + PRECTL prcl = NULL; + HRGN hrgn, hrgnDst; + RGNRECT rgnCtl; + + // get a current movie area + kvaAdjustDstRect(&m_int.kvas.rclSrcRect, &rclDst); + + // get a current invalidated area + hps = WinBeginPaint(hwnd, NULLHANDLE, &rcl); + + // create a region for an invalidated area + hrgn = GpiCreateRegion(hps, 1, &rcl); + // create a region for a movie area + hrgnDst = GpiCreateRegion(hps, 1, &rclDst); + + // exclude a movie area from an invalidated area + GpiCombineRegion(hps, hrgn, hrgn, hrgnDst, CRGN_DIFF); + + // get rectangles from the region + rgnCtl.ircStart = 1; + rgnCtl.ulDirection = RECTDIR_LFRT_TOPBOT; + GpiQueryRegionRects(hps, hrgn, NULL, &rgnCtl, NULL); + + if (rgnCtl.crcReturned > 0) { + rgnCtl.crc = rgnCtl.crcReturned; + prcl = malloc(sizeof(RECTL) * rgnCtl.crcReturned); + } + + // draw black bar if needed + if (prcl && GpiQueryRegionRects(hps, hrgn, NULL, &rgnCtl, prcl)) { + int i; + + for (i = 0; i < rgnCtl.crcReturned; i++) + WinFillRect(hps, &prcl[i], CLR_BLACK); + } + + free(prcl); + + GpiDestroyRegion(hps, hrgnDst); + GpiDestroyRegion(hps, hrgn); + + WinEndPaint(hps); + + return 0; + } + } + + return WinDefWindowProc(hwnd, msg, mp1, mp2); +} + +// Change process type from VIO to PM to use PM APIs. +static void morphToPM(void) +{ + PPIB pib; + + DosGetInfoBlocks(NULL, &pib); + + // Change flag from VIO to PM: + if (pib->pib_ultype == 2) + pib->pib_ultype = 3; +} + +static int preinit(const char *arg) +{ + HWND hwndParent; + ULONG flFrameFlags; + ULONG kvaMode = 0; + + int fUseSnap = 0; + int fUseWO = 0; + int fUseDive = 0; + int fFixT23 = 0; + + const opt_t subopts[] = { + {"snap", OPT_ARG_BOOL, &fUseSnap, NULL}, + {"wo", OPT_ARG_BOOL, &fUseWO, NULL}, + {"dive", OPT_ARG_BOOL, &fUseDive, NULL}, + {"t23", OPT_ARG_BOOL, &fFixT23, NULL}, + {NULL, 0, NULL, NULL} + }; + + PCSZ pcszVideoModeStr[3] = {"DIVE", "WarpOverlay!", "SNAP"}; + + if (subopt_parse(arg, subopts) != 0) + return -1; + + morphToPM(); + + memset(&m_int, 0, sizeof(m_int)); + + m_int.hab = WinInitialize(0); + m_int.hmq = WinCreateMsgQueue(m_int.hab, 0); + + WinRegisterClass(m_int.hab, + WC_MPLAYER, + WndProc, + CS_SIZEREDRAW | CS_MOVENOTIFY, + sizeof(PVOID)); + + if (WinID == -1) { + hwndParent = HWND_DESKTOP; + flFrameFlags = FCF_SYSMENU | FCF_TITLEBAR | FCF_MINMAX | + FCF_SIZEBORDER | FCF_TASKLIST; + } else { + hwndParent = HWNDFROMWINID(WinID); + flFrameFlags = 0; + } + + m_int.hwndFrame = + WinCreateStdWindow(hwndParent, // parent window handle + WS_VISIBLE, // frame window style + &flFrameFlags, // window style + WC_MPLAYER, // class name + "", // window title + 0L, // default client style + NULLHANDLE, // resource in exe file + 1, // frame window id + &m_int.hwndClient); // client window handle + + if (m_int.hwndFrame == NULLHANDLE) + return -1; + + m_int.hwndSysMenu = WinWindowFromID(m_int.hwndFrame, FID_SYSMENU); + m_int.hwndTitleBar = WinWindowFromID(m_int.hwndFrame, FID_TITLEBAR); + m_int.hwndMinMax = WinWindowFromID(m_int.hwndFrame, FID_MINMAX); + + m_int.fFixT23 = fFixT23; + + if (m_int.fFixT23) + m_int.pfnwpOldFrame = WinSubclassWindow(m_int.hwndFrame, + NewFrameWndProc); + + if (!!fUseSnap + !!fUseWO + !!fUseDive > 1) + mp_msg(MSGT_VO, MSGL_WARN,"KVA: Multiple mode specified!!!\n"); + + if (fUseSnap) + kvaMode = KVAM_SNAP; + else if (fUseWO) + kvaMode = KVAM_WO; + else if (fUseDive) + kvaMode = KVAM_DIVE; + else + kvaMode = KVAM_AUTO; + + if (kvaInit(kvaMode, m_int.hwndClient, vo_colorkey)) { + mp_msg(MSGT_VO, MSGL_ERR, "KVA: Init failed!!!\n"); + + return -1; + } + + kvaCaps(&m_int.kvac); + + mp_msg(MSGT_VO, MSGL_V, "KVA: Selected video mode = %s\n", + pcszVideoModeStr[m_int.kvac.ulMode - 1]); + + kvaDisableScreenSaver(); + + // Might cause PM DLLs to be loaded which incorrectly enable SIG_FPE, + // so mask off all floating-point exceptions. + _control87(MCW_EM, MCW_EM); + + return 0; +} + +static void uninit(void) +{ + kvaEnableScreenSaver(); + + imgFree(); + + sws_freeContext(m_int.sws); + + if (m_int.hwndFrame != NULLHANDLE) { + kvaResetAttr(); + kvaDone(); + + if (m_int.fFixT23) + WinSubclassWindow(m_int.hwndFrame, m_int.pfnwpOldFrame); + + WinDestroyWindow(m_int.hwndFrame); + } + + WinDestroyMsgQueue(m_int.hmq); + WinTerminate(m_int.hab); +} + +static int config(uint32_t width, uint32_t height, + uint32_t d_width, uint32_t d_height, + uint32_t flags, char *title, uint32_t format) +{ + RECTL rcl; + + mp_msg(MSGT_VO, MSGL_V, + "KVA: Using 0x%X (%s) image format, vo_config_count = %d\n", + format, vo_format_name(format), vo_config_count); + + imgFree(); + + if (query_format_info(format, &m_int.fHWAccel, &m_int.fcc, &m_int.bpp, + &m_int.nChromaShift)) + return 1; + + m_int.iImageFormat = format; + + // if there is no hw accel for given format, + // try any format supported by hw accel + if (!m_int.fHWAccel) { + int dstFormat = 0; + + sws_freeContext(m_int.sws); + + if (m_int.kvac.ulInputFormatFlags & KVAF_YV12) + dstFormat = IMGFMT_YV12; + else if (m_int.kvac.ulInputFormatFlags & KVAF_YUY2) + dstFormat = IMGFMT_YUY2; + else if (m_int.kvac.ulInputFormatFlags & KVAF_YVU9) + dstFormat = IMGFMT_YVU9; + else if (m_int.kvac.ulInputFormatFlags & KVAF_BGR24) + dstFormat = IMGFMT_BGR24; + else if (m_int.kvac.ulInputFormatFlags & KVAF_BGR16) + dstFormat = IMGFMT_BGR16; + else if (m_int.kvac.ulInputFormatFlags & KVAF_BGR15) + dstFormat = IMGFMT_BGR15; + + if (query_format_info(dstFormat, NULL, &m_int.fcc, NULL, NULL)) + return 1; + + m_int.sws = sws_getContextFromCmdLine(width, height, format, + width, height, dstFormat); + } + + mp_msg(MSGT_VO, MSGL_V, "KVA: Selected FOURCC = %.4s\n", (char *)&m_int.fcc); + + m_int.kvas.ulLength = sizeof(KVASETUP); + m_int.kvas.szlSrcSize.cx = width; + m_int.kvas.szlSrcSize.cy = height; + m_int.kvas.rclSrcRect.xLeft = 0; + m_int.kvas.rclSrcRect.yTop = 0; + m_int.kvas.rclSrcRect.xRight = width; + m_int.kvas.rclSrcRect.yBottom = height; + m_int.kvas.ulRatio = vo_keepaspect ? KVAR_FORCEANY : KVAR_NONE; + m_int.kvas.ulAspectWidth = d_width; + m_int.kvas.ulAspectHeight = d_height; + m_int.kvas.fccSrcColor = m_int.fcc; + m_int.kvas.fDither = TRUE; + + if (kvaSetup(&m_int.kvas)) { + mp_msg(MSGT_VO, MSGL_ERR, "KVA: Setup failed!!!\n"); + + return 1; + } + + m_int.lStride = width * m_int.bpp; + + imgCreate(); + + if (WinID == -1) { + WinSetWindowText(m_int.hwndFrame, title); + + // initialize 'vo_fs' only once at first config() call + if (vo_config_count == 0) + vo_fs = flags & VOFLAG_FULLSCREEN; + + // workaround for T23 laptop with S3 Video by Franz Bakan + if (!vo_fs && m_int.fFixT23) { + d_width++; + d_height++; + } + + m_int.rclDst.xLeft = ((LONG)vo_screenwidth - (LONG)d_width) / 2; + m_int.rclDst.yBottom = ((LONG)vo_screenheight - (LONG)d_height) / 2; + m_int.rclDst.xRight = m_int.rclDst.xLeft + d_width; + m_int.rclDst.yTop = m_int.rclDst.yBottom + d_height; + + if (vo_fs) { + d_width = vo_screenwidth; + d_height = vo_screenheight; + + // when -fs option is used without this, title bar is not highlighted + WinSetActiveWindow(HWND_DESKTOP, m_int.hwndFrame); + + WinSetParent(m_int.hwndSysMenu, HWND_OBJECT, FALSE); + WinSetParent(m_int.hwndTitleBar, HWND_OBJECT, FALSE); + WinSetParent(m_int.hwndMinMax, HWND_OBJECT, FALSE); + + setAspectRatio(KVAR_FORCEANY); + } + + rcl.xLeft = ((LONG)vo_screenwidth - (LONG)d_width) / 2; + rcl.yBottom = ((LONG)vo_screenheight - (LONG)d_height) /2 ; + rcl.xRight = rcl.xLeft + d_width; + rcl.yTop = rcl.yBottom + d_height; + } else { + vo_fs = 0; + + WinQueryWindowRect(HWNDFROMWINID(WinID), &m_int.rclDst); + rcl = m_int.rclDst; + } + + WinCalcFrameRect(m_int.hwndFrame, &rcl, FALSE); + + WinSetWindowPos(m_int.hwndFrame, HWND_TOP, + rcl.xLeft, rcl.yBottom, + rcl.xRight - rcl.xLeft, rcl.yTop - rcl.yBottom, + SWP_SIZE | SWP_MOVE | SWP_ZORDER | SWP_SHOW | + (WinID == -1 ? SWP_ACTIVATE : 0)); + + WinInvalidateRect(m_int.hwndFrame, NULL, TRUE); + + return 0; +} + +static uint32_t get_image(mp_image_t *mpi) +{ + if (m_int.iImageFormat != mpi->imgfmt) + return VO_FALSE; + + if (mpi->type == MP_IMGTYPE_STATIC || mpi->type == MP_IMGTYPE_TEMP) { + if (mpi->flags & MP_IMGFLAG_PLANAR) { + mpi->planes[1] = m_int.planes[1]; + mpi->planes[2] = m_int.planes[2]; + + mpi->stride[1] = m_int.stride[1]; + mpi->stride[2] = m_int.stride[2]; + } + + mpi->planes[0] = m_int.planes[0]; + mpi->stride[0] = m_int.stride[0]; + mpi->flags |= MP_IMGFLAG_DIRECT; + + return VO_TRUE; + } + + return VO_FALSE; +} + +static uint32_t draw_image(mp_image_t *mpi) +{ + // if -dr or -slices then do nothing: + if (mpi->flags & (MP_IMGFLAG_DIRECT | MP_IMGFLAG_DRAW_CALLBACK)) + return VO_TRUE; + + draw_slice(mpi->planes, mpi->stride, mpi->w, mpi->h, mpi->x, mpi->y); + + return VO_TRUE; +} + +static int query_format(uint32_t format) +{ + BOOL fHWAccel; + int res; + + if (query_format_info(format, &fHWAccel, NULL, NULL, NULL)) + return 0; + + res = VFCAP_CSP_SUPPORTED | VFCAP_OSD; + if (fHWAccel) { + res |= VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_HWSCALE_UP; + + if (!m_int.fFixT23) + res |= VFCAP_HWSCALE_DOWN; + } + + return res; +} + +static int fs_toggle(void) +{ + RECTL rcl; + + vo_fs = !vo_fs; + + if (vo_fs) { + SWP swp; + + WinQueryWindowPos(m_int.hwndFrame, &swp); + m_int.rclDst.xLeft = swp.x; + m_int.rclDst.yBottom = swp.y; + m_int.rclDst.xRight = m_int.rclDst.xLeft + swp.cx; + m_int.rclDst.yTop = m_int.rclDst.yBottom + swp.cy; + WinCalcFrameRect(m_int.hwndFrame, &m_int.rclDst, TRUE); + + if (WinID != -1) + WinSetParent(m_int.hwndFrame, HWND_DESKTOP, FALSE); + + WinSetParent(m_int.hwndSysMenu, HWND_OBJECT, FALSE); + WinSetParent(m_int.hwndTitleBar, HWND_OBJECT, FALSE); + WinSetParent(m_int.hwndMinMax, HWND_OBJECT, FALSE); + + rcl.xLeft = 0; + rcl.yBottom = 0; + rcl.xRight = vo_screenwidth; + rcl.yTop = vo_screenheight; + + setAspectRatio(KVAR_FORCEANY); + } else { + if (WinID != -1) + WinSetParent(m_int.hwndFrame, HWNDFROMWINID(WinID), TRUE); + + WinSetParent(m_int.hwndSysMenu, m_int.hwndFrame, FALSE); + WinSetParent(m_int.hwndTitleBar, m_int.hwndFrame, FALSE); + WinSetParent(m_int.hwndMinMax, m_int.hwndFrame, FALSE); + + rcl = m_int.rclDst; + + setAspectRatio(vo_keepaspect ? KVAR_FORCEANY : KVAR_NONE); + } + + WinCalcFrameRect(m_int.hwndFrame, &rcl, FALSE); + + WinSetWindowPos(m_int.hwndFrame, HWND_TOP, + rcl.xLeft, rcl.yBottom, + rcl.xRight - rcl.xLeft, rcl.yTop - rcl.yBottom, + SWP_SIZE | SWP_MOVE | SWP_ZORDER | SWP_SHOW | + (WinID == -1 ? SWP_ACTIVATE : 0)); + + return VO_TRUE; +} + +static int color_ctrl_set(char *what, int value) +{ + ULONG ulAttr; + ULONG ulValue; + + if (!strcmp(what, "brightness")) + ulAttr = KVAA_BRIGHTNESS; + else if (!strcmp(what, "contrast")) + ulAttr = KVAA_CONTRAST; + else if (!strcmp(what, "hue")) + ulAttr = KVAA_HUE; + else if (!strcmp(what, "saturation")) + ulAttr = KVAA_SATURATION; + else + return VO_NOTIMPL; + + ulValue = (value + 100) * 255 / 200; + + if (kvaSetAttr(ulAttr, &ulValue)) + return VO_NOTIMPL; + + return VO_TRUE; +} + +static int color_ctrl_get(char *what, int *value) +{ + ULONG ulAttr; + ULONG ulValue; + + if (!strcmp(what, "brightness")) + ulAttr = KVAA_BRIGHTNESS; + else if (!strcmp(what, "contrast")) + ulAttr = KVAA_CONTRAST; + else if (!strcmp(what, "hue")) + ulAttr = KVAA_HUE; + else if (!strcmp(what, "saturation")) + ulAttr = KVAA_SATURATION; + else + return VO_NOTIMPL; + + if (kvaQueryAttr(ulAttr, &ulValue)) + return VO_NOTIMPL; + + // add 1 to adjust range + *value = ((ulValue + 1) * 200 / 255) - 100; + + return VO_TRUE; +} + +static int control(uint32_t request, void *data, ...) +{ + switch (request) { + case VOCTRL_GET_IMAGE: + return get_image(data); + + case VOCTRL_DRAW_IMAGE: + return draw_image(data); + + case VOCTRL_QUERY_FORMAT: + return query_format(*(uint32_t *)data); + + case VOCTRL_FULLSCREEN: + return fs_toggle(); + + case VOCTRL_SET_EQUALIZER: + { + va_list ap; + int value; + + va_start(ap, data); + value = va_arg(ap, int); + va_end(ap); + + return color_ctrl_set(data, value); + } + + case VOCTRL_GET_EQUALIZER: + { + va_list ap; + int *value; + + va_start(ap, data); + value = va_arg(ap, int *); + va_end(ap); + + return color_ctrl_get(data, value); + } + + case VOCTRL_UPDATE_SCREENINFO: + vo_screenwidth = m_int.kvac.cxScreen; + vo_screenheight = m_int.kvac.cyScreen; + + aspect_save_screenres(vo_screenwidth, vo_screenheight); + + return VO_TRUE; + } + + return VO_NOTIMPL; +} + +static int draw_frame(uint8_t *src[]) +{ + return VO_ERROR; +} + +static int draw_slice(uint8_t *src[], int stride[], int w, int h, int x, int y) +{ + uint8_t *s; + uint8_t *d; + + // copy packed or Y + d = m_int.planes[0] + m_int.stride[0] * y + x; + s = src[0]; + mem2agpcpy_pic(d, s, w * m_int.bpp, h, m_int.stride[0], stride[0]); + + // YV12 or YVU9 + if (m_int.nChromaShift) { + w >>= m_int.nChromaShift; h >>= m_int.nChromaShift; + x >>= m_int.nChromaShift; y >>= m_int.nChromaShift; + + // copy U + d = m_int.planes[1] + m_int.stride[1] * y + x; + s = src[1]; + mem2agpcpy_pic(d, s, w, h, m_int.stride[1], stride[1]); + + // copy V + d = m_int.planes[2] + m_int.stride[2] * y + x; + s = src[2]; + mem2agpcpy_pic(d, s, w, h, m_int.stride[2], stride[2]); + } + + return 0; +} + +#define vo_draw_alpha(imgfmt) \ + vo_draw_alpha_##imgfmt(w, h, src, srca, stride, \ + m_int.planes[0] + m_int.stride[0] * y0 + m_int.bpp * x0, \ + m_int.stride[0]) + +static void draw_alpha(int x0, int y0, int w, int h, + unsigned char *src, unsigned char *srca, int stride) +{ + switch (m_int.iImageFormat) { + case IMGFMT_YV12: + case IMGFMT_YVU9: + vo_draw_alpha(yv12); + break; + + case IMGFMT_YUY2: + vo_draw_alpha(yuy2); + break; + + case IMGFMT_BGR24: + vo_draw_alpha(rgb24); + break; + + case IMGFMT_BGR16: + vo_draw_alpha(rgb16); + break; + + case IMGFMT_BGR15: + vo_draw_alpha(rgb15); + break; + } +} + +static void draw_osd(void) +{ + vo_draw_text(SRC_WIDTH, SRC_HEIGHT, draw_alpha); +} + +static void flip_page(void) +{ + imgDisplay(); +} + +static void check_events(void) +{ + QMSG qm; + + // On slave mode, we need to change our window size according to a + // parent window size + if (WinID != -1) { + RECTL rcl; + + WinQueryWindowRect(HWNDFROMWINID(WinID), &rcl); + + if (rcl.xLeft != m_int.rclParent.xLeft || + rcl.yBottom != m_int.rclParent.yBottom || + rcl.xRight != m_int.rclParent.xRight || + rcl.yTop != m_int.rclParent.yTop) { + WinSetWindowPos(m_int.hwndFrame, NULLHANDLE, + rcl.xLeft, rcl.yBottom, + rcl.xRight - rcl.xLeft, rcl.yTop - rcl.yBottom, + SWP_SIZE | SWP_MOVE); + + m_int.rclParent = rcl; + } + } + + while (WinPeekMsg(m_int.hab, &qm, NULLHANDLE, 0, 0, PM_REMOVE)) + WinDispatchMsg(m_int.hab, &qm); +} From subversion at mplayerhq.hu Sun Mar 15 10:17:42 2009 From: subversion at mplayerhq.hu (diego) Date: Sun, 15 Mar 2009 10:17:42 +0100 (CET) Subject: [MPlayer-cvslog] r28952 - trunk/configure Message-ID: <20090315091742.8AEC43B2AD@natsuki.mplayerhq.hu> Author: diego Date: Sun Mar 15 10:17:42 2009 New Revision: 28952 Log: HAVE_THREADS should be initialized to 0, it is a 0/1 #define in FFmpeg. patch by Dave Yeo, dave.r.yeo gmail com Modified: trunk/configure Modified: trunk/configure ============================================================================== --- trunk/configure Sat Mar 14 21:58:18 2009 (r28951) +++ trunk/configure Sun Mar 15 10:17:42 2009 (r28952) @@ -3280,7 +3280,7 @@ fi echores "$_dynamic_plugins" -def_threads='#undef HAVE_THREADS' +def_threads='#define HAVE_THREADS 0' echocheck "pthread" if test "$_pthreads" = auto ; then From subversion at mplayerhq.hu Sun Mar 15 10:25:50 2009 From: subversion at mplayerhq.hu (reimar) Date: Sun, 15 Mar 2009 10:25:50 +0100 (CET) Subject: [MPlayer-cvslog] r28953 - trunk/etc/codecs.conf Message-ID: <20090315092550.AE0813B2AD@natsuki.mplayerhq.hu> Author: reimar Date: Sun Mar 15 10:25:50 2009 New Revision: 28953 Log: Prefer ffdv over qdv, it seems qdv can not play some FFmpeg-encoded samples. Modified: trunk/etc/codecs.conf Modified: trunk/etc/codecs.conf ============================================================================== --- trunk/etc/codecs.conf Sun Mar 15 10:17:42 2009 (r28952) +++ trunk/etc/codecs.conf Sun Mar 15 10:25:50 2009 (r28953) @@ -1520,20 +1520,6 @@ videocodec indeo3xa ; DV: qdv is more stable... libdv is slow, mcdv is unstable -videocodec qdv - info "Sony Digital Video (DV)" - status working - fourcc dvsl,dvsd,dvhd ; ???? - fourcc DVSD dvsd ; pal .avi - fourcc "dvcp" dvsd ; pal .mov - fourcc "dvc " dvsd ; ntsc .mov - driver dshow - dll "qdv.dll" - guid 0xB1B77C00, 0xC3E4, 0x11CF, 0xAF, 0x79, 0x00, 0xAA, 0x00, 0xB6, 0x7A, 0x42 - out YUY2 - out UYVY - out BGR24,BGR16,BGR15 ; BGR32 is buggy, at least with one sample - videocodec ffdv info "FFmpeg DV" status working @@ -1554,6 +1540,20 @@ videocodec ffdv dll dvvideo out 411P,422P,YV12 +videocodec qdv + info "Sony Digital Video (DV)" + status working + fourcc dvsl,dvsd,dvhd ; ???? + fourcc DVSD dvsd ; pal .avi + fourcc "dvcp" dvsd ; pal .mov + fourcc "dvc " dvsd ; ntsc .mov + driver dshow + dll "qdv.dll" + guid 0xB1B77C00, 0xC3E4, 0x11CF, 0xAF, 0x79, 0x00, 0xAA, 0x00, 0xB6, 0x7A, 0x42 + out YUY2 + out UYVY + out BGR24,BGR16,BGR15 ; BGR32 is buggy, at least with one sample + videocodec libdv info "Raw DV (libdv)" status working From diego at biurrun.de Sun Mar 15 10:26:47 2009 From: diego at biurrun.de (Diego Biurrun) Date: Sun, 15 Mar 2009 10:26:47 +0100 Subject: [MPlayer-cvslog] r28953 - trunk/etc/codecs.conf In-Reply-To: <20090315092550.AE0813B2AD@natsuki.mplayerhq.hu> References: <20090315092550.AE0813B2AD@natsuki.mplayerhq.hu> Message-ID: <20090315092647.GB8127@pool.informatik.rwth-aachen.de> On Sun, Mar 15, 2009 at 10:25:50AM +0100, reimar wrote: > > Log: > Prefer ffdv over qdv, it seems qdv can not play some FFmpeg-encoded samples. Which ones? qdv is still a good bit faster than FFmpeg. Diego From Reimar.Doeffinger at gmx.de Sun Mar 15 10:46:23 2009 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Sun, 15 Mar 2009 10:46:23 +0100 Subject: [MPlayer-cvslog] r28953 - trunk/etc/codecs.conf In-Reply-To: <20090315092647.GB8127@pool.informatik.rwth-aachen.de> References: <20090315092550.AE0813B2AD@natsuki.mplayerhq.hu> <20090315092647.GB8127@pool.informatik.rwth-aachen.de> Message-ID: <20090315094623.GA9704@1und1.de> On Sun, Mar 15, 2009 at 10:26:47AM +0100, Diego Biurrun wrote: > On Sun, Mar 15, 2009 at 10:25:50AM +0100, reimar wrote: > > > > Log: > > Prefer ffdv over qdv, it seems qdv can not play some FFmpeg-encoded samples. > > Which ones? qdv is still a good bit faster than FFmpeg. Sorry, I probably messed up the test, do you want me to revert (I will ask on -users if maybe someone else can reproduce, maybe it is some random bug)? Have any numbers how much it is faster? From subversion at mplayerhq.hu Sun Mar 15 10:47:10 2009 From: subversion at mplayerhq.hu (diego) Date: Sun, 15 Mar 2009 10:47:10 +0100 (CET) Subject: [MPlayer-cvslog] r28954 - trunk/libvo/vo_xvmc.c Message-ID: <20090315094710.35FF43B561@natsuki.mplayerhq.hu> Author: diego Date: Sun Mar 15 10:47:09 2009 New Revision: 28954 Log: cosmetics: typo fix Modified: trunk/libvo/vo_xvmc.c Modified: trunk/libvo/vo_xvmc.c ============================================================================== --- trunk/libvo/vo_xvmc.c Sun Mar 15 10:25:50 2009 (r28953) +++ trunk/libvo/vo_xvmc.c Sun Mar 15 10:47:09 2009 (r28954) @@ -63,7 +63,7 @@ #define UNUSED(x) ((void)(x)) #if LIBAVCODEC_BUILD < ((51<<16)+(40<<8)+2) -#error You need at least libavcodecs v51.40.2 +#error You need at least libavcodec v51.40.2 #endif From subversion at mplayerhq.hu Sun Mar 15 10:47:51 2009 From: subversion at mplayerhq.hu (diego) Date: Sun, 15 Mar 2009 10:47:51 +0100 (CET) Subject: [MPlayer-cvslog] r28955 - trunk/libvo/w32_common.c Message-ID: <20090315094751.76B493B575@natsuki.mplayerhq.hu> Author: diego Date: Sun Mar 15 10:47:51 2009 New Revision: 28955 Log: "MPlayer - The Movie Player" should be used as the player name. Modified: trunk/libvo/w32_common.c Modified: trunk/libvo/w32_common.c ============================================================================== --- trunk/libvo/w32_common.c Sun Mar 15 10:47:09 2009 (r28954) +++ trunk/libvo/w32_common.c Sun Mar 15 10:47:51 2009 (r28955) @@ -36,7 +36,7 @@ extern int enable_mouse_movements; #define MONITOR_DEFAULTTOPRIMARY 1 #endif -static const char classname[] = "MPlayer - Media player for Win32"; +static const char classname[] = "MPlayer - The Movie Player"; int vo_vm = 0; // last non-fullscreen extends From subversion at mplayerhq.hu Sun Mar 15 11:01:02 2009 From: subversion at mplayerhq.hu (diego) Date: Sun, 15 Mar 2009 11:01:02 +0100 (CET) Subject: [MPlayer-cvslog] r28956 - in trunk/libvo: aclib.c osd.c Message-ID: <20090315100102.A80DE3B583@natsuki.mplayerhq.hu> Author: diego Date: Sun Mar 15 11:01:02 2009 New Revision: 28956 Log: Get rid of pointless preprocessor condition indirection and use ARCH_X86 directly instead of CAN_COMPILE_X86_ASM. Modified: trunk/libvo/aclib.c trunk/libvo/osd.c Modified: trunk/libvo/aclib.c ============================================================================== --- trunk/libvo/aclib.c Sun Mar 15 10:47:51 2009 (r28955) +++ trunk/libvo/aclib.c Sun Mar 15 11:01:02 2009 (r28956) @@ -33,9 +33,6 @@ //Feel free to fine-tune the above 2, it might be possible to get some speedup with them :) //#define STATISTICS -#if ARCH_X86 -#define CAN_COMPILE_X86_ASM -#endif //Note: we have MMX, MMX2, 3DNOW version there is no 3DNOW+MMX2 one //Plain C versions @@ -43,7 +40,7 @@ //#define COMPILE_C //#endif -#ifdef CAN_COMPILE_X86_ASM +#if ARCH_X86 #if (HAVE_MMX && !HAVE_AMD3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT) #define COMPILE_MMX @@ -155,14 +152,14 @@ #include "aclib_template.c" #endif -#endif // CAN_COMPILE_X86_ASM +#endif /* ARCH_X86 */ #undef fast_memcpy void * fast_memcpy(void * to, const void * from, size_t len) { #ifdef RUNTIME_CPUDETECT -#ifdef CAN_COMPILE_X86_ASM +#if ARCH_X86 // ordered per speed fasterst first if(gCpuCaps.hasSSE2) fast_memcpy_SSE(to, from, len); @@ -173,7 +170,7 @@ void * fast_memcpy(void * to, const void else if(gCpuCaps.hasMMX) fast_memcpy_MMX(to, from, len); else -#endif //CAN_COMPILE_X86_ASM +#endif memcpy(to, from, len); // prior to mmx we use the standart memcpy #else #if HAVE_SSE2 @@ -196,7 +193,7 @@ void * fast_memcpy(void * to, const void void * mem2agpcpy(void * to, const void * from, size_t len) { #ifdef RUNTIME_CPUDETECT -#ifdef CAN_COMPILE_X86_ASM +#if ARCH_X86 // ordered per speed fasterst first if(gCpuCaps.hasSSE2) mem2agpcpy_SSE(to, from, len); @@ -207,7 +204,7 @@ void * mem2agpcpy(void * to, const void else if(gCpuCaps.hasMMX) mem2agpcpy_MMX(to, from, len); else -#endif //CAN_COMPILE_X86_ASM +#endif memcpy(to, from, len); // prior to mmx we use the standart memcpy #else #if HAVE_SSE2 Modified: trunk/libvo/osd.c ============================================================================== --- trunk/libvo/osd.c Sun Mar 15 10:47:51 2009 (r28955) +++ trunk/libvo/osd.c Sun Mar 15 11:01:02 2009 (r28956) @@ -30,10 +30,6 @@ #include "cpudetect.h" #if ARCH_X86 -#define CAN_COMPILE_X86_ASM -#endif - -#ifdef CAN_COMPILE_X86_ASM static const uint64_t bFF __attribute__((aligned(8))) = 0xFFFFFFFFFFFFFFFFULL; static const unsigned long long mask24lh __attribute__((aligned(8))) = 0xFFFF000000000000ULL; static const unsigned long long mask24hl __attribute__((aligned(8))) = 0x0000FFFFFFFFFFFFULL; @@ -45,7 +41,7 @@ static const unsigned long long mask24hl #define COMPILE_C #endif -#ifdef CAN_COMPILE_X86_ASM +#if ARCH_X86 #if (HAVE_MMX && !HAVE_AMD3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT) #define COMPILE_MMX @@ -58,7 +54,8 @@ static const unsigned long long mask24hl #if (HAVE_AMD3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT) #define COMPILE_3DNOW #endif -#endif //CAN_COMPILE_X86_ASM + +#endif /* ARCH_X86 */ #undef HAVE_MMX #undef HAVE_MMX2 @@ -67,7 +64,7 @@ static const unsigned long long mask24hl #define HAVE_MMX2 0 #define HAVE_AMD3DNOW 0 -#ifndef CAN_COMPILE_X86_ASM +#if ! ARCH_X86 #ifdef COMPILE_C #undef HAVE_MMX @@ -134,11 +131,11 @@ static const unsigned long long mask24hl #include "osd_template.c" #endif -#endif //CAN_COMPILE_X86_ASM +#endif /* ARCH_X86 */ void vo_draw_alpha_yv12(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride){ #ifdef RUNTIME_CPUDETECT -#ifdef CAN_COMPILE_X86_ASM +#if ARCH_X86 // ordered by speed / fastest first if(gCpuCaps.hasMMX2) vo_draw_alpha_yv12_MMX2(w, h, src, srca, srcstride, dstbase, dststride); @@ -168,7 +165,7 @@ void vo_draw_alpha_yv12(int w,int h, uns void vo_draw_alpha_yuy2(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride){ #ifdef RUNTIME_CPUDETECT -#ifdef CAN_COMPILE_X86_ASM +#if ARCH_X86 // ordered by speed / fastest first if(gCpuCaps.hasMMX2) vo_draw_alpha_yuy2_MMX2(w, h, src, srca, srcstride, dstbase, dststride); @@ -198,7 +195,7 @@ void vo_draw_alpha_yuy2(int w,int h, uns void vo_draw_alpha_uyvy(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride){ #ifdef RUNTIME_CPUDETECT -#ifdef CAN_COMPILE_X86_ASM +#if ARCH_X86 // ordered by speed / fastest first if(gCpuCaps.hasMMX2) vo_draw_alpha_uyvy_MMX2(w, h, src, srca, srcstride, dstbase, dststride); @@ -228,7 +225,7 @@ void vo_draw_alpha_uyvy(int w,int h, uns void vo_draw_alpha_rgb24(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride){ #ifdef RUNTIME_CPUDETECT -#ifdef CAN_COMPILE_X86_ASM +#if ARCH_X86 // ordered by speed / fastest first if(gCpuCaps.hasMMX2) vo_draw_alpha_rgb24_MMX2(w, h, src, srca, srcstride, dstbase, dststride); @@ -258,7 +255,7 @@ void vo_draw_alpha_rgb24(int w,int h, un void vo_draw_alpha_rgb32(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride){ #ifdef RUNTIME_CPUDETECT -#ifdef CAN_COMPILE_X86_ASM +#if ARCH_X86 // ordered by speed / fastest first if(gCpuCaps.hasMMX2) vo_draw_alpha_rgb32_MMX2(w, h, src, srca, srcstride, dstbase, dststride); @@ -303,7 +300,7 @@ void vo_draw_alpha_init(void){ if( mp_msg_test(MSGT_OSD,MSGL_V) ) { #ifdef RUNTIME_CPUDETECT -#ifdef CAN_COMPILE_X86_ASM +#if ARCH_X86 // ordered per speed fasterst first if(gCpuCaps.hasMMX2) mp_msg(MSGT_OSD,MSGL_INFO,"Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay\n"); From subversion at mplayerhq.hu Sun Mar 15 11:03:09 2009 From: subversion at mplayerhq.hu (diego) Date: Sun, 15 Mar 2009 11:03:09 +0100 (CET) Subject: [MPlayer-cvslog] r28957 - in trunk/libvo: vo_aa.c vo_gif89a.c vo_jpeg.c vo_md5sum.c vo_png.c vo_pnm.c vo_sdl.c vo_zr2.c Message-ID: <20090315100309.A6D6D3B593@natsuki.mplayerhq.hu> Author: diego Date: Sun Mar 15 11:03:09 2009 New Revision: 28957 Log: Remove obsolete extra elements from opt_t struct initialization. Fixes a bunch of 'excess elements in struct initializer' warnings. Modified: trunk/libvo/vo_aa.c trunk/libvo/vo_gif89a.c trunk/libvo/vo_jpeg.c trunk/libvo/vo_md5sum.c trunk/libvo/vo_png.c trunk/libvo/vo_pnm.c trunk/libvo/vo_sdl.c trunk/libvo/vo_zr2.c Modified: trunk/libvo/vo_aa.c ============================================================================== --- trunk/libvo/vo_aa.c Sun Mar 15 11:01:02 2009 (r28956) +++ trunk/libvo/vo_aa.c Sun Mar 15 11:03:09 2009 (r28957) @@ -579,9 +579,9 @@ static int parse_suboptions(const char * *helpmsg = NULL; int pseudoargc, displayhelp = 0, *booleans; const opt_t extra_opts[] = { - {"osdcolor", OPT_ARG_MSTRZ, &osdcolor, NULL, 0}, - {"subcolor", OPT_ARG_MSTRZ, &subcolor, NULL, 0}, - {"help", OPT_ARG_BOOL, &displayhelp, NULL, 0} }; + {"osdcolor", OPT_ARG_MSTRZ, &osdcolor, NULL}, + {"subcolor", OPT_ARG_MSTRZ, &subcolor, NULL}, + {"help", OPT_ARG_BOOL, &displayhelp, NULL} }; opt_t *subopts = NULL, *p; char * const strings_list[] = {"-driver", "-kbddriver", "-mousedriver", "-font", "-width", "-height", "-minwidth", "-minheight", "-maxwidth", Modified: trunk/libvo/vo_gif89a.c ============================================================================== --- trunk/libvo/vo_gif89a.c Sun Mar 15 11:01:02 2009 (r28956) +++ trunk/libvo/vo_gif89a.c Sun Mar 15 11:03:09 2009 (r28957) @@ -105,9 +105,9 @@ static char *gif_filename = NULL; #define DEFAULT_FILE "out.gif" static const opt_t subopts[] = { - {"output", OPT_ARG_MSTRZ, &gif_filename, NULL, 0}, - {"fps", OPT_ARG_FLOAT, &target_fps, NULL, 0}, - {NULL, 0, NULL, NULL, 0} + {"output", OPT_ARG_MSTRZ, &gif_filename, NULL}, + {"fps", OPT_ARG_FLOAT, &target_fps, NULL}, + {NULL, 0, NULL, NULL} }; static int preinit(const char *arg) Modified: trunk/libvo/vo_jpeg.c ============================================================================== --- trunk/libvo/vo_jpeg.c Sun Mar 15 11:01:02 2009 (r28956) +++ trunk/libvo/vo_jpeg.c Sun Mar 15 11:03:09 2009 (r28957) @@ -340,19 +340,19 @@ static int int_zero_hundred(int *val) static int preinit(const char *arg) { const opt_t subopts[] = { - {"progressive", OPT_ARG_BOOL, &jpeg_progressive_mode, NULL, 0}, - {"baseline", OPT_ARG_BOOL, &jpeg_baseline, NULL, 0}, + {"progressive", OPT_ARG_BOOL, &jpeg_progressive_mode, NULL}, + {"baseline", OPT_ARG_BOOL, &jpeg_baseline, NULL}, {"optimize", OPT_ARG_INT, &jpeg_optimize, - (opt_test_f)int_zero_hundred, 0}, + (opt_test_f)int_zero_hundred}, {"smooth", OPT_ARG_INT, &jpeg_smooth, - (opt_test_f)int_zero_hundred, 0}, + (opt_test_f)int_zero_hundred}, {"quality", OPT_ARG_INT, &jpeg_quality, - (opt_test_f)int_zero_hundred, 0}, - {"dpi", OPT_ARG_INT, &jpeg_dpi, NULL, 0}, - {"outdir", OPT_ARG_MSTRZ, &jpeg_outdir, NULL, 0}, - {"subdirs", OPT_ARG_MSTRZ, &jpeg_subdirs, NULL, 0}, - {"maxfiles", OPT_ARG_INT, &jpeg_maxfiles, (opt_test_f)int_pos, 0}, - {NULL, 0, NULL, NULL, 0} + (opt_test_f)int_zero_hundred}, + {"dpi", OPT_ARG_INT, &jpeg_dpi, NULL}, + {"outdir", OPT_ARG_MSTRZ, &jpeg_outdir, NULL}, + {"subdirs", OPT_ARG_MSTRZ, &jpeg_subdirs, NULL}, + {"maxfiles", OPT_ARG_INT, &jpeg_maxfiles, (opt_test_f)int_pos}, + {NULL, 0, NULL, NULL} }; const char *info_message = NULL; Modified: trunk/libvo/vo_md5sum.c ============================================================================== --- trunk/libvo/vo_md5sum.c Sun Mar 15 11:01:02 2009 (r28956) +++ trunk/libvo/vo_md5sum.c Sun Mar 15 11:03:09 2009 (r28957) @@ -108,8 +108,8 @@ static void md5sum_write_error(void) { static int preinit(const char *arg) { const opt_t subopts[] = { - {"outfile", OPT_ARG_MSTRZ, &md5sum_outfile, NULL, 0}, - {NULL, 0, NULL, NULL, 0} + {"outfile", OPT_ARG_MSTRZ, &md5sum_outfile, NULL}, + {NULL, 0, NULL, NULL} }; mp_msg(MSGT_VO, MSGL_INFO, "%s: %s\n", info.short_name, Modified: trunk/libvo/vo_png.c ============================================================================== --- trunk/libvo/vo_png.c Sun Mar 15 11:01:02 2009 (r28956) +++ trunk/libvo/vo_png.c Sun Mar 15 11:03:09 2009 (r28957) @@ -291,9 +291,9 @@ static int int_zero_to_nine(int *sh) } static const opt_t subopts[] = { - {"alpha", OPT_ARG_BOOL, &use_alpha, NULL, 0}, + {"alpha", OPT_ARG_BOOL, &use_alpha, NULL}, {"z", OPT_ARG_INT, &z_compression, (opt_test_f)int_zero_to_nine}, - {"outdir", OPT_ARG_MSTRZ, &png_outdir, NULL, 0}, + {"outdir", OPT_ARG_MSTRZ, &png_outdir, NULL}, {NULL} }; Modified: trunk/libvo/vo_pnm.c ============================================================================== --- trunk/libvo/vo_pnm.c Sun Mar 15 11:01:02 2009 (r28956) +++ trunk/libvo/vo_pnm.c Sun Mar 15 11:03:09 2009 (r28957) @@ -121,15 +121,15 @@ static int preinit(const char *arg) int ppm_type = 0, pgm_type = 0, pgmyuv_type = 0, raw_mode = 0, ascii_mode = 0; const opt_t subopts[] = { - {"ppm", OPT_ARG_BOOL, &ppm_type, NULL, 0}, - {"pgm", OPT_ARG_BOOL, &pgm_type, NULL, 0}, - {"pgmyuv", OPT_ARG_BOOL, &pgmyuv_type, NULL, 0}, - {"raw", OPT_ARG_BOOL, &raw_mode, NULL, 0}, - {"ascii", OPT_ARG_BOOL, &ascii_mode, NULL, 0}, - {"outdir", OPT_ARG_MSTRZ, &pnm_outdir, NULL, 0}, - {"subdirs", OPT_ARG_MSTRZ, &pnm_subdirs, NULL, 0}, - {"maxfiles", OPT_ARG_INT, &pnm_maxfiles, (opt_test_f)int_pos, 0}, - {NULL, 0, NULL, NULL, 0} + {"ppm", OPT_ARG_BOOL, &ppm_type, NULL}, + {"pgm", OPT_ARG_BOOL, &pgm_type, NULL}, + {"pgmyuv", OPT_ARG_BOOL, &pgmyuv_type, NULL}, + {"raw", OPT_ARG_BOOL, &raw_mode, NULL}, + {"ascii", OPT_ARG_BOOL, &ascii_mode, NULL}, + {"outdir", OPT_ARG_MSTRZ, &pnm_outdir, NULL}, + {"subdirs", OPT_ARG_MSTRZ, &pnm_subdirs, NULL}, + {"maxfiles", OPT_ARG_INT, &pnm_maxfiles, (opt_test_f)int_pos}, + {NULL, 0, NULL, NULL} }; const char *info_message = NULL; Modified: trunk/libvo/vo_sdl.c ============================================================================== --- trunk/libvo/vo_sdl.c Sun Mar 15 11:01:02 2009 (r28956) +++ trunk/libvo/vo_sdl.c Sun Mar 15 11:03:09 2009 (r28957) @@ -1527,10 +1527,10 @@ static int preinit(const char *arg) int sdl_hwaccel; int sdl_forcexv; const opt_t subopts[] = { - {"forcexv", OPT_ARG_BOOL, &sdl_forcexv, NULL, 0}, - {"hwaccel", OPT_ARG_BOOL, &sdl_hwaccel, NULL, 0}, - {"driver", OPT_ARG_MSTRZ, &sdl_driver, NULL, 0}, - {NULL, 0, NULL, NULL, 0} + {"forcexv", OPT_ARG_BOOL, &sdl_forcexv, NULL}, + {"hwaccel", OPT_ARG_BOOL, &sdl_hwaccel, NULL}, + {"driver", OPT_ARG_MSTRZ, &sdl_driver, NULL}, + {NULL, 0, NULL, NULL} }; sdl_forcexv = 1; Modified: trunk/libvo/vo_zr2.c ============================================================================== --- trunk/libvo/vo_zr2.c Sun Mar 15 11:01:02 2009 (r28956) +++ trunk/libvo/vo_zr2.c Sun Mar 15 11:03:09 2009 (r28957) @@ -210,10 +210,10 @@ static int preinit(const char *arg) { char *dev_arg = NULL, *norm_arg = NULL; int norm = VIDEO_MODE_AUTO, prebuf = 0; const opt_t subopts[] = { /* don't want warnings with -Wall... */ - { "dev", OPT_ARG_MSTRZ, &dev_arg, NULL, 0 }, - { "prebuf", OPT_ARG_BOOL, &prebuf, (opt_test_f)pbc, 0 }, - { "norm", OPT_ARG_MSTRZ, &norm_arg, (opt_test_f)nc, 0 }, - { NULL, 0, NULL, NULL, 0 } + { "dev", OPT_ARG_MSTRZ, &dev_arg, NULL }, + { "prebuf", OPT_ARG_BOOL, &prebuf, (opt_test_f)pbc }, + { "norm", OPT_ARG_MSTRZ, &norm_arg, (opt_test_f)nc }, + { NULL, 0, NULL, NULL } }; VERBOSE("preinit() called with arg: %s\n", arg); From subversion at mplayerhq.hu Sun Mar 15 13:45:17 2009 From: subversion at mplayerhq.hu (diego) Date: Sun, 15 Mar 2009 13:45:17 +0100 (CET) Subject: [MPlayer-cvslog] r28959 - in trunk: libaf/af_ladspa.c libmpcodecs/ad.c libmpcodecs/vf_bmovl.c libmpcodecs/vf_framestep.c libmpcodecs/vf_tile.c libvo/spuenc.c libvo/spuenc.h osdep/getch2-os2.c sub_cc.c Message-ID: <20090315124517.6E9453B593@natsuki.mplayerhq.hu> Author: diego Date: Sun Mar 15 13:45:16 2009 New Revision: 28959 Log: cosmetics: Remove file names from file header, it only causes trouble. Modified: trunk/libaf/af_ladspa.c trunk/libmpcodecs/ad.c trunk/libmpcodecs/vf_bmovl.c trunk/libmpcodecs/vf_framestep.c trunk/libmpcodecs/vf_tile.c trunk/libvo/spuenc.c trunk/libvo/spuenc.h trunk/osdep/getch2-os2.c trunk/sub_cc.c Modified: trunk/libaf/af_ladspa.c ============================================================================== --- trunk/libaf/af_ladspa.c Sun Mar 15 11:13:44 2009 (r28958) +++ trunk/libaf/af_ladspa.c Sun Mar 15 13:45:16 2009 (r28959) @@ -1,5 +1,5 @@ /* - * af_ladspa.c, LADSPA plugin loader + * LADSPA plugin loader * * Written by Ivo van Poorten * Copyright (C) 2004, 2005 Modified: trunk/libmpcodecs/ad.c ============================================================================== --- trunk/libmpcodecs/ad.c Sun Mar 15 11:13:44 2009 (r28958) +++ trunk/libmpcodecs/ad.c Sun Mar 15 13:45:16 2009 (r28959) @@ -1,6 +1,4 @@ -/* - ad.c - audio decoder interface -*/ +/* audio decoder interface */ #include #include Modified: trunk/libmpcodecs/vf_bmovl.c ============================================================================== --- trunk/libmpcodecs/vf_bmovl.c Sun Mar 15 11:13:44 2009 (r28958) +++ trunk/libmpcodecs/vf_bmovl.c Sun Mar 15 13:45:16 2009 (r28959) @@ -1,5 +1,5 @@ /* - * vf_bmovl.c v0.9.1 - BitMap OVerLay video filter for MPlayer + * BitMap OVerLay video filter for MPlayer * * (C) 2002 Per Wigren * Modified: trunk/libmpcodecs/vf_framestep.c ============================================================================== --- trunk/libmpcodecs/vf_framestep.c Sun Mar 15 11:13:44 2009 (r28958) +++ trunk/libmpcodecs/vf_framestep.c Sun Mar 15 13:45:16 2009 (r28959) @@ -1,6 +1,5 @@ /* - * vf_fstep.c - filter to ouput only 1 every n frame, or only the I (key) - * frame + * filter to ouput only 1 every n frame, or only the I (key)frame * * The parameters are: * Modified: trunk/libmpcodecs/vf_tile.c ============================================================================== --- trunk/libmpcodecs/vf_tile.c Sun Mar 15 11:13:44 2009 (r28958) +++ trunk/libmpcodecs/vf_tile.c Sun Mar 15 13:45:16 2009 (r28959) @@ -1,5 +1,5 @@ /* - * vf_tile.c - filter to tile a serie of image in a single, bigger, image + * filter to tile a serie of image in a single, bigger, image * * The parameters are: * Modified: trunk/libvo/spuenc.c ============================================================================== --- trunk/libvo/spuenc.c Sun Mar 15 11:13:44 2009 (r28958) +++ trunk/libvo/spuenc.c Sun Mar 15 13:45:16 2009 (r28959) @@ -1,5 +1,5 @@ /* - * subpic_encode.c - encodes a pixmap with RLE + * encode a pixmap with RLE * * Copyright (C) 2000 Alejandro J. Cura * Modified: trunk/libvo/spuenc.h ============================================================================== --- trunk/libvo/spuenc.h Sun Mar 15 11:13:44 2009 (r28958) +++ trunk/libvo/spuenc.h Sun Mar 15 13:45:16 2009 (r28959) @@ -1,5 +1,5 @@ /* - * subpic_encode.c - encodes a pixmap with RLE + * encode a pixmap with RLE * * Copyright (C) 2000 Alejandro J. Cura * Modified: trunk/osdep/getch2-os2.c ============================================================================== --- trunk/osdep/getch2-os2.c Sun Mar 15 11:13:44 2009 (r28958) +++ trunk/osdep/getch2-os2.c Sun Mar 15 13:45:16 2009 (r28959) @@ -1,5 +1,5 @@ /* - * getch2-os2.c : OS/2 TermIO for MPlayer + * OS/2 TermIO * * Copyright (c) 2007 KO Myung-Hun (komh at chollian.net) * Modified: trunk/sub_cc.c ============================================================================== --- trunk/sub_cc.c Sun Mar 15 11:13:44 2009 (r28958) +++ trunk/sub_cc.c Sun Mar 15 13:45:16 2009 (r28959) @@ -1,5 +1,5 @@ /* - * sub_cc.c - Decoder for Closed Captions + * decoder for Closed Captions * * This decoder relies on MPlayer's OSD to display subtitles. * Be warned that the decoding is somewhat preliminary, though it basically works. @@ -130,7 +130,7 @@ static void append_char(char c) { if(cursor_pos==CC_MAX_LINE_LENGTH-1) { - fprintf(stderr,"sub_cc.c: append_char() reached CC_MAX_LINE_LENGTH!\n"); + fprintf(stderr,"CC: append_char() reached CC_MAX_LINE_LENGTH!\n"); return; } bb->text[bb->lines - 1][cursor_pos++]=c; From subversion at mplayerhq.hu Sun Mar 15 17:12:06 2009 From: subversion at mplayerhq.hu (reimar) Date: Sun, 15 Mar 2009 17:12:06 +0100 (CET) Subject: [MPlayer-cvslog] r28962 - trunk/stream/tvi_v4l2.c Message-ID: <20090315161206.868723B1AE@natsuki.mplayerhq.hu> Author: reimar Date: Sun Mar 15 17:12:05 2009 New Revision: 28962 Log: 100l fix calculation of dropped frames, number of frames is time * fps, not time / fps. Modified: trunk/stream/tvi_v4l2.c Modified: trunk/stream/tvi_v4l2.c ============================================================================== --- trunk/stream/tvi_v4l2.c Sun Mar 15 14:10:33 2009 (r28961) +++ trunk/stream/tvi_v4l2.c Sun Mar 15 17:12:05 2009 (r28962) @@ -1126,7 +1126,7 @@ static int uninit(priv_t *priv) struct v4l2_buffer buf; /* get performance */ - frames = 1 + lrintf((double)(priv->curr_frame - priv->first_frame) / (1e6 * getfps(priv))); + frames = 1 + lrintf((double)(priv->curr_frame - priv->first_frame) / 1e6 * getfps(priv)); dropped = frames - priv->frames; /* turn off streaming */ From subversion at mplayerhq.hu Sun Mar 15 17:37:07 2009 From: subversion at mplayerhq.hu (reimar) Date: Sun, 15 Mar 2009 17:37:07 +0100 (CET) Subject: [MPlayer-cvslog] r28963 - trunk/libmpcodecs/ae_lavc.c Message-ID: <20090315163707.1228C3B641@natsuki.mplayerhq.hu> Author: reimar Date: Sun Mar 15 17:37:06 2009 New Revision: 28963 Log: Avoid ridiculously small decode_buffer_size (e.g. 4 with acodec=pcm_s16le) that can make -oac lavc unusable. Modified: trunk/libmpcodecs/ae_lavc.c Modified: trunk/libmpcodecs/ae_lavc.c ============================================================================== --- trunk/libmpcodecs/ae_lavc.c Sun Mar 15 17:12:05 2009 (r28962) +++ trunk/libmpcodecs/ae_lavc.c Sun Mar 15 17:37:06 2009 (r28963) @@ -248,6 +248,7 @@ int mpae_init_lavc(audio_encoder_t *enco } encoder->decode_buffer_size = lavc_actx->frame_size * 2 * encoder->params.channels; + while (encoder->decode_buffer_size < 1024) encoder->decode_buffer_size *= 2; encoder->bind = bind_lavc; encoder->get_frame_size = get_frame_size; encoder->encode = encode_lavc; From subversion at mplayerhq.hu Sun Mar 15 21:02:45 2009 From: subversion at mplayerhq.hu (iive) Date: Sun, 15 Mar 2009 21:02:45 +0100 (CET) Subject: [MPlayer-cvslog] r28965 - trunk/libvo/vo_xvmc.c Message-ID: <20090315200245.7924950005@natsuki.mplayerhq.hu> Author: iive Date: Sun Mar 15 21:02:45 2009 New Revision: 28965 Log: Fix warning. Put fogotten int. Modified: trunk/libvo/vo_xvmc.c Modified: trunk/libvo/vo_xvmc.c ============================================================================== --- trunk/libvo/vo_xvmc.c Sun Mar 15 19:54:25 2009 (r28964) +++ trunk/libvo/vo_xvmc.c Sun Mar 15 21:02:45 2009 (r28965) @@ -226,7 +226,7 @@ return -1;//fail //print all info needed to add new format static void print_xvimage_format_values(XvImageFormatValues *xifv){ int i; - const msgl=MSGL_DBG4; + const int msgl=MSGL_DBG4; mp_msg(MSGT_VO,msgl,"Format_ID = 0x%X\n",xifv->id); From subversion at mplayerhq.hu Sun Mar 15 21:28:07 2009 From: subversion at mplayerhq.hu (diego) Date: Sun, 15 Mar 2009 21:28:07 +0100 (CET) Subject: [MPlayer-cvslog] [propchange]: r28965 - svn:log Message-ID: <20090315202807.E6CA63B6AC@natsuki.mplayerhq.hu> Author: diego Revision: 28965 Property Name: svn:log Action: modified Property diff: --- old property value +++ new property value @@ -1,2 +1 @@ -Fix warning. Put fogotten int. - +Fix warning: Add forgotten 'int' to variable declaration. From subversion at mplayerhq.hu Sun Mar 15 21:34:03 2009 From: subversion at mplayerhq.hu (diego) Date: Sun, 15 Mar 2009 21:34:03 +0100 (CET) Subject: [MPlayer-cvslog] r28966 - trunk/cpuinfo.c Message-ID: <20090315203403.506403B6C5@natsuki.mplayerhq.hu> Author: diego Date: Sun Mar 15 21:34:02 2009 New Revision: 28966 Log: Add some parentheses to silence the warnings: cpuinfo.c:293: warning: suggest parentheses around && within || cpuinfo.c:297: warning: suggest parentheses around && within || Modified: trunk/cpuinfo.c Modified: trunk/cpuinfo.c ============================================================================== --- trunk/cpuinfo.c Sun Mar 15 21:02:45 2009 (r28965) +++ trunk/cpuinfo.c Sun Mar 15 21:34:02 2009 (r28966) @@ -290,11 +290,11 @@ main(void) have to check the family, model and stepping instead. */ if (strstr(idstr, "AMD") && family == 5 && - (model >= 9 || model == 8 && stepping >= 8)) + (model >= 9 || (model == 8 && stepping >= 8))) printf(" %s", "k6_mtrr"); /* similar for cyrix_arr. */ if (strstr(idstr, "Cyrix") && - (family == 5 && model < 4 || family == 6)) + (family == 5 && (model < 4 || family == 6))) printf(" %s", "cyrix_arr"); /* as well as centaur_mcr. */ if (strstr(idstr, "Centaur") && From subversion at mplayerhq.hu Sun Mar 15 21:40:48 2009 From: subversion at mplayerhq.hu (diego) Date: Sun, 15 Mar 2009 21:40:48 +0100 (CET) Subject: [MPlayer-cvslog] r28967 - trunk Message-ID: <20090315204048.796263B67D@natsuki.mplayerhq.hu> Author: diego Date: Sun Mar 15 21:40:48 2009 New Revision: 28967 Log: Ignore generated files 'tags' and 'cpuinfo'. Modified: trunk/ (props changed) From subversion at mplayerhq.hu Sun Mar 15 22:20:07 2009 From: subversion at mplayerhq.hu (cehoyos) Date: Sun, 15 Mar 2009 22:20:07 +0100 (CET) Subject: [MPlayer-cvslog] r28968 - in trunk: DOCS/man/en/mplayer.1 libvo/vo_vdpau.c Message-ID: <20090315212007.245153B5A7@natsuki.mplayerhq.hu> Author: cehoyos Date: Sun Mar 15 22:20:06 2009 New Revision: 28968 Log: Initial support for advanced VDPAU deinterlacers (software-decoded video only). With a lot of help from Reimar Modified: trunk/libvo/vo_vdpau.c Changes in other areas also in this revision: Modified: trunk/DOCS/man/en/mplayer.1 Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Sun Mar 15 21:40:48 2009 (r28967) +++ trunk/libvo/vo_vdpau.c Sun Mar 15 22:20:06 2009 (r28968) @@ -147,11 +147,13 @@ static void /* output_surfaces[NUM_OUTPUT_SURFACES] is misused for OSD. */ #define osd_surface output_surfaces[NUM_OUTPUT_SURFACES] static VdpOutputSurface output_surfaces[NUM_OUTPUT_SURFACES + 1]; +static VdpVideoSurface deint_surfaces[3]; static int output_surface_width, output_surface_height; static VdpVideoMixer video_mixer; static int deint; static int deint_type; +static int deint_counter; static int pullup; static float denoise; static float sharpen; @@ -212,11 +214,9 @@ static void video_to_output_surface(void VdpTime dummy; VdpStatus vdp_st; int i; - if (vid_surface_num < 0) + if (vid_surface_num < 0 || deint_surfaces[0] == VDP_INVALID_HANDLE) return; - // we would need to provide 2 past and 1 future frames to allow advanced - // deinterlacing, which is not really possible currently. for (i = 0; i <= !!(deint > 1); i++) { int field = VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME; VdpOutputSurface output_surface; @@ -236,9 +236,10 @@ static void video_to_output_surface(void CHECK_ST_WARNING("Error when calling vdp_presentation_queue_block_until_surface_idle") vdp_st = vdp_video_mixer_render(video_mixer, VDP_INVALID_HANDLE, 0, - field, 0, NULL, - surface_render[vid_surface_num].surface, - 0, NULL, &src_rect_vid, + field, 2, deint_surfaces + 1, + deint_surfaces[0], + 1, &surface_render[vid_surface_num].surface, + &src_rect_vid, output_surface, NULL, &out_rect_vid, 0, NULL); CHECK_ST_WARNING("Error when calling vdp_video_mixer_render") @@ -407,7 +408,6 @@ static int create_vdp_mixer(VdpChromaTyp &vid_height, &vdp_chroma_type }; - if (deint == 3) features[feature_count++] = VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL; if (deint == 4) features[feature_count++] = VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL_SPATIAL; @@ -425,6 +425,8 @@ static int create_vdp_mixer(VdpChromaTyp CHECK_ST_ERROR("Error when calling vdp_video_mixer_create") for (i = 0; i < feature_count; i++) feature_enables[i] = VDP_TRUE; + if (deint < 3) + feature_enables[0] = VDP_FALSE; if (feature_count) vdp_video_mixer_set_feature_enables(video_mixer, feature_count, features, feature_enables); if (denoise) @@ -472,7 +474,7 @@ static int config(uint32_t width, uint32 XSetWindowAttributes xswa; XWindowAttributes attribs; unsigned long xswamask; - int depth; + int depth, i; #ifdef CONFIG_XF86VM int vm = flags & VOFLAG_MODESWITCHING; @@ -541,6 +543,9 @@ static int config(uint32_t width, uint32 vid_surface_num = -1; resize(); + for (i = 0; i < 3; i++) + deint_surfaces[i] = VDP_INVALID_HANDLE; + return 0; } @@ -837,10 +842,12 @@ static uint32_t draw_image(mp_image_t *m if (IMGFMT_IS_VDPAU(image_format)) { struct vdpau_render_state *rndr = mpi->priv; vid_surface_num = rndr - surface_render; + deint = FFMIN(deint, 2); } else if (!(mpi->flags & MP_IMGFLAG_DRAW_CALLBACK)) { VdpStatus vdp_st; void *destdata[3] = {mpi->planes[0], mpi->planes[2], mpi->planes[1]}; - struct vdpau_render_state *rndr = get_surface(0); + struct vdpau_render_state *rndr = get_surface(deint_counter); + deint_counter = (deint_counter + 1) & 3; vid_surface_num = rndr - surface_render; vdp_st = vdp_video_surface_put_bits_y_cb_cr(rndr->surface, VDP_YCBCR_FORMAT_YV12, @@ -850,7 +857,12 @@ static uint32_t draw_image(mp_image_t *m } top_field_first = !!(mpi->fields & MP_IMGFIELD_TOP_FIRST); + if (deint < 3) + deint_surfaces[0] = surface_render[vid_surface_num].surface; video_to_output_surface(); + deint_surfaces[2] = deint_surfaces[1]; + deint_surfaces[1] = deint_surfaces[0]; + deint_surfaces[0] = surface_render[vid_surface_num].surface; return VO_TRUE; } @@ -984,6 +996,7 @@ static int preinit(const char *arg) deint = 0; deint_type = 3; + deint_counter = 0; pullup = 0; denoise = 0; sharpen = 0; @@ -1087,6 +1100,18 @@ static int control(uint32_t request, voi deint = *(int*)data; if (deint) deint = deint_type; + if (deint_type > 2) { + VdpStatus vdp_st; + VdpVideoMixerFeature features[1] = + {deint_type == 3 ? + VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL : + VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL_SPATIAL}; + VdpBool feature_enables[1] = {deint ? VDP_TRUE : VDP_FALSE}; + vdp_st = vdp_video_mixer_set_feature_enables(video_mixer, 1, + features, + feature_enables); + CHECK_ST_WARNING("Error changing deinterlacing settings") + } return VO_TRUE; case VOCTRL_PAUSE: return (int_pause = 1); From uoti.urpala at pp1.inet.fi Sun Mar 15 22:24:22 2009 From: uoti.urpala at pp1.inet.fi (Uoti Urpala) Date: Sun, 15 Mar 2009 23:24:22 +0200 Subject: [MPlayer-cvslog] r28968 - in trunk: DOCS/man/en/mplayer.1 libvo/vo_vdpau.c In-Reply-To: <20090315212007.245153B5A7@natsuki.mplayerhq.hu> References: <20090315212007.245153B5A7@natsuki.mplayerhq.hu> Message-ID: <1237152262.18616.2.camel@glyph.nonexistent.invalid> On Sun, 2009-03-15 at 22:20 +0100, cehoyos wrote: > - // we would need to provide 2 past and 1 future frames to allow advanced > - // deinterlacing, which is not really possible currently. Does it use the mode referred to above now? Since you're not feeding it any "future" frames, does this mean the vo has an incorrect delay when this mode is active? From subversion at mplayerhq.hu Sun Mar 15 22:26:10 2009 From: subversion at mplayerhq.hu (cehoyos) Date: Sun, 15 Mar 2009 22:26:10 +0100 (CET) Subject: [MPlayer-cvslog] r28969 - trunk/libvo/vo_vdpau.c Message-ID: <20090315212610.CF4C33B5A8@natsuki.mplayerhq.hu> Author: cehoyos Date: Sun Mar 15 22:26:10 2009 New Revision: 28969 Log: Cosmetics: Fix whitespace. Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Sun Mar 15 22:20:06 2009 (r28968) +++ trunk/libvo/vo_vdpau.c Sun Mar 15 22:26:10 2009 (r28969) @@ -408,7 +408,7 @@ static int create_vdp_mixer(VdpChromaTyp &vid_height, &vdp_chroma_type }; - features[feature_count++] = VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL; + features[feature_count++] = VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL; if (deint == 4) features[feature_count++] = VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL_SPATIAL; if (pullup) From cehoyos at ag.or.at Sun Mar 15 22:42:30 2009 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Sun, 15 Mar 2009 21:42:30 +0000 (UTC) Subject: [MPlayer-cvslog] =?utf-8?q?r28968_-_in_trunk=3A_DOCS/man/en/mplay?= =?utf-8?q?er=2E1_libvo/vo=5Fvdpau=2Ec?= References: <20090315212007.245153B5A7@natsuki.mplayerhq.hu> <1237152262.18616.2.camel@glyph.nonexistent.invalid> Message-ID: Uoti Urpala pp1.inet.fi> writes: > On Sun, 2009-03-15 at 22:20 +0100, cehoyos wrote: > > - // we would need to provide 2 past and 1 future frames to allow advanced > > - // deinterlacing, which is not really possible currently. > > Does it use the mode referred to above now? Since you're not feeding it > any "future" frames, does this mean the vo has an incorrect delay when > this mode is active? It has a delay of 1 for advanced deinterlacing. This is stated in the manual. Carl Eugen From subversion at mplayerhq.hu Sun Mar 15 22:48:52 2009 From: subversion at mplayerhq.hu (cehoyos) Date: Sun, 15 Mar 2009 22:48:52 +0100 (CET) Subject: [MPlayer-cvslog] r28970 - trunk/libvo/vo_vdpau.c Message-ID: <20090315214852.8C6433B5F6@natsuki.mplayerhq.hu> Author: cehoyos Date: Sun Mar 15 22:48:52 2009 New Revision: 28970 Log: Update -vo vdpau command line help. Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Sun Mar 15 22:26:10 2009 (r28969) +++ trunk/libvo/vo_vdpau.c Sun Mar 15 22:48:52 2009 (r28970) @@ -977,11 +977,11 @@ static const char help_msg[] = " deint (all modes > 0 respect -field-dominance)\n" " 0: no deinterlacing\n" " 1: only show first field\n" - " 2: bob deinterlacing (current fallback)\n" - " 3: temporal deinterlacing (not yet working)\n" - " 4: temporal-spatial deinterlacing (not yet working)\n" + " 2: bob deinterlacing (current fallback for hardware decoding)\n" + " 3: temporal deinterlacing (only works with software codecs)\n" + " 4: temporal-spatial deinterlacing (only works with software codecs)\n" " pullup\n" - " Try to apply inverse-telecine (needs deinterlacing, not working)\n" + " Try to apply inverse-telecine (needs temporal deinterlacing)\n" " denoise\n" " Apply denoising, argument is strength from 0.0 to 1.0\n" " sharpen\n" From subversion at mplayerhq.hu Sun Mar 15 23:19:05 2009 From: subversion at mplayerhq.hu (cehoyos) Date: Sun, 15 Mar 2009 23:19:05 +0100 (CET) Subject: [MPlayer-cvslog] r28971 - trunk/libvo/vo_vdpau.c Message-ID: <20090315221905.A0D6C3B6B7@natsuki.mplayerhq.hu> Author: cehoyos Date: Sun Mar 15 23:19:05 2009 New Revision: 28971 Log: Move initialisation of deint_surfaces[] to free_video_specific(). Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Sun Mar 15 22:48:52 2009 (r28970) +++ trunk/libvo/vo_vdpau.c Sun Mar 15 23:19:05 2009 (r28971) @@ -447,6 +447,9 @@ static void free_video_specific(void) { decoder = VDP_INVALID_HANDLE; decoder_max_refs = -1; + for (i = 0; i < 3; i++) + deint_surfaces[i] = VDP_INVALID_HANDLE; + for (i = 0; i < MAX_VIDEO_SURFACES; i++) { if (surface_render[i].surface != VDP_INVALID_HANDLE) { vdp_st = vdp_video_surface_destroy(surface_render[i].surface); @@ -474,7 +477,7 @@ static int config(uint32_t width, uint32 XSetWindowAttributes xswa; XWindowAttributes attribs; unsigned long xswamask; - int depth, i; + int depth; #ifdef CONFIG_XF86VM int vm = flags & VOFLAG_MODESWITCHING; @@ -543,9 +546,6 @@ static int config(uint32_t width, uint32 vid_surface_num = -1; resize(); - for (i = 0; i < 3; i++) - deint_surfaces[i] = VDP_INVALID_HANDLE; - return 0; } From uoti.urpala at pp1.inet.fi Mon Mar 16 00:20:31 2009 From: uoti.urpala at pp1.inet.fi (Uoti Urpala) Date: Mon, 16 Mar 2009 01:20:31 +0200 Subject: [MPlayer-cvslog] r28968 - in trunk: DOCS/man/en/mplayer.1 libvo/vo_vdpau.c In-Reply-To: References: <20090315212007.245153B5A7@natsuki.mplayerhq.hu> <1237152262.18616.2.camel@glyph.nonexistent.invalid> Message-ID: <1237159231.18616.50.camel@glyph.nonexistent.invalid> On Sun, 2009-03-15 at 21:42 +0000, Carl Eugen Hoyos wrote: > Uoti Urpala pp1.inet.fi> writes: > > > On Sun, 2009-03-15 at 22:20 +0100, cehoyos wrote: > > > - // we would need to provide 2 past and 1 future frames to allow advanced > > > - // deinterlacing, which is not really possible currently. > > > > Does it use the mode referred to above now? Since you're not feeding it > > any "future" frames, does this mean the vo has an incorrect delay when > > this mode is active? > > It has a delay of 1 for advanced deinterlacing. This is stated in the manual. So it is. I didn't notice that because you had committed the mention about the limitation _before_ there actually was code with such a limitation. I could fix this pretty easily in the git tree, but if you and Reimar still want to maintain vo_vdpau in the svn tree for now and work on it somewhat actively then it may be better to wait to avoid unnecessary merging of later changes. From subversion at mplayerhq.hu Mon Mar 16 15:25:04 2009 From: subversion at mplayerhq.hu (reimar) Date: Mon, 16 Mar 2009 15:25:04 +0100 (CET) Subject: [MPlayer-cvslog] r28974 - trunk/libvo/vo_gl.c Message-ID: <20090316142504.16D8A3B16B@natsuki.mplayerhq.hu> Author: reimar Date: Mon Mar 16 15:25:03 2009 New Revision: 28974 Log: Check mpi type before returning an DR buffer in get_image, fixes jerkiness with MPEG1/2 and -dr -slices Modified: trunk/libvo/vo_gl.c Modified: trunk/libvo/vo_gl.c ============================================================================== --- trunk/libvo/vo_gl.c Mon Mar 16 11:29:30 2009 (r28973) +++ trunk/libvo/vo_gl.c Mon Mar 16 15:25:03 2009 (r28974) @@ -765,6 +765,9 @@ static uint32_t get_image(mp_image_t *mp return VO_FALSE; } if (mpi->flags & MP_IMGFLAG_READABLE) return VO_FALSE; + if (mpi->type != MP_IMGTYPE_STATIC && mpi->type != MP_IMGTYPE_TEMP && + (mpi->type != MP_IMGTYPE_NUMBERED || mpi->number)) + return VO_FALSE; if (mesa_buffer) mpi->width = texture_width; else if (ati_hack) { mpi->width = texture_width; From subversion at mplayerhq.hu Mon Mar 16 18:12:29 2009 From: subversion at mplayerhq.hu (reimar) Date: Mon, 16 Mar 2009 18:12:29 +0100 (CET) Subject: [MPlayer-cvslog] r28975 - in trunk/stream: tv.c tv.h tvi_v4l2.c Message-ID: <20090316171229.C968F3B213@natsuki.mplayerhq.hu> Author: reimar Date: Mon Mar 16 18:12:29 2009 New Revision: 28975 Log: Add TVI_CONTROL_VID_SET_WIDTH_HEIGHT to set width and height together for v4l2, otherwise some drivers will always stay stuck in the lowest resolution. Modified: trunk/stream/tv.c trunk/stream/tv.h trunk/stream/tvi_v4l2.c Modified: trunk/stream/tv.c ============================================================================== --- trunk/stream/tv.c Mon Mar 16 15:25:03 2009 (r28974) +++ trunk/stream/tv.c Mon Mar 16 18:12:29 2009 (r28975) @@ -439,6 +439,12 @@ static int open_tv(tvi_handle_t *tvh) #endif /* limits on w&h are norm-dependent -- JM */ + if (tvh->tv_param->width != -1 && tvh->tv_param->height != -1) { + // first tell the driver both width and height, some drivers do not support setting them independently. + int dim[2]; + dim[0] = tvh->tv_param->width; dim[1] = tvh->tv_param->height; + funcs->control(tvh->priv, TVI_CONTROL_VID_SET_WIDTH_HEIGHT, dim); + } /* set width */ if (tvh->tv_param->width != -1) { Modified: trunk/stream/tv.h ============================================================================== --- trunk/stream/tv.h Mon Mar 16 15:25:03 2009 (r28974) +++ trunk/stream/tv.h Mon Mar 16 18:12:29 2009 (r28975) @@ -175,6 +175,7 @@ typedef struct { #define TVI_CONTROL_VID_SET_PICTURE 0x11e #define TVI_CONTROL_VID_SET_GAIN 0x11f #define TVI_CONTROL_VID_GET_GAIN 0x120 +#define TVI_CONTROL_VID_SET_WIDTH_HEIGHT 0x121 /* TUNER controls */ #define TVI_CONTROL_TUN_GET_FREQ 0x201 Modified: trunk/stream/tvi_v4l2.c ============================================================================== --- trunk/stream/tvi_v4l2.c Mon Mar 16 15:25:03 2009 (r28974) +++ trunk/stream/tvi_v4l2.c Mon Mar 16 18:12:29 2009 (r28975) @@ -780,6 +780,14 @@ static int control(priv_t *priv, int cmd return TVI_CONTROL_TRUE; case TVI_CONTROL_VID_CHK_WIDTH: return TVI_CONTROL_TRUE; + case TVI_CONTROL_VID_SET_WIDTH_HEIGHT: + if (getfmt(priv) < 0) return TVI_CONTROL_FALSE; + priv->format.fmt.pix.width = ((int *)arg)[0]; + priv->format.fmt.pix.height = ((int *)arg)[1]; + priv->format.fmt.pix.field = V4L2_FIELD_ANY; + if (ioctl(priv->video_fd, VIDIOC_S_FMT, &priv->format) < 0) + return TVI_CONTROL_FALSE; + return TVI_CONTROL_TRUE; case TVI_CONTROL_VID_SET_WIDTH: if (getfmt(priv) < 0) return TVI_CONTROL_FALSE; priv->format.fmt.pix.width = *(int *)arg; From subversion at mplayerhq.hu Mon Mar 16 20:26:20 2009 From: subversion at mplayerhq.hu (eugeni) Date: Mon, 16 Mar 2009 20:26:20 +0100 (CET) Subject: [MPlayer-cvslog] r28976 - trunk/libass/ass_fontconfig.c Message-ID: <20090316192620.400453B277@natsuki.mplayerhq.hu> Author: eugeni Date: Mon Mar 16 20:26:19 2009 New Revision: 28976 Log: Fix uninitialized memory access in ass_fontconfig. This fixes hangups with plaintext subtitles happening when the first subtitle is about to be displayed. Modified: trunk/libass/ass_fontconfig.c Modified: trunk/libass/ass_fontconfig.c ============================================================================== --- trunk/libass/ass_fontconfig.c Mon Mar 16 18:12:29 2009 (r28975) +++ trunk/libass/ass_fontconfig.c Mon Mar 16 20:26:19 2009 (r28976) @@ -160,11 +160,13 @@ static char* _select_font(fc_instance_t* goto error; #if (FC_VERSION >= 20297) + if (!treat_family_as_pattern) { // Remove all extra family names from original pattern. // After this, FcFontRenderPrepare will select the most relevant family // name in case there are more than one of them. for (; family_cnt > 1; --family_cnt) FcPatternRemove(pat, FC_FAMILY, family_cnt - 1); + } #endif rpat = FcFontRenderPrepare(priv->config, pat, fset->fonts[curf]); From subversion at mplayerhq.hu Mon Mar 16 20:26:23 2009 From: subversion at mplayerhq.hu (eugeni) Date: Mon, 16 Mar 2009 20:26:23 +0100 (CET) Subject: [MPlayer-cvslog] r28977 - trunk/libass/ass_fontconfig.c Message-ID: <20090316192623.9FCEE3B282@natsuki.mplayerhq.hu> Author: eugeni Date: Mon Mar 16 20:26:23 2009 New Revision: 28977 Log: Cosmetics: reindent. Modified: trunk/libass/ass_fontconfig.c Modified: trunk/libass/ass_fontconfig.c ============================================================================== --- trunk/libass/ass_fontconfig.c Mon Mar 16 20:26:19 2009 (r28976) +++ trunk/libass/ass_fontconfig.c Mon Mar 16 20:26:23 2009 (r28977) @@ -161,11 +161,11 @@ static char* _select_font(fc_instance_t* #if (FC_VERSION >= 20297) if (!treat_family_as_pattern) { - // Remove all extra family names from original pattern. - // After this, FcFontRenderPrepare will select the most relevant family - // name in case there are more than one of them. - for (; family_cnt > 1; --family_cnt) - FcPatternRemove(pat, FC_FAMILY, family_cnt - 1); + // Remove all extra family names from original pattern. + // After this, FcFontRenderPrepare will select the most relevant family + // name in case there are more than one of them. + for (; family_cnt > 1; --family_cnt) + FcPatternRemove(pat, FC_FAMILY, family_cnt - 1); } #endif From subversion at mplayerhq.hu Tue Mar 17 00:03:19 2009 From: subversion at mplayerhq.hu (cehoyos) Date: Tue, 17 Mar 2009 00:03:19 +0100 (CET) Subject: [MPlayer-cvslog] r28979 - in trunk: DOCS/man/en/mplayer.1 libvo/vo_vdpau.c Message-ID: <20090316230319.E5FB73B12E@natsuki.mplayerhq.hu> Author: cehoyos Date: Tue Mar 17 00:03:18 2009 New Revision: 28979 Log: Add chroma-deint option to vo vdpau (nochroma-deint speeds up deinterlacing). Modified: trunk/libvo/vo_vdpau.c Changes in other areas also in this revision: Modified: trunk/DOCS/man/en/mplayer.1 Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Mon Mar 16 21:04:32 2009 (r28978) +++ trunk/libvo/vo_vdpau.c Tue Mar 17 00:03:18 2009 (r28979) @@ -157,6 +157,7 @@ static int static int pullup; static float denoise; static float sharpen; +static int chroma_deint; static int top_field_first; static VdpDecoder decoder; @@ -398,6 +399,9 @@ static int create_vdp_mixer(VdpChromaTyp const void * const denoise_value[] = {&denoise}; static const VdpVideoMixerAttribute sharpen_attrib[] = {VDP_VIDEO_MIXER_ATTRIBUTE_SHARPNESS_LEVEL}; const void * const sharpen_value[] = {&sharpen}; + static const VdpVideoMixerAttribute skip_chroma_attrib[] = {VDP_VIDEO_MIXER_ATTRIBUTE_SKIP_CHROMA_DEINTERLACE}; + const uint8_t skip_chroma_value = 1; + const void * const skip_chroma_value_ptr[] = {&skip_chroma_value}; static const VdpVideoMixerParameter parameters[VDP_NUM_MIXER_PARAMETER] = { VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_WIDTH, VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_HEIGHT, @@ -433,6 +437,8 @@ static int create_vdp_mixer(VdpChromaTyp vdp_video_mixer_set_attribute_values(video_mixer, 1, denoise_attrib, denoise_value); if (sharpen) vdp_video_mixer_set_attribute_values(video_mixer, 1, sharpen_attrib, sharpen_value); + if (!chroma_deint) + vdp_video_mixer_set_attribute_values(video_mixer, 1, skip_chroma_attrib, skip_chroma_value_ptr); return 0; } @@ -964,6 +970,7 @@ static void uninit(void) static const opt_t subopts[] = { {"deint", OPT_ARG_INT, &deint, (opt_test_f)int_non_neg}, + {"chroma-deint", OPT_ARG_BOOL, &chroma_deint, NULL}, {"pullup", OPT_ARG_BOOL, &pullup, NULL}, {"denoise", OPT_ARG_FLOAT, &denoise, NULL}, {"sharpen", OPT_ARG_FLOAT, &sharpen, NULL}, @@ -980,6 +987,9 @@ static const char help_msg[] = " 2: bob deinterlacing (current fallback for hardware decoding)\n" " 3: temporal deinterlacing (only works with software codecs)\n" " 4: temporal-spatial deinterlacing (only works with software codecs)\n" + " chroma-deint\n" + " Operate on luma and chroma when using temporal deinterlacing (default)\n" + " Use nochroma-deint to speed up temporal deinterlacing\n" " pullup\n" " Try to apply inverse-telecine (needs temporal deinterlacing)\n" " denoise\n" @@ -997,6 +1007,7 @@ static int preinit(const char *arg) deint = 0; deint_type = 3; deint_counter = 0; + chroma_deint = 1; pullup = 0; denoise = 0; sharpen = 0; From subversion at mplayerhq.hu Wed Mar 18 10:17:15 2009 From: subversion at mplayerhq.hu (cehoyos) Date: Wed, 18 Mar 2009 10:17:15 +0100 (CET) Subject: [MPlayer-cvslog] r28989 - trunk/configure Message-ID: <20090318091715.D66F03B635@natsuki.mplayerhq.hu> Author: cehoyos Date: Wed Mar 18 10:17:15 2009 New Revision: 28989 Log: Older versions of will fail during compilation. Modified: trunk/configure Modified: trunk/configure ============================================================================== --- trunk/configure Wed Mar 18 09:06:08 2009 (r28988) +++ trunk/configure Wed Mar 18 10:17:15 2009 (r28989) @@ -4312,7 +4312,7 @@ if test "$_vdpau" = auto ; then if test "$_dl" = yes ; then cat > $TMPC < -int main(void) {return 0;} +int main(void) {return VDP_VIDEO_MIXER_ATTRIBUTE_SKIP_CHROMA_DEINTERLACE;} EOF cc_check && _vdpau=yes fi From Reimar.Doeffinger at gmx.de Wed Mar 18 10:42:36 2009 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Wed, 18 Mar 2009 10:42:36 +0100 Subject: [MPlayer-cvslog] r28989 - trunk/configure In-Reply-To: <20090318091715.D66F03B635@natsuki.mplayerhq.hu> References: <20090318091715.D66F03B635@natsuki.mplayerhq.hu> Message-ID: <20090318094236.GA26444@1und1.de> On Wed, Mar 18, 2009 at 10:17:15AM +0100, cehoyos wrote: > Author: cehoyos > Date: Wed Mar 18 10:17:15 2009 > New Revision: 28989 > > Log: > Older versions of will fail during compilation. While that's good enough, I think it might make sense if they either made use of that VDPAU_VERSION define and increase it for every change of if there was a FFmpeg-like major-minor-micro version number. Some features might be really painful to test for otherwise (meaning most people won't check for them and compilation breaks more often). From subversion at mplayerhq.hu Wed Mar 18 13:50:18 2009 From: subversion at mplayerhq.hu (reimar) Date: Wed, 18 Mar 2009 13:50:18 +0100 (CET) Subject: [MPlayer-cvslog] r28990 - trunk/libmpcodecs/ad_ffmpeg.c Message-ID: <20090318125018.5EDDB6C027@natsuki.mplayerhq.hu> Author: reimar Date: Wed Mar 18 13:50:17 2009 New Revision: 28990 Log: Support FFmpeg codecs that decode to other formats than S16. Double format is currently not supported. Modified: trunk/libmpcodecs/ad_ffmpeg.c Modified: trunk/libmpcodecs/ad_ffmpeg.c ============================================================================== --- trunk/libmpcodecs/ad_ffmpeg.c Wed Mar 18 10:17:15 2009 (r28989) +++ trunk/libmpcodecs/ad_ffmpeg.c Wed Mar 18 13:50:17 2009 (r28990) @@ -112,6 +112,15 @@ static int init(sh_audio_t *sh_audio) sh_audio->channels=lavc_context->channels; sh_audio->samplerate=lavc_context->sample_rate; sh_audio->i_bps=lavc_context->bit_rate/8; + switch (lavc_context->sample_fmt) { + case SAMPLE_FMT_U8: sh_audio->sample_format = AF_FORMAT_U8; break; + case SAMPLE_FMT_S16: sh_audio->sample_format = AF_FORMAT_S16_NE; break; + case SAMPLE_FMT_S32: sh_audio->sample_format = AF_FORMAT_S32_NE; break; + case SAMPLE_FMT_FLT: sh_audio->sample_format = AF_FORMAT_FLOAT_NE; break; + default: + mp_msg(MSGT_DECAUDIO, MSGL_FATAL, "Unsupported sample format\n"); + return 0; + } if(sh_audio->wf){ // If the decoder uses the wrong number of channels all is lost anyway. // sh_audio->channels=sh_audio->wf->nChannels; @@ -120,7 +129,7 @@ static int init(sh_audio_t *sh_audio) if (sh_audio->wf->nAvgBytesPerSec) sh_audio->i_bps=sh_audio->wf->nAvgBytesPerSec; } - sh_audio->samplesize=2; + sh_audio->samplesize=af_fmt2bits(sh_audio->sample_format)/ 8; return 1; } From subversion at mplayerhq.hu Wed Mar 18 18:02:30 2009 From: subversion at mplayerhq.hu (cehoyos) Date: Wed, 18 Mar 2009 18:02:30 +0100 (CET) Subject: [MPlayer-cvslog] r28991 - in trunk: DOCS/man/en/mplayer.1 libmpcodecs/mp_image.h libmpcodecs/vd_ffmpeg.c libmpcodecs/vf.c libvo/vo_vdpau.c Message-ID: <20090318170230.70BA93B478@natsuki.mplayerhq.hu> Author: cehoyos Date: Wed Mar 18 18:02:29 2009 New Revision: 28991 Log: Allow to use vdpau temporal deinterlacers with hardware accelerated decoding. Modified: trunk/libmpcodecs/mp_image.h trunk/libmpcodecs/vd_ffmpeg.c trunk/libmpcodecs/vf.c trunk/libvo/vo_vdpau.c Changes in other areas also in this revision: Modified: trunk/DOCS/man/en/mplayer.1 Modified: trunk/libmpcodecs/mp_image.h ============================================================================== --- trunk/libmpcodecs/mp_image.h Wed Mar 18 13:50:17 2009 (r28990) +++ trunk/libmpcodecs/mp_image.h Wed Mar 18 18:02:29 2009 (r28991) @@ -54,8 +54,6 @@ // buffer type was printed (do NOT set this flag - it's for INTERNAL USE!!!) #define MP_IMGFLAG_TYPE_DISPLAYED 0x8000 -// set if it can not be reused yet (for MP_IMGTYPE_NUMBERED) -#define MP_IMGFLAG_IN_USE 0x10000 // codec doesn't support any form of direct rendering - it has own buffer // allocation. so we just export its buffer pointers: @@ -101,6 +99,7 @@ typedef struct mp_image_s { int chroma_height; int chroma_x_shift; // horizontal int chroma_y_shift; // vertical + int usage_count; /* for private use by filter or vo driver (to store buffer id or dmpi) */ void* priv; } mp_image_t; Modified: trunk/libmpcodecs/vd_ffmpeg.c ============================================================================== --- trunk/libmpcodecs/vd_ffmpeg.c Wed Mar 18 13:50:17 2009 (r28990) +++ trunk/libmpcodecs/vd_ffmpeg.c Wed Mar 18 18:02:29 2009 (r28991) @@ -719,7 +719,7 @@ static void release_buffer(struct AVCode } #endif // release mpi (in case MPI_IMGTYPE_NUMBERED is used, e.g. for VDPAU) - mpi->flags &= ~MP_IMGFLAG_IN_USE; + mpi->usage_count--; } if(pic->type!=FF_BUFFER_TYPE_USER){ Modified: trunk/libmpcodecs/vf.c ============================================================================== --- trunk/libmpcodecs/vf.c Wed Mar 18 13:50:17 2009 (r28990) +++ trunk/libmpcodecs/vf.c Wed Mar 18 18:02:29 2009 (r28991) @@ -304,7 +304,7 @@ mp_image_t* vf_get_image(vf_instance_t* if (number == -1) { int i; for (i = 0; i < NUM_NUMBERED_MPI; i++) - if (!vf->imgctx.numbered_images[i] || !(vf->imgctx.numbered_images[i]->flags & MP_IMGFLAG_IN_USE)) + if (!vf->imgctx.numbered_images[i] || !vf->imgctx.numbered_images[i]->usage_count) break; number = i; } @@ -431,7 +431,7 @@ mp_image_t* vf_get_image(vf_instance_t* mpi->qscale = NULL; } - mpi->flags |= MP_IMGFLAG_IN_USE; + mpi->usage_count++; // printf("\rVF_MPI: %p %p %p %d %d %d \n", // mpi->planes[0],mpi->planes[1],mpi->planes[2], // mpi->stride[0],mpi->stride[1],mpi->stride[2]); Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Wed Mar 18 13:50:17 2009 (r28990) +++ trunk/libvo/vo_vdpau.c Wed Mar 18 18:02:29 2009 (r28991) @@ -148,12 +148,14 @@ static void #define osd_surface output_surfaces[NUM_OUTPUT_SURFACES] static VdpOutputSurface output_surfaces[NUM_OUTPUT_SURFACES + 1]; static VdpVideoSurface deint_surfaces[3]; +static mp_image_t *deint_mpi[3]; static int output_surface_width, output_surface_height; static VdpVideoMixer video_mixer; static int deint; static int deint_type; static int deint_counter; +static int deint_buffer_past_frames; static int pullup; static float denoise; static float sharpen; @@ -456,6 +458,12 @@ static void free_video_specific(void) { for (i = 0; i < 3; i++) deint_surfaces[i] = VDP_INVALID_HANDLE; + for (i = 0; i < 3; i++) + if (deint_mpi[i]) { + deint_mpi[i]->usage_count--; + deint_mpi[i] = NULL; + } + for (i = 0; i < MAX_VIDEO_SURFACES; i++) { if (surface_render[i].surface != VDP_INVALID_HANDLE) { vdp_st = vdp_video_surface_destroy(surface_render[i].surface); @@ -848,7 +856,14 @@ static uint32_t draw_image(mp_image_t *m if (IMGFMT_IS_VDPAU(image_format)) { struct vdpau_render_state *rndr = mpi->priv; vid_surface_num = rndr - surface_render; - deint = FFMIN(deint, 2); + if (deint_buffer_past_frames) { + mpi->usage_count++; + if (deint_mpi[2]) + deint_mpi[2]->usage_count--; + deint_mpi[2] = deint_mpi[1]; + deint_mpi[1] = deint_mpi[0]; + deint_mpi[0] = mpi; + } } else if (!(mpi->flags & MP_IMGFLAG_DRAW_CALLBACK)) { VdpStatus vdp_st; void *destdata[3] = {mpi->planes[0], mpi->planes[2], mpi->planes[1]}; @@ -984,9 +999,9 @@ static const char help_msg[] = " deint (all modes > 0 respect -field-dominance)\n" " 0: no deinterlacing\n" " 1: only show first field\n" - " 2: bob deinterlacing (current fallback for hardware decoding)\n" - " 3: temporal deinterlacing (only works with software codecs)\n" - " 4: temporal-spatial deinterlacing (only works with software codecs)\n" + " 2: bob deinterlacing\n" + " 3: temporal deinterlacing (resource-hungry)\n" + " 4: temporal-spatial deinterlacing (very resource-hungry)\n" " chroma-deint\n" " Operate on luma and chroma when using temporal deinterlacing (default)\n" " Use nochroma-deint to speed up temporal deinterlacing\n" @@ -1007,6 +1022,8 @@ static int preinit(const char *arg) deint = 0; deint_type = 3; deint_counter = 0; + deint_buffer_past_frames = 0; + deint_mpi[0] = deint_mpi[1] = deint_mpi[2] = NULL; chroma_deint = 1; pullup = 0; denoise = 0; @@ -1017,6 +1034,8 @@ static int preinit(const char *arg) } if (deint) deint_type = deint; + if (deint > 2) + deint_buffer_past_frames = 1; vdpau_lib_handle = dlopen(vdpaulibrary, RTLD_LAZY); if (!vdpau_lib_handle) { @@ -1122,6 +1141,7 @@ static int control(uint32_t request, voi features, feature_enables); CHECK_ST_WARNING("Error changing deinterlacing settings") + deint_buffer_past_frames = 1; } return VO_TRUE; case VOCTRL_PAUSE: From subversion at mplayerhq.hu Wed Mar 18 19:17:50 2009 From: subversion at mplayerhq.hu (rathann) Date: Wed, 18 Mar 2009 19:17:50 +0100 (CET) Subject: [MPlayer-cvslog] r28994 - trunk/DOCS/tech/binary-packaging.txt Message-ID: <20090318181750.374173B953@natsuki.mplayerhq.hu> Author: rathann Date: Wed Mar 18 19:17:49 2009 New Revision: 28994 Log: drop obsolete guidelines Modified: trunk/DOCS/tech/binary-packaging.txt Modified: trunk/DOCS/tech/binary-packaging.txt ============================================================================== --- trunk/DOCS/tech/binary-packaging.txt Wed Mar 18 18:12:44 2009 (r28993) +++ trunk/DOCS/tech/binary-packaging.txt Wed Mar 18 19:17:49 2009 (r28994) @@ -52,14 +52,13 @@ the following features MUST be included - XAnim codecs support (*) * general: - - default font - FreeType fonts support - HTML documentation - large file support - man page(s) * input/demuxers: - - DVD(mpdvdkit2) + - DVD(libdvdread4/libdvdnav) - streaming - Matroska(internal) - (S)VCD @@ -108,10 +107,10 @@ for Red Hat and Fedora RPMs I am using F /etc/mplayer/ system-wide configs /usr/bin/ binaries /usr/lib/codecs/ binary codecs +/usr/lib64/codecs/ binary codecs on 64bit Linux /usr/share/doc/mplayer-version/ docs /usr/share/man/man1/ man page /usr/share/man/XX/man1/ translated man page -/usr/share/mplayer/font/ fonts /usr/share/mplayer/skins/ GUI skins You MUST NOT include the codecs.conf file in your package. It is useful @@ -134,12 +133,9 @@ mplayer contains MPlayer binary config files, man pages and documentation; required by mplayer-gui mplayer-codecs-* contain binary codecs available from MPlayer's site -mplayer-font-* contain various bitmap fonts for OSD (obsolete) mplayer-gui contains MPlayer binary with GUI (gmplayer); contains default skin (Blue) mplayer-skin-* contain various MPlayer GUI skins -mplayer-vidix contains VIDIX support library for MPlayer -mplayer-vidix-* contain VIDIX drivers for specific cards, one per package There is no strict policy for now, just use your common sense. From subversion at mplayerhq.hu Wed Mar 18 22:48:35 2009 From: subversion at mplayerhq.hu (cehoyos) Date: Wed, 18 Mar 2009 22:48:35 +0100 (CET) Subject: [MPlayer-cvslog] r28995 - trunk/configure Message-ID: <20090318214835.936896C078@natsuki.mplayerhq.hu> Author: cehoyos Date: Wed Mar 18 22:48:35 2009 New Revision: 28995 Log: Support icc 11.1. Modified: trunk/configure Modified: trunk/configure ============================================================================== --- trunk/configure Wed Mar 18 19:17:49 2009 (r28994) +++ trunk/configure Wed Mar 18 22:48:35 2009 (r28995) @@ -1523,7 +1523,7 @@ if test "`basename $_cc`" = "icc" || tes cc_version="v. ?.??, bad" cc_fail=yes ;; - 10.1|11.0) + 10.1|11.0|11.1) cc_version="$cc_version, ok" ;; *) From subversion at mplayerhq.hu Thu Mar 19 11:05:16 2009 From: subversion at mplayerhq.hu (diego) Date: Thu, 19 Mar 2009 11:05:16 +0100 (CET) Subject: [MPlayer-cvslog] [propchange]: r27835 - svn:log Message-ID: <20090319100516.863433B5B7@natsuki.mplayerhq.hu> Author: diego Revision: 27835 Property Name: svn:log Action: modified Property diff: --- old property value +++ new property value @@ -1 +1 @@ -Remove rgb2rgb.h dependancy. +Remove rgb2rgb.h dependency. From subversion at mplayerhq.hu Sat Mar 21 10:18:37 2009 From: subversion at mplayerhq.hu (diego) Date: Sat, 21 Mar 2009 10:18:37 +0100 (CET) Subject: [MPlayer-cvslog] r29019 - trunk/configure Message-ID: <20090321091837.236326C08A@natsuki.mplayerhq.hu> Author: diego Date: Sat Mar 21 10:18:36 2009 New Revision: 29019 Log: Add CONFIG_SWSCALE_ALPHA and HAVE_VIRTUALALLOC config.h #defines for FFmpeg. Modified: trunk/configure Modified: trunk/configure ============================================================================== --- trunk/configure Fri Mar 20 18:22:03 2009 (r29018) +++ trunk/configure Sat Mar 21 10:18:36 2009 (r29019) @@ -8771,11 +8771,13 @@ $def_yasm #define CONFIG_POWERPC_PERF 0 #define CONFIG_SMALL 0 #define CONFIG_SWSCALE 1 +#define CONFIG_SWSCALE_ALPHA 1 #define HAVE_GETHRTIME 0 #define HAVE_INLINE_ASM 0 #define HAVE_POLL_H 1 #define HAVE_PPC4XX 0 +#define HAVE_VIRTUALALLOC 0 /* Some FFmpeg codecs depend on these. Enable them unconditionally for now. */ #define CONFIG_AANDCT 1 From subversion at mplayerhq.hu Sat Mar 21 10:31:57 2009 From: subversion at mplayerhq.hu (diego) Date: Sat, 21 Mar 2009 10:31:57 +0100 (CET) Subject: [MPlayer-cvslog] r29020 - in trunk/debian: control postinst Message-ID: <20090321093157.529D26C08A@natsuki.mplayerhq.hu> Author: diego Date: Sat Mar 21 10:31:57 2009 New Revision: 29020 Log: Remove postinst script that asks for a TrueType font to use as default. This also gets rid of the libconfhelper-perl dependency; a package that no longer exists in current Debian versions, rendering the generated Debian package uninstallable. patch by Vladislav Naumov, vladislav.naumov gmail com Deleted: trunk/debian/postinst Modified: trunk/debian/control Modified: trunk/debian/control ============================================================================== --- trunk/debian/control Sat Mar 21 10:18:36 2009 (r29019) +++ trunk/debian/control Sat Mar 21 10:31:57 2009 (r29020) @@ -7,7 +7,7 @@ Build-Depends: libgtk1.2-dev | libgtk2.0 Package: mplayer Architecture: any -Depends: ${shlibs:Depends},debconf,libconfhelper-perl +Depends: ${shlibs:Depends},debconf Description: The Ultimate Movie Player MPlayer is a movie player for LINUX (runs on many other Unices, and non-x86 CPUs, see the ports section). It plays most MPEG, VOB, AVI, OGG/OGM, VIVO, From subversion at mplayerhq.hu Sat Mar 21 16:29:41 2009 From: subversion at mplayerhq.hu (diego) Date: Sat, 21 Mar 2009 16:29:41 +0100 (CET) Subject: [MPlayer-cvslog] r29020 - in trunk/debian: control postinst Message-ID: <20090321152941.C5F853BA0C@natsuki.mplayerhq.hu> Author: diego Date: Sat Mar 21 10:31:57 2009 New Revision: 29020 Log: Remove postinst script that asks for a TrueType font to use as default. This also gets rid of the libconfhelper-perl dependency; a package that no longer exists in current Debian versions, rendering the generated Debian package uninstallable. patch by Vladislav Naumov, vladislav.naumov gmail com Deleted: trunk/debian/postinst Modified: trunk/debian/control Modified: trunk/debian/control ============================================================================== --- trunk/debian/control Sat Mar 21 10:18:36 2009 (r29019) +++ trunk/debian/control Sat Mar 21 10:31:57 2009 (r29020) @@ -7,7 +7,7 @@ Build-Depends: libgtk1.2-dev | libgtk2.0 Package: mplayer Architecture: any -Depends: ${shlibs:Depends},debconf,libconfhelper-perl +Depends: ${shlibs:Depends},debconf Description: The Ultimate Movie Player MPlayer is a movie player for LINUX (runs on many other Unices, and non-x86 CPUs, see the ports section). It plays most MPEG, VOB, AVI, OGG/OGM, VIVO, From subversion at mplayerhq.hu Sat Mar 21 17:00:16 2009 From: subversion at mplayerhq.hu (diego) Date: Sat, 21 Mar 2009 17:00:16 +0100 (CET) Subject: [MPlayer-cvslog] r29023 - trunk/configure Message-ID: <20090321160016.8443B3BA20@natsuki.mplayerhq.hu> Author: diego Date: Sat Mar 21 17:00:15 2009 New Revision: 29023 Log: Initialize HAVE_FAST_UNALIGNED definition to 0 so that it is never undefined. Modified: trunk/configure Modified: trunk/configure ============================================================================== --- trunk/configure Sat Mar 21 13:16:32 2009 (r29022) +++ trunk/configure Sat Mar 21 17:00:15 2009 (r29023) @@ -1707,6 +1707,7 @@ fi def_fast_64bit='#define HAVE_FAST_64BIT 0' +def_fast_unaligned='#define HAVE_FAST_UNALIGNED 0' _arch_all='X86 X86_32 X86_64 IA64 SPARC ARM AVR32 SH4 PPC ALPHA SGI_MIPS PA_RISC S390 S390X VAX BFIN XTENSA GENERIC' case "$host_arch" in i[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium*|athlon*|i586-i686) From subversion at mplayerhq.hu Sat Mar 21 18:10:20 2009 From: subversion at mplayerhq.hu (cehoyos) Date: Sat, 21 Mar 2009 18:10:20 +0100 (CET) Subject: [MPlayer-cvslog] r29024 - trunk/libvo/vo_vdpau.c Message-ID: <20090321183440.E89AF3B026@natsuki.mplayerhq.hu> Author: cehoyos Date: Sat Mar 21 18:10:19 2009 New Revision: 29024 Log: Factorize create_vdp_decoder(). Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Sat Mar 21 17:00:15 2009 (r29023) +++ trunk/libvo/vo_vdpau.c Sat Mar 21 18:10:19 2009 (r29024) @@ -479,6 +479,42 @@ static void free_video_specific(void) { video_mixer = VDP_INVALID_HANDLE; } +static int create_vdp_decoder(int max_refs) +{ + VdpStatus vdp_st; + VdpDecoderProfile vdp_decoder_profile; + if (decoder != VDP_INVALID_HANDLE) + vdp_decoder_destroy(decoder); + switch (image_format) { + case IMGFMT_VDPAU_MPEG1: + vdp_decoder_profile = VDP_DECODER_PROFILE_MPEG1; + break; + case IMGFMT_VDPAU_MPEG2: + vdp_decoder_profile = VDP_DECODER_PROFILE_MPEG2_MAIN; + break; + case IMGFMT_VDPAU_H264: + vdp_decoder_profile = VDP_DECODER_PROFILE_H264_HIGH; + mp_msg(MSGT_VO, MSGL_V, "[vdpau] Creating H264 hardware decoder for %d reference frames.\n", max_refs); + break; + case IMGFMT_VDPAU_WMV3: + vdp_decoder_profile = VDP_DECODER_PROFILE_VC1_MAIN; + break; + case IMGFMT_VDPAU_VC1: + vdp_decoder_profile = VDP_DECODER_PROFILE_VC1_ADVANCED; + break; + } + vdp_st = vdp_decoder_create(vdp_device, vdp_decoder_profile, + vid_width, vid_height, max_refs, &decoder); + CHECK_ST_WARNING("Failed creating VDPAU decoder"); + if (vdp_st != VDP_STATUS_OK) { + decoder = VDP_INVALID_HANDLE; + decoder_max_refs = 0; + return -1; + } + decoder_max_refs = max_refs; + return 0; +} + /* * connect to X server, create and map window, initialize all * VDPAU objects, create different surfaces etc. @@ -791,38 +827,10 @@ static int draw_slice(uint8_t *image[], int max_refs = image_format == IMGFMT_VDPAU_H264 ? rndr->info.h264.num_ref_frames : 2; if (!IMGFMT_IS_VDPAU(image_format)) return VO_FALSE; - if (decoder == VDP_INVALID_HANDLE || decoder_max_refs < max_refs) { - VdpDecoderProfile vdp_decoder_profile; - if (decoder != VDP_INVALID_HANDLE) - vdp_decoder_destroy(decoder); - decoder = VDP_INVALID_HANDLE; - switch (image_format) { - case IMGFMT_VDPAU_MPEG1: - vdp_decoder_profile = VDP_DECODER_PROFILE_MPEG1; - break; - case IMGFMT_VDPAU_MPEG2: - vdp_decoder_profile = VDP_DECODER_PROFILE_MPEG2_MAIN; - break; - case IMGFMT_VDPAU_H264: - vdp_decoder_profile = VDP_DECODER_PROFILE_H264_HIGH; - mp_msg(MSGT_VO, MSGL_V, "[vdpau] Creating H264 hardware decoder for %d reference frames.\n", max_refs); - break; - case IMGFMT_VDPAU_WMV3: - vdp_decoder_profile = VDP_DECODER_PROFILE_VC1_MAIN; - break; - case IMGFMT_VDPAU_VC1: - vdp_decoder_profile = VDP_DECODER_PROFILE_VC1_ADVANCED; - break; - } - vdp_st = vdp_decoder_create(vdp_device, vdp_decoder_profile, vid_width, vid_height, max_refs, &decoder); - CHECK_ST_WARNING("Failed creating VDPAU decoder"); - if (vdp_st != VDP_STATUS_OK) { - decoder = VDP_INVALID_HANDLE; - decoder_max_refs = 0; - return VO_FALSE; - } - decoder_max_refs = max_refs; - } + if ((decoder == VDP_INVALID_HANDLE || decoder_max_refs < max_refs) + && create_vdp_decoder(max_refs) < 0) + return VO_FALSE; + vdp_st = vdp_decoder_render(decoder, rndr->surface, (void *)&rndr->info, rndr->bitstream_buffers_used, rndr->bitstream_buffers); CHECK_ST_WARNING("Failed VDPAU decoder rendering"); return VO_TRUE; From subversion at mplayerhq.hu Sat Mar 21 20:46:14 2009 From: subversion at mplayerhq.hu (compn) Date: Sat, 21 Mar 2009 20:46:14 +0100 (CET) Subject: [MPlayer-cvslog] r29025 - trunk/libmpdemux/demux_mf.c Message-ID: <20090321194614.4C1403B1EE@natsuki.mplayerhq.hu> Author: compn Date: Sat Mar 21 20:46:13 2009 New Revision: 29025 Log: map jls (jpeg-ls), thm and db (thumbnails) files to jpg Modified: trunk/libmpdemux/demux_mf.c Modified: trunk/libmpdemux/demux_mf.c ============================================================================== --- trunk/libmpdemux/demux_mf.c Sat Mar 21 18:10:19 2009 (r29024) +++ trunk/libmpdemux/demux_mf.c Sat Mar 21 20:46:13 2009 (r29025) @@ -58,6 +58,8 @@ static int demux_mf_fill_buffer(demuxer_ return 1; } +// force extension/type to have a fourcc + static const struct { const char *type; uint32_t format; @@ -65,6 +67,9 @@ static const struct { { "bmp", mmioFOURCC('b', 'm', 'p', ' ') }, { "jpeg", mmioFOURCC('I', 'J', 'P', 'G') }, { "jpg", mmioFOURCC('I', 'J', 'P', 'G') }, + { "jls", mmioFOURCC('I', 'J', 'P', 'G') }, + { "thm", mmioFOURCC('I', 'J', 'P', 'G') }, + { "db", mmioFOURCC('I', 'J', 'P', 'G') }, { "pcx", mmioFOURCC('p', 'c', 'x', ' ') }, { "png", mmioFOURCC('M', 'P', 'N', 'G') }, { "ptx", mmioFOURCC('p', 't', 'x', ' ') }, From subversion at mplayerhq.hu Sat Mar 21 20:59:36 2009 From: subversion at mplayerhq.hu (cehoyos) Date: Sat, 21 Mar 2009 20:59:36 +0100 (CET) Subject: [MPlayer-cvslog] r29026 - trunk/libvo/vo_vdpau.c Message-ID: <20090321195936.3A3073BA82@natsuki.mplayerhq.hu> Author: cehoyos Date: Sat Mar 21 20:59:35 2009 New Revision: 29026 Log: Change return value for create_vdp_decoder(). Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Sat Mar 21 20:46:13 2009 (r29025) +++ trunk/libvo/vo_vdpau.c Sat Mar 21 20:59:35 2009 (r29026) @@ -509,10 +509,10 @@ static int create_vdp_decoder(int max_re if (vdp_st != VDP_STATUS_OK) { decoder = VDP_INVALID_HANDLE; decoder_max_refs = 0; - return -1; + return 0; } decoder_max_refs = max_refs; - return 0; + return 1; } /* @@ -828,7 +828,7 @@ static int draw_slice(uint8_t *image[], if (!IMGFMT_IS_VDPAU(image_format)) return VO_FALSE; if ((decoder == VDP_INVALID_HANDLE || decoder_max_refs < max_refs) - && create_vdp_decoder(max_refs) < 0) + && !create_vdp_decoder(max_refs)) return VO_FALSE; vdp_st = vdp_decoder_render(decoder, rndr->surface, (void *)&rndr->info, rndr->bitstream_buffers_used, rndr->bitstream_buffers); From subversion at mplayerhq.hu Sat Mar 21 21:11:05 2009 From: subversion at mplayerhq.hu (cehoyos) Date: Sat, 21 Mar 2009 21:11:05 +0100 (CET) Subject: [MPlayer-cvslog] r29027 - trunk/libvo/vo_vdpau.c Message-ID: <20090321201105.CC1D23BA5A@natsuki.mplayerhq.hu> Author: cehoyos Date: Sat Mar 21 21:11:05 2009 New Revision: 29027 Log: Test if create_vdp_decoder() might succeed by calling it from config() with a small value for max_reference_frames. This does not make automatic recovery by using software decoder possible, but lets MPlayer fail more graciously on - actually existing - buggy hardware that does not support certain H264 widths when using hardware accelerated decoding (784, 864, 944, 1024, 1808, 1888 pixels on NVIDIA G98) and if the user tries to hardware-decode more samples at the same time than supported. Might break playback of H264 Intra-Only samples on hardware with very little video memory. Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Sat Mar 21 20:59:35 2009 (r29026) +++ trunk/libvo/vo_vdpau.c Sat Mar 21 21:11:05 2009 (r29027) @@ -596,6 +596,9 @@ static int config(uint32_t width, uint32 vid_surface_num = -1; resize(); + if (!create_vdp_decoder(2)) + return -1; + return 0; } From uoti.urpala at pp1.inet.fi Sat Mar 21 21:40:27 2009 From: uoti.urpala at pp1.inet.fi (Uoti Urpala) Date: Sat, 21 Mar 2009 22:40:27 +0200 Subject: [MPlayer-cvslog] r29026 - trunk/libvo/vo_vdpau.c In-Reply-To: <20090321195936.3A3073BA82@natsuki.mplayerhq.hu> References: <20090321195936.3A3073BA82@natsuki.mplayerhq.hu> Message-ID: <1237668027.28165.13.camel@glyph.nonexistent.invalid> On Sat, 2009-03-21 at 20:59 +0100, cehoyos wrote: > Change return value for create_vdp_decoder(). > - && create_vdp_decoder(max_refs) < 0) > + && !create_vdp_decoder(max_refs)) IMO the previous version was better. I think the most consistent rule is that functions named "do_xyz" (which this is clearly one of) should return a negative error code if they fail to do xyz. From subversion at mplayerhq.hu Sat Mar 21 23:53:18 2009 From: subversion at mplayerhq.hu (cehoyos) Date: Sat, 21 Mar 2009 23:53:18 +0100 (CET) Subject: [MPlayer-cvslog] r29028 - trunk/libvo/vo_vdpau.c Message-ID: <20090321225318.9DFA23BB14@natsuki.mplayerhq.hu> Author: cehoyos Date: Sat Mar 21 23:53:18 2009 New Revision: 29028 Log: 10l: Only try to create vdpau decoder if hardware decoding is intended. Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Sat Mar 21 21:11:05 2009 (r29027) +++ trunk/libvo/vo_vdpau.c Sat Mar 21 23:53:18 2009 (r29028) @@ -596,7 +596,7 @@ static int config(uint32_t width, uint32 vid_surface_num = -1; resize(); - if (!create_vdp_decoder(2)) + if (IMGFMT_IS_VDPAU(image_format) && !create_vdp_decoder(2)) return -1; return 0; From cehoyos at ag.or.at Sun Mar 22 00:01:03 2009 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Sat, 21 Mar 2009 23:01:03 +0000 (UTC) Subject: [MPlayer-cvslog] =?utf-8?q?r29026_-_trunk/libvo/vo=5Fvdpau=2Ec?= References: <20090321195936.3A3073BA82@natsuki.mplayerhq.hu> <1237668027.28165.13.camel@glyph.nonexistent.invalid> Message-ID: Uoti Urpala pp1.inet.fi> writes: > > - && create_vdp_decoder(max_refs) < 0) > > + && !create_vdp_decoder(max_refs)) > > IMO the previous version was better. I think the most consistent rule is > that functions named "do_xyz" (which this is clearly one of) should > return a negative error code if they fail to do xyz. I don't have any strong opinion on this, but since this clearly simplifies calling create_vdp_decoder() and I have been specifically asked to do this change, I'll only revert if there is general consensus. Thank you, Carl Eugen From uoti.urpala at pp1.inet.fi Sun Mar 22 00:27:46 2009 From: uoti.urpala at pp1.inet.fi (Uoti Urpala) Date: Sun, 22 Mar 2009 01:27:46 +0200 Subject: [MPlayer-cvslog] r29026 - trunk/libvo/vo_vdpau.c In-Reply-To: References: <20090321195936.3A3073BA82@natsuki.mplayerhq.hu> <1237668027.28165.13.camel@glyph.nonexistent.invalid> Message-ID: <1237678066.28165.33.camel@glyph.nonexistent.invalid> On Sat, 2009-03-21 at 23:01 +0000, Carl Eugen Hoyos wrote: > Uoti Urpala pp1.inet.fi> writes: > > > > - && create_vdp_decoder(max_refs) < 0) > > > + && !create_vdp_decoder(max_refs)) > > > > IMO the previous version was better. I think the most consistent rule is > > that functions named "do_xyz" (which this is clearly one of) should > > return a negative error code if they fail to do xyz. > > I don't have any strong opinion on this, but since this clearly simplifies > calling create_vdp_decoder() IMO using "!f()" instead of "f() < 0" is not a "clear simplification". > and I have been specifically asked to do this > change You mean the change of calling it in more places, not the interface change you did in this commit right? That's no argument for either interface being better; it only means that the interface can matter (obviously it wouldn't matter if nobody was calling it). > , I'll only revert if there is general consensus. "General consensus" of who? Do you think lots of people should mail you about something like this? Anyway this one function was not my main point (there already are other inconsistent interfaces, including more important ones, in MPlayer that should equally be changed) but the more general idea of consistent interfaces so you don't add more such cases in the future. From cehoyos at ag.or.at Sun Mar 22 00:48:22 2009 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Sat, 21 Mar 2009 23:48:22 +0000 (UTC) Subject: [MPlayer-cvslog] =?utf-8?q?r29026_-_trunk/libvo/vo=5Fvdpau=2Ec?= References: <20090321195936.3A3073BA82@natsuki.mplayerhq.hu> <1237668027.28165.13.camel@glyph.nonexistent.invalid> <1237678066.28165.33.camel@glyph.nonexistent.invalid> Message-ID: Uoti Urpala pp1.inet.fi> writes: > You mean the change of calling it in more places, not the interface > change you did in this commit right? I meant the interface change. Carl Eugen From uoti.urpala at pp1.inet.fi Sun Mar 22 00:59:25 2009 From: uoti.urpala at pp1.inet.fi (Uoti Urpala) Date: Sun, 22 Mar 2009 01:59:25 +0200 Subject: [MPlayer-cvslog] r29026 - trunk/libvo/vo_vdpau.c In-Reply-To: References: <20090321195936.3A3073BA82@natsuki.mplayerhq.hu> <1237668027.28165.13.camel@glyph.nonexistent.invalid> <1237678066.28165.33.camel@glyph.nonexistent.invalid> Message-ID: <1237679965.28165.35.camel@glyph.nonexistent.invalid> On Sat, 2009-03-21 at 23:48 +0000, Carl Eugen Hoyos wrote: > Uoti Urpala pp1.inet.fi> writes: > > > You mean the change of calling it in more places, not the interface > > change you did in this commit right? > > I meant the interface change. By who then? Saying you've "been asked" is rather meaningless without more detail. From Reimar.Doeffinger at gmx.de Sun Mar 22 10:48:19 2009 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Sun, 22 Mar 2009 10:48:19 +0100 Subject: [MPlayer-cvslog] r29026 - trunk/libvo/vo_vdpau.c In-Reply-To: <1237679965.28165.35.camel@glyph.nonexistent.invalid> References: <20090321195936.3A3073BA82@natsuki.mplayerhq.hu> <1237668027.28165.13.camel@glyph.nonexistent.invalid> <1237678066.28165.33.camel@glyph.nonexistent.invalid> <1237679965.28165.35.camel@glyph.nonexistent.invalid> Message-ID: <20090322094819.GA4560@1und1.de> On Sun, Mar 22, 2009 at 01:59:25AM +0200, Uoti Urpala wrote: > On Sat, 2009-03-21 at 23:48 +0000, Carl Eugen Hoyos wrote: > > Uoti Urpala pp1.inet.fi> writes: > > > > > You mean the change of calling it in more places, not the interface > > > change you did in this commit right? > > > > I meant the interface change. > > By who then? Saying you've "been asked" is rather meaningless without > more detail. Isn't it "by whom?" or has that word died out in the English language? I consider it more readable and I said so. Consistency could be a good argument against it, but only as soon as there is consistency and not a mess of VO_*, (>= 0 = OK, < 0 = ERROR ) and (0 = OK, everything else = ERROR). From subversion at mplayerhq.hu Sun Mar 22 15:23:07 2009 From: subversion at mplayerhq.hu (reimar) Date: Sun, 22 Mar 2009 15:23:07 +0100 (CET) Subject: [MPlayer-cvslog] r29035 - trunk/libao2/ao_pcm.c Message-ID: <20090322142307.D59A24E0B8@natsuki.mplayerhq.hu> Author: reimar Date: Sun Mar 22 15:23:07 2009 New Revision: 29035 Log: Print a warning if ao_pcm wrote more data than what can be specified in the WAV header (ca. 2GB currently) or if it can not update the header at all. Modified: trunk/libao2/ao_pcm.c Modified: trunk/libao2/ao_pcm.c ============================================================================== --- trunk/libao2/ao_pcm.c Sun Mar 22 14:19:58 2009 (r29034) +++ trunk/libao2/ao_pcm.c Sun Mar 22 15:23:07 2009 (r29035) @@ -77,6 +77,7 @@ struct WaveHeader /* init with default values */ static struct WaveHeader wavhdr; +uint64_t data_length; static FILE *fp = NULL; @@ -162,7 +163,6 @@ static int init(int rate,int channels,in if(fp) { if(ao_pcm_waveheader){ /* Reserve space for wave header */ fwrite(&wavhdr,sizeof(wavhdr),1,fp); - wavhdr.file_length=wavhdr.data_length=0; } return 1; } @@ -174,11 +174,17 @@ static int init(int rate,int channels,in // close audio device static void uninit(int immed){ - if(ao_pcm_waveheader && fseek(fp, 0, SEEK_SET) == 0){ /* Write wave header */ - wavhdr.file_length = wavhdr.data_length + sizeof(wavhdr) - 8; + if(ao_pcm_waveheader){ /* Rewrite wave header */ + if (fseek(fp, 0, SEEK_SET) != 0) + mp_msg(MSGT_AO, MSGL_ERR, "Could not seek to start, WAV size headers not updated!\n"); + else if (data_length > 0x7ffff000) + mp_msg(MSGT_AO, MSGL_ERR, "File larger than allowed for WAV files, may play truncated!\n"); + else { + wavhdr.file_length = data_length + sizeof(wavhdr) - 8; wavhdr.file_length = le2me_32(wavhdr.file_length); - wavhdr.data_length = le2me_32(wavhdr.data_length); + wavhdr.data_length = le2me_32(data_length); fwrite(&wavhdr,sizeof(wavhdr),1,fp); + } } fclose(fp); if (ao_outputfilename) @@ -241,7 +247,7 @@ static int play(void* data,int len,int f fwrite(data,len,1,fp); if(ao_pcm_waveheader) - wavhdr.data_length += len; + data_length += len; return len; } From subversion at mplayerhq.hu Sun Mar 22 15:27:10 2009 From: subversion at mplayerhq.hu (reimar) Date: Sun, 22 Mar 2009 15:27:10 +0100 (CET) Subject: [MPlayer-cvslog] r29036 - trunk/libao2/ao_pcm.c Message-ID: <20090322142710.553CA3B864@natsuki.mplayerhq.hu> Author: reimar Date: Sun Mar 22 15:27:10 2009 New Revision: 29036 Log: Whitespace-only cosmetics: use consistent indentation in ao_pcm.c Modified: trunk/libao2/ao_pcm.c Modified: trunk/libao2/ao_pcm.c ============================================================================== --- trunk/libao2/ao_pcm.c Sun Mar 22 15:23:07 2009 (r29035) +++ trunk/libao2/ao_pcm.c Sun Mar 22 15:27:10 2009 (r29036) @@ -37,10 +37,10 @@ static const ao_info_t info = { - "RAW PCM/WAVE file writer audio output", - "pcm", - "Atmosfear", - "" + "RAW PCM/WAVE file writer audio output", + "pcm", + "Atmosfear", + "" }; LIBAO_EXTERN(pcm) @@ -60,19 +60,19 @@ static int fast = 0; struct WaveHeader { - uint32_t riff; - uint32_t file_length; - uint32_t wave; - uint32_t fmt; - uint32_t fmt_length; - uint16_t fmt_tag; - uint16_t channels; - uint32_t sample_rate; - uint32_t bytes_per_second; - uint16_t block_align; - uint16_t bits; - uint32_t data; - uint32_t data_length; + uint32_t riff; + uint32_t file_length; + uint32_t wave; + uint32_t fmt; + uint32_t fmt_length; + uint16_t fmt_tag; + uint16_t channels; + uint32_t sample_rate; + uint32_t bytes_per_second; + uint16_t block_align; + uint16_t bits; + uint32_t data; + uint32_t data_length; }; /* init with default values */ @@ -89,107 +89,107 @@ static int control(int cmd,void *arg){ // open & setup audio device // return: 1=success 0=fail static int init(int rate,int channels,int format,int flags){ - int bits; - opt_t subopts[] = { - {"waveheader", OPT_ARG_BOOL, &ao_pcm_waveheader, NULL}, - {"file", OPT_ARG_MSTRZ, &ao_outputfilename, NULL}, - {"fast", OPT_ARG_BOOL, &fast, NULL}, - {NULL} - }; - // set defaults - ao_pcm_waveheader = 1; + int bits; + opt_t subopts[] = { + {"waveheader", OPT_ARG_BOOL, &ao_pcm_waveheader, NULL}, + {"file", OPT_ARG_MSTRZ, &ao_outputfilename, NULL}, + {"fast", OPT_ARG_BOOL, &fast, NULL}, + {NULL} + }; + // set defaults + ao_pcm_waveheader = 1; - if (subopt_parse(ao_subdevice, subopts) != 0) { - return 0; - } - if (!ao_outputfilename){ - ao_outputfilename = - strdup(ao_pcm_waveheader?"audiodump.wav":"audiodump.pcm"); - } + if (subopt_parse(ao_subdevice, subopts) != 0) { + return 0; + } + if (!ao_outputfilename){ + ao_outputfilename = + strdup(ao_pcm_waveheader?"audiodump.wav":"audiodump.pcm"); + } - bits=8; - switch(format){ - case AF_FORMAT_S32_BE: - format=AF_FORMAT_S32_LE; - case AF_FORMAT_S32_LE: - bits=32; - break; - case AF_FORMAT_FLOAT_BE: - format=AF_FORMAT_FLOAT_LE; - case AF_FORMAT_FLOAT_LE: - bits=32; - break; - case AF_FORMAT_S8: - format=AF_FORMAT_U8; - case AF_FORMAT_U8: - break; - case AF_FORMAT_AC3: - bits=16; - break; - default: - format=AF_FORMAT_S16_LE; - bits=16; - break; - } + bits=8; + switch(format){ + case AF_FORMAT_S32_BE: + format=AF_FORMAT_S32_LE; + case AF_FORMAT_S32_LE: + bits=32; + break; + case AF_FORMAT_FLOAT_BE: + format=AF_FORMAT_FLOAT_LE; + case AF_FORMAT_FLOAT_LE: + bits=32; + break; + case AF_FORMAT_S8: + format=AF_FORMAT_U8; + case AF_FORMAT_U8: + break; + case AF_FORMAT_AC3: + bits=16; + break; + default: + format=AF_FORMAT_S16_LE; + bits=16; + break; + } - ao_data.outburst = 65536; - ao_data.buffersize= 2*65536; - ao_data.channels=channels; - ao_data.samplerate=rate; - ao_data.format=format; - ao_data.bps=channels*rate*(bits/8); + ao_data.outburst = 65536; + ao_data.buffersize= 2*65536; + ao_data.channels=channels; + ao_data.samplerate=rate; + ao_data.format=format; + ao_data.bps=channels*rate*(bits/8); - wavhdr.riff = le2me_32(WAV_ID_RIFF); - wavhdr.wave = le2me_32(WAV_ID_WAVE); - wavhdr.fmt = le2me_32(WAV_ID_FMT); - wavhdr.fmt_length = le2me_32(16); - wavhdr.fmt_tag = le2me_16(format == AF_FORMAT_FLOAT_LE ? WAV_ID_FLOAT_PCM : WAV_ID_PCM); - wavhdr.channels = le2me_16(ao_data.channels); - wavhdr.sample_rate = le2me_32(ao_data.samplerate); - wavhdr.bytes_per_second = le2me_32(ao_data.bps); - wavhdr.bits = le2me_16(bits); - wavhdr.block_align = le2me_16(ao_data.channels * (bits / 8)); - - wavhdr.data = le2me_32(WAV_ID_DATA); - wavhdr.data_length=le2me_32(0x7ffff000); - wavhdr.file_length = wavhdr.data_length + sizeof(wavhdr) - 8; + wavhdr.riff = le2me_32(WAV_ID_RIFF); + wavhdr.wave = le2me_32(WAV_ID_WAVE); + wavhdr.fmt = le2me_32(WAV_ID_FMT); + wavhdr.fmt_length = le2me_32(16); + wavhdr.fmt_tag = le2me_16(format == AF_FORMAT_FLOAT_LE ? WAV_ID_FLOAT_PCM : WAV_ID_PCM); + wavhdr.channels = le2me_16(ao_data.channels); + wavhdr.sample_rate = le2me_32(ao_data.samplerate); + wavhdr.bytes_per_second = le2me_32(ao_data.bps); + wavhdr.bits = le2me_16(bits); + wavhdr.block_align = le2me_16(ao_data.channels * (bits / 8)); + + wavhdr.data = le2me_32(WAV_ID_DATA); + wavhdr.data_length=le2me_32(0x7ffff000); + wavhdr.file_length = wavhdr.data_length + sizeof(wavhdr) - 8; - mp_msg(MSGT_AO, MSGL_INFO, MSGTR_AO_PCM_FileInfo, ao_outputfilename, - (ao_pcm_waveheader?"WAVE":"RAW PCM"), rate, - (channels > 1) ? "Stereo" : "Mono", af_fmt2str_short(format)); - mp_msg(MSGT_AO, MSGL_INFO, MSGTR_AO_PCM_HintInfo); + mp_msg(MSGT_AO, MSGL_INFO, MSGTR_AO_PCM_FileInfo, ao_outputfilename, + (ao_pcm_waveheader?"WAVE":"RAW PCM"), rate, + (channels > 1) ? "Stereo" : "Mono", af_fmt2str_short(format)); + mp_msg(MSGT_AO, MSGL_INFO, MSGTR_AO_PCM_HintInfo); - fp = fopen(ao_outputfilename, "wb"); - if(fp) { - if(ao_pcm_waveheader){ /* Reserve space for wave header */ - fwrite(&wavhdr,sizeof(wavhdr),1,fp); - } - return 1; - } - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_PCM_CantOpenOutputFile, + fp = fopen(ao_outputfilename, "wb"); + if(fp) { + if(ao_pcm_waveheader){ /* Reserve space for wave header */ + fwrite(&wavhdr,sizeof(wavhdr),1,fp); + } + return 1; + } + mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_PCM_CantOpenOutputFile, ao_outputfilename); - return 0; + return 0; } // close audio device static void uninit(int immed){ - - if(ao_pcm_waveheader){ /* Rewrite wave header */ - if (fseek(fp, 0, SEEK_SET) != 0) - mp_msg(MSGT_AO, MSGL_ERR, "Could not seek to start, WAV size headers not updated!\n"); - else if (data_length > 0x7ffff000) - mp_msg(MSGT_AO, MSGL_ERR, "File larger than allowed for WAV files, may play truncated!\n"); - else { - wavhdr.file_length = data_length + sizeof(wavhdr) - 8; - wavhdr.file_length = le2me_32(wavhdr.file_length); - wavhdr.data_length = le2me_32(data_length); - fwrite(&wavhdr,sizeof(wavhdr),1,fp); - } - } - fclose(fp); - if (ao_outputfilename) - free(ao_outputfilename); - ao_outputfilename = NULL; + + if(ao_pcm_waveheader){ /* Rewrite wave header */ + if (fseek(fp, 0, SEEK_SET) != 0) + mp_msg(MSGT_AO, MSGL_ERR, "Could not seek to start, WAV size headers not updated!\n"); + else if (data_length > 0x7ffff000) + mp_msg(MSGT_AO, MSGL_ERR, "File larger than allowed for WAV files, may play truncated!\n"); + else { + wavhdr.file_length = data_length + sizeof(wavhdr) - 8; + wavhdr.file_length = le2me_32(wavhdr.file_length); + wavhdr.data_length = le2me_32(data_length); + fwrite(&wavhdr,sizeof(wavhdr),1,fp); + } + } + fclose(fp); + if (ao_outputfilename) + free(ao_outputfilename); + ao_outputfilename = NULL; } // stop playing and empty buffers (for seeking/pause) @@ -213,7 +213,7 @@ static void audio_resume(void) static int get_space(void){ if(vo_pts) - return ao_data.pts < vo_pts + fast * 30000 ? ao_data.outburst : 0; + return ao_data.pts < vo_pts + fast * 30000 ? ao_data.outburst : 0; return ao_data.outburst; } @@ -225,31 +225,31 @@ static int play(void* data,int len,int f // let libaf to do the conversion... #if 0 //#ifdef WORDS_BIGENDIAN - if (ao_data.format == AFMT_S16_LE) { - unsigned short *buffer = (unsigned short *) data; - register int i; - for(i = 0; i < len/2; ++i) { - buffer[i] = le2me_16(buffer[i]); - } - } + if (ao_data.format == AFMT_S16_LE) { + unsigned short *buffer = (unsigned short *) data; + register int i; + for(i = 0; i < len/2; ++i) { + buffer[i] = le2me_16(buffer[i]); + } + } #endif - if (ao_data.channels == 6 || ao_data.channels == 5) { - int frame_size = le2me_16(wavhdr.bits) / 8; - len -= len % (frame_size * ao_data.channels); - reorder_channel_nch(data, AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT, - AF_CHANNEL_LAYOUT_WAVEEX_DEFAULT, - ao_data.channels, - len / frame_size, frame_size); - } + if (ao_data.channels == 6 || ao_data.channels == 5) { + int frame_size = le2me_16(wavhdr.bits) / 8; + len -= len % (frame_size * ao_data.channels); + reorder_channel_nch(data, AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT, + AF_CHANNEL_LAYOUT_WAVEEX_DEFAULT, + ao_data.channels, + len / frame_size, frame_size); + } - //printf("PCM: Writing chunk!\n"); - fwrite(data,len,1,fp); + //printf("PCM: Writing chunk!\n"); + fwrite(data,len,1,fp); - if(ao_pcm_waveheader) - data_length += len; - - return len; + if(ao_pcm_waveheader) + data_length += len; + + return len; } // return: delay in seconds between first and last sample in buffer From subversion at mplayerhq.hu Sun Mar 22 15:28:13 2009 From: subversion at mplayerhq.hu (reimar) Date: Sun, 22 Mar 2009 15:28:13 +0100 (CET) Subject: [MPlayer-cvslog] r29037 - trunk/libao2/ao_pcm.c Message-ID: <20090322142813.E7A403B897@natsuki.mplayerhq.hu> Author: reimar Date: Sun Mar 22 15:28:13 2009 New Revision: 29037 Log: Add forgotten "static" to new data_length variable in ao_pcm Modified: trunk/libao2/ao_pcm.c Modified: trunk/libao2/ao_pcm.c ============================================================================== --- trunk/libao2/ao_pcm.c Sun Mar 22 15:27:10 2009 (r29036) +++ trunk/libao2/ao_pcm.c Sun Mar 22 15:28:13 2009 (r29037) @@ -77,7 +77,7 @@ struct WaveHeader /* init with default values */ static struct WaveHeader wavhdr; -uint64_t data_length; +static uint64_t data_length; static FILE *fp = NULL; From subversion at mplayerhq.hu Mon Mar 23 00:58:41 2009 From: subversion at mplayerhq.hu (cehoyos) Date: Mon, 23 Mar 2009 00:58:41 +0100 (CET) Subject: [MPlayer-cvslog] r29040 - trunk/libvo/vo_vdpau.c Message-ID: <20090322235841.3EAF23B8DC@natsuki.mplayerhq.hu> Author: cehoyos Date: Mon Mar 23 00:58:40 2009 New Revision: 29040 Log: Change function call order in config(). This stops creating a window even if hardware decoding is certainly going to fail. Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Mon Mar 23 00:15:54 2009 (r29039) +++ trunk/libvo/vo_vdpau.c Mon Mar 23 00:58:40 2009 (r29040) @@ -534,6 +534,11 @@ static int config(uint32_t width, uint32 #endif image_format = format; + vid_width = width; + vid_height = height; + free_video_specific(); + if (IMGFMT_IS_VDPAU(image_format) && !create_vdp_decoder(2)) + return -1; int_pause = 0; visible_buf = 0; @@ -579,16 +584,9 @@ static int config(uint32_t width, uint32 vo_fs = 1; /* -----VDPAU related code here -------- */ - - free_video_specific(); - if (vdp_flip_queue == VDP_INVALID_HANDLE && win_x11_init_vdpau_flip_queue()) return -1; - // video width and height - vid_width = width; - vid_height = height; - if (create_vdp_mixer(vdp_chroma_type)) return -1; @@ -596,9 +594,6 @@ static int config(uint32_t width, uint32 vid_surface_num = -1; resize(); - if (IMGFMT_IS_VDPAU(image_format) && !create_vdp_decoder(2)) - return -1; - return 0; } From subversion at mplayerhq.hu Mon Mar 23 17:17:17 2009 From: subversion at mplayerhq.hu (michael) Date: Mon, 23 Mar 2009 17:17:17 +0100 (CET) Subject: [MPlayer-cvslog] [propchange]: r29030 - svn:log Message-ID: <20090323161717.6332F3B90D@natsuki.mplayerhq.hu> Author: michael Revision: 29030 Property Name: svn:log Action: modified Property diff: --- old property value +++ new property value @@ -1 +1,5 @@ -10l (C code was buggy and untested) +10l +C code of extract_even2avg(), extract_odd2() and extract_odd2avg() was buggy and untested +as the MMX* code was used and i forgot to explicitly test these functions with the MMX +code disabled. + From subversion at mplayerhq.hu Mon Mar 23 23:42:53 2009 From: subversion at mplayerhq.hu (diego) Date: Mon, 23 Mar 2009 23:42:53 +0100 (CET) Subject: [MPlayer-cvslog] r29041 - trunk/Makefile Message-ID: <20090323224253.E5AEA6C05C@natsuki.mplayerhq.hu> Author: diego Date: Mon Mar 23 23:42:53 2009 New Revision: 29041 Log: Do not use full CFLAGS to build codec-cfg, they are unnecessary. Modified: trunk/Makefile Modified: trunk/Makefile ============================================================================== --- trunk/Makefile Mon Mar 23 00:58:40 2009 (r29040) +++ trunk/Makefile Mon Mar 23 23:42:53 2009 (r29041) @@ -822,7 +822,7 @@ mplayer$(EXESUF): $(MPLAYER_DEPS) $(CC) -o $@ $^ $(LDFLAGS_MPLAYER) codec-cfg$(EXESUF): codec-cfg.c help_mp.h - $(HOST_CC) -O -DCODECS2HTML $(EXTRA_INC) -o $@ $< + $(HOST_CC) -O -DCODECS2HTML -I. -o $@ $< codecs.conf.h: codec-cfg$(EXESUF) etc/codecs.conf ./$^ > $@ From subversion at mplayerhq.hu Mon Mar 23 23:53:42 2009 From: subversion at mplayerhq.hu (diego) Date: Mon, 23 Mar 2009 23:53:42 +0100 (CET) Subject: [MPlayer-cvslog] r29042 - trunk/configure Message-ID: <20090323225342.4EC546C05C@natsuki.mplayerhq.hu> Author: diego Date: Mon Mar 23 23:53:42 2009 New Revision: 29042 Log: Get rid of pointless EXTRA_INC and EXTRAXX_INC config.mak variable indirection. Modified: trunk/configure Modified: trunk/configure ============================================================================== --- trunk/configure Mon Mar 23 23:42:53 2009 (r29041) +++ trunk/configure Mon Mar 23 23:53:42 2009 (r29042) @@ -8073,11 +8073,9 @@ INSTALLSTRIP = $_install_strip RANLIB = $_ranlib WINDRES = $_windres -EXTRA_INC = $_inc_extra -EXTRAXX_INC = $_inc_extra $_inc_extraxx -CFLAGS = $CFLAGS \$(EXTRA_INC) -OPTFLAGS = $CFLAGS \$(EXTRA_INC) -CXXFLAGS = $CXXFLAGS \$(EXTRAXX_INC) +CFLAGS = $CFLAGS $_inc_extra +OPTFLAGS = $CFLAGS $_inc_extra +CXXFLAGS = $CXXFLAGS $_inc_extra $_inc_extraxx CFLAGS_DHAHELPER = $cflags_dhahelper CFLAGS_FAAD_FIXED = $cflags_faad_fixed CFLAGS_LIBDVDCSS = $cflags_libdvdcss From subversion at mplayerhq.hu Tue Mar 24 00:37:51 2009 From: subversion at mplayerhq.hu (diego) Date: Tue, 24 Mar 2009 00:37:51 +0100 (CET) Subject: [MPlayer-cvslog] r29043 - trunk/configure Message-ID: <20090323233751.7085C6C05D@natsuki.mplayerhq.hu> Author: diego Date: Tue Mar 24 00:37:51 2009 New Revision: 29043 Log: Rename --with-extraincdir option to --extra-cflags. Also rename the corresponding variables for consistency. Modified: trunk/configure Modified: trunk/configure ============================================================================== --- trunk/configure Mon Mar 23 23:53:42 2009 (r29042) +++ trunk/configure Tue Mar 24 00:37:51 2009 (r29043) @@ -61,9 +61,9 @@ compile_check() { echo >> "$TMPLOG" cat "$1" >> "$TMPLOG" echo >> "$TMPLOG" - echo "$_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra $_libs_mplayer $_libs_mencoder -o $TMPEXE $@" >> "$TMPLOG" + echo "$_cc $CFLAGS $_extra_cflags $_ld_static $_ld_extra $_libs_mplayer $_libs_mencoder -o $TMPEXE $@" >> "$TMPLOG" rm -f "$TMPEXE" - $_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra $_libs_mplayer $_libs_mencoder -o "$TMPEXE" "$@" >> "$TMPLOG" 2>&1 + $_cc $CFLAGS $_extra_cflags $_ld_static $_ld_extra $_libs_mplayer $_libs_mencoder -o "$TMPEXE" "$@" >> "$TMPLOG" 2>&1 TMP="$?" echo >> "$TMPLOG" echo >> "$TMPLOG" @@ -466,10 +466,10 @@ Advanced options: Use these options if autodetection fails (Options marked with (*) accept multiple paths separated by ':'): + --extra-cflags=FLAGS extra CFLAGS --extra-libs=FLAGS extra linker flags --extra-libs-mplayer=FLAGS extra linker flags for MPlayer --extra-libs-mencoder=FLAGS extra linker flags for MEncoder - --with-extraincdir=DIR extra header search paths in DIR (*) --with-extralibdir=DIR extra linker search paths in DIR (*) --with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA) @@ -765,9 +765,6 @@ for ac_option do --realcodecsdir=*) _realcodecsdir=`echo $ac_option | cut -d '=' -f 2` ;; - --with-extraincdir=*) - _inc_extra=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'` - ;; --with-extralibdir=*) _ld_extra=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'` ;; @@ -801,6 +798,9 @@ for ac_option do _dvdreadconfig=`echo $ac_option | cut -d '=' -f 2` ;; + --extra-cflags=*) + _extra_cflags=-`echo $ac_option | cut -d '=' -f 2` + ;; --extra-libs=*) _extra_libs=`echo $ac_option | cut -d '=' -f 2` ;; @@ -1412,22 +1412,22 @@ if test "$_runtime_cpudetection" = yes & fi -_inc_extra="-I. $_inc_extra" +_extra_cflags="-I. $_extra_cflags" _timer=timer-linux.c _getch=getch2.c if freebsd ; then _ld_extra="$_ld_extra -L/usr/local/lib" - _inc_extra="$_inc_extra -I/usr/local/include" + _extra_cflags="$_extra_cflags -I/usr/local/include" fi if netbsd || dragonfly ; then _ld_extra="$_ld_extra -L/usr/pkg/lib" - _inc_extra="$_inc_extra -I/usr/pkg/include" + _extra_cflags="$_extra_cflags -I/usr/pkg/include" fi if darwin; then _ld_extra="$_ld_extra -L/usr/local/lib" - _inc_extra="$_inc_extra -I/usr/local/include" + _extra_cflags="$_extra_cflags -I/usr/local/include" _timer=timer-darwin.c fi @@ -2419,7 +2419,7 @@ elif test "$cc_vendor" = "intel" ; then _ld_extra="$_ld_extra -i-static" fi if test -n "$CPPFLAGS" ; then - _inc_extra="$_inc_extra $CPPFLAGS" + _extra_cflags="$_extra_cflags $CPPFLAGS" _warn_CFLAGS=yes fi @@ -4090,7 +4090,7 @@ EOF for _inc_tmp in "" -I/usr/local/include/directfb \ -I/usr/include/directfb -I/usr/local/include; do cc_check $_inc_tmp -ldirectfb && _directfb=yes && \ - _inc_extra="$_inc_extra $_inc_tmp" && break + _extra_cflags="$_extra_cflags $_inc_tmp" && break done fi @@ -4105,7 +4105,7 @@ int dfb_ver = DIRECTFB_MAJOR_VERSION.DIRECTFB_MINOR_VERSION.DIRECTFB_MICRO_VERSION ; EOF - if $_cc -E $TMPC $_inc_extra > "$TMPEXE"; then + if $_cc -E $TMPC $_extra_cflags > "$TMPEXE"; then _directfb_version=`sed -n 's/^dfb_ver[^0-9]*\(.*\)/\1/p' "$TMPEXE" | tr -d '()'` _dfb_major=`echo $_directfb_version | cut -d . -f 1` _dfb_minor=`echo $_directfb_version | cut -d . -f 2` @@ -4147,7 +4147,7 @@ fi echocheck "X11 headers presence" _x11_headers="no" _res_comment="check if the dev(el) packages are installed" - for I in `echo $_inc_extra | sed s/-I//g` /usr/include ; do + for I in `echo $_extra_cflags | sed s/-I//g` /usr/include ; do if test -f "$I/X11/Xlib.h" ; then _x11_headers="yes" _res_comment="" @@ -4158,7 +4158,7 @@ echocheck "X11 headers presence" for I in /usr/X11/include /usr/X11R7/include /usr/X11R6/include \ /usr/include/X11R6 /usr/openwin/include ; do if test -f "$I/X11/Xlib.h" ; then - _inc_extra="$_inc_extra -I$I" + _extra_cflags="$_extra_cflags -I$I" _x11_headers="yes" _res_comment="using $I" break @@ -4710,7 +4710,7 @@ EOF fi if test "$_caca" = yes ; then def_caca='#define CONFIG_CACA 1' - _inc_extra="$_inc_extra `caca-config --cflags`" + _extra_cflags="$_extra_cflags `caca-config --cflags`" _libs_mplayer="$_libs_mplayer `caca-config --libs`" _vomodules="caca $_vomodules" else @@ -4774,7 +4774,7 @@ int main(void) {return 0;} EOF for _inc_tmp in "" "-I/usr/src/DVB/ost/include" ; do cc_check $_inc_tmp && _dvb=yes && \ - _inc_extra="$_inc_extra $_inc_tmp" && break + _extra_cflags="$_extra_cflags $_inc_tmp" && break done fi echores "$_dvb" @@ -4803,7 +4803,7 @@ int main(void) {return 0;} EOF for _inc_tmp in "" "-I/usr/src/DVB/include" ; do cc_check $_inc_tmp && _dvbhead=yes && \ - _inc_extra="$_inc_extra $_inc_tmp" && break + _extra_cflags="$_extra_cflags $_inc_tmp" && break done fi echores "$_dvbhead" @@ -5083,13 +5083,13 @@ if test "$_sdl" = yes ; then def_sdl='#define CONFIG_SDL 1' if cygwin ; then _libs_mplayer="$_libs_mplayer `$_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/`" - _inc_extra="$_inc_extra `$_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/`" + _extra_cflags="$_extra_cflags `$_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/`" elif mingw32 ; then _libs_mplayer="$_libs_mplayer `$_sdlconfig --libs | sed -e s/-mwindows// -e s/-lmingw32//`" - _inc_extra="$_inc_extra `$_sdlconfig --cflags | sed s/-Dmain=SDL_main//`" + _extra_cflags="$_extra_cflags `$_sdlconfig --cflags | sed s/-Dmain=SDL_main//`" else _libs_mplayer="$_libs_mplayer `$_sdlconfig --libs`" - _inc_extra="$_inc_extra `$_sdlconfig --cflags | sed s/-D_GNU_SOURCE=1//`" + _extra_cflags="$_extra_cflags `$_sdlconfig --cflags | sed s/-D_GNU_SOURCE=1//`" fi _vomodules="sdl $_vomodules" _aomodules="sdl $_aomodules" @@ -5202,7 +5202,7 @@ int main(void) { return 0; } EOF for _inc_tmp in "" -I/usr/local/include/dxr2 -I/usr/include/dxr2; do cc_check $_inc_tmp && _dxr2=yes && \ - _inc_extra="$_inc_extra $_inc_tmp" && break + _extra_cflags="$_extra_cflags $_inc_tmp" && break done fi if test "$_dxr2" = yes; then @@ -5370,7 +5370,7 @@ if test "$_arts" = yes ; then def_arts='#define CONFIG_ARTS 1' _aomodules="arts $_aomodules" _libs_mplayer="$_libs_mplayer `artsc-config --libs`" - _inc_extra="$_inc_extra `artsc-config --cflags`" + _extra_cflags="$_extra_cflags `artsc-config --cflags`" else _noaomodules="arts $_noaomodules" fi @@ -5396,7 +5396,7 @@ if test "$_esd" = yes ; then def_esd='#define CONFIG_ESD 1' _aomodules="esd $_aomodules" _libs_mplayer="$_libs_mplayer `esd-config --libs`" - _inc_extra="$_inc_extra `esd-config --cflags`" + _extra_cflags="$_extra_cflags `esd-config --cflags`" echocheck "esd_get_latency()" cat > $TMPC << EOF @@ -5451,7 +5451,7 @@ if test "$_pulse" = yes ; then def_pulse='#define CONFIG_PULSE 1' _aomodules="pulse $_aomodules" _libs_mplayer="$_libs_mplayer `$_pkg_config --libs libpulse`" - _inc_extra="$_inc_extra `$_pkg_config --cflags libpulse`" + _extra_cflags="$_extra_cflags `$_pkg_config --cflags libpulse`" else def_pulse='#undef CONFIG_PULSE' _noaomodules="pulse $_noaomodules" @@ -5470,7 +5470,7 @@ EOF _libs_mplayer="$_libs_mplayer -ljack" elif cc_check `$_pkg_config --libs --cflags --silence-errors jack` ; then _libs_mplayer="$_libs_mplayer `$_pkg_config --libs jack`" - _inc_extra="$_inc_extra "`$_pkg_config --cflags jack`"" + _extra_cflags="$_extra_cflags "`$_pkg_config --cflags jack`"" else _jack=no fi @@ -5755,7 +5755,7 @@ if test "$_dvdread_internal" = auto ; th || darwin || win32 || os2; then _dvdread_internal=yes _dvdread=yes - _inc_extra="$_inc_extra -Ilibdvdread4" + _extra_cflags="$_extra_cflags -Ilibdvdread4" fi elif test "$_dvdread" = auto ; then _dvdread=no @@ -5774,7 +5774,7 @@ EOF if cc_check -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \ $_dvdreadcflags $_dvdreadlibs $_ld_dl ; then _dvdread=yes - _inc_extra="$_inc_extra $_dvdreadcflags" + _extra_cflags="$_extra_cflags $_dvdreadcflags" _ld_extra="$_ld_extra $_dvdreadlibs" _res_comment="external" fi @@ -5840,7 +5840,7 @@ EOF _cdparanoia=no for _inc_tmp in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do cc_check $_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \ - _cdparanoia=yes && _inc_extra="$_inc_extra $_inc_tmp" && break + _cdparanoia=yes && _extra_cflags="$_extra_cflags $_inc_tmp" && break done fi if test "$_cdparanoia" = yes ; then @@ -5874,7 +5874,7 @@ EOF _inc_tmp=`$_pkg_config --cflags libcdio_paranoia` _ld_tmp=`$_pkg_config --libs libcdio_paranoia` cc_check $_inc_tmp $_ld_tmp $_ld_lm && _libcdio=yes \ - && _ld_extra="$_ld_extra $_ld_tmp" && _inc_extra="$_inc_extra $_inc_tmp" + && _ld_extra="$_ld_extra $_ld_tmp" && _extra_cflags="$_extra_cflags $_inc_tmp" fi fi if test "$_libcdio" = yes && test "$_cdparanoia" = no ; then @@ -5961,7 +5961,7 @@ EOF fi if test "$_freetype" = yes ; then def_freetype='#define CONFIG_FREETYPE' - _inc_extra="$_inc_extra `$_freetypeconfig --cflags`" + _extra_cflags="$_extra_cflags `$_freetypeconfig --cflags`" _ld_extra="$_ld_extra `$_freetypeconfig --libs`" else def_freetype='#undef CONFIG_FREETYPE' @@ -5996,7 +5996,7 @@ EOF _inc_tmp=`$_pkg_config --cflags fontconfig` _ld_tmp=`$_pkg_config --libs fontconfig` cc_check $_inc_tmp $_ld_tmp && _fontconfig=yes \ - && _ld_extra="$_ld_extra $_ld_tmp" && _inc_extra="$_inc_extra $_inc_tmp" + && _ld_extra="$_ld_extra $_ld_tmp" && _extra_cflags="$_extra_cflags $_inc_tmp" fi fi if test "$_fontconfig" = yes ; then @@ -6061,7 +6061,7 @@ EOF fi if test "$_fribidi" = yes ; then def_fribidi='#define CONFIG_FRIBIDI' - _inc_extra="$_inc_extra `$_fribidiconfig --cflags`" + _extra_cflags="$_extra_cflags `$_fribidiconfig --cflags`" _ld_extra="$_ld_extra `$_fribidiconfig --libs`" else def_fribidi='#undef CONFIG_FRIBIDI' @@ -6339,7 +6339,7 @@ EOF _ld_theora=$($_pkg_config --silence-errors --libs theora) _inc_theora=$($_pkg_config --silence-errors --cflags theora) cc_check $_inc_theora $_ld_theora && _ld_extra="$_ld_extra $_ld_theora" && - _inc_extra="$_inc_extra $_inc_theora" && _theora=yes + _extra_cflags="$_extra_cflags $_inc_theora" && _theora=yes if test _theora = no; then _ld_theora="-ltheora -logg" cc_check $_ld_theora && _ld_extra="$_ld_extra $_ld_theora" && _theora=yes @@ -6349,7 +6349,7 @@ EOF _inc_theora=$($_pkg_config --silence-errors --cflags theora) cc_check tremor/bitwise.c $_inc_theora $_ld_theora && _ld_extra="$_ld_extra $_ld_theora" && - _inc_extra="$_inc_extra $_inc_theora" && _theora=yes + _extra_cflags="$_extra_cflags $_inc_theora" && _theora=yes if test _theora = no; then _ld_theora="-ltheora -logg" cc_check tremor/bitwise.c $_ld_theora && @@ -6700,7 +6700,7 @@ echocheck "Nemesi Streaming Media librar if test "$_nemesi" = auto && test "$_network" = yes ; then _nemesi=no if $_pkg_config libnemesi --atleast-version=0.6.3 ; then - _inc_extra="$_inc_extra `$_pkg_config --cflags libnemesi`" + _extra_cflags="$_extra_cflags `$_pkg_config --cflags libnemesi`" _ld_extra="$_ld_extra `$_pkg_config --libs libnemesi`" _nemesi=yes fi @@ -6728,7 +6728,7 @@ int main(void) { return 0; } EOF _live=no - for I in $_inc_extra "-I$_libdir/live" "-I/usr/lib/live" "-I/usr/lib64/live" "-I/usr/local/live" "-I/usr/local/lib/live" ; do + for I in $_extra_cflags "-I$_libdir/live" "-I/usr/lib/live" "-I/usr/lib64/live" "-I/usr/local/live" "-I/usr/local/lib/live" ; do cxx_check $I/liveMedia/include $I/UsageEnvironment/include \ $I/groupsock/include && _livelibdir=`echo $I| sed s/-I//` && \ _ld_extra="$_livelibdir/liveMedia/libliveMedia.a \ @@ -6736,7 +6736,7 @@ EOF $_livelibdir/UsageEnvironment/libUsageEnvironment.a \ $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \ $_ld_extra -lstdc++" \ - _inc_extraxx="-I$_livelibdir/liveMedia/include \ + _extra_cxxflags="-I$_livelibdir/liveMedia/include \ -I$_livelibdir/UsageEnvironment/include \ -I$_livelibdir/BasicUsageEnvironment/include \ -I$_livelibdir/groupsock/include" && \ @@ -6757,7 +6757,7 @@ elif test "$_live_dist" = yes && test "$ _live="yes" def_live='#define CONFIG_LIVE555 1' _ld_extra="$_ld_extra -lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++" - _inc_extraxx="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \ + _extra_cxxflags="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \ -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock" _inputmodules="live555 $_inputmodules" else @@ -7127,7 +7127,7 @@ EOF _ld_dirac=`$_pkg_config --silence-errors --libs dirac` cc_check $_inc_dirac $_ld_dirac && _libdirac_lavc=yes && - _inc_extra="$_inc_extra $_inc_dirac" && + _extra_cflags="$_extra_cflags $_inc_dirac" && _ld_extra="$_ld_extra $_ld_dirac" fi fi @@ -7159,7 +7159,7 @@ EOF _ld_schroedinger=`$_pkg_config --silence-errors --libs schroedinger-1.0` cc_check $_inc_schroedinger $_ld_schroedinger && _libschroedinger_lavc=yes && - _inc_extra="$_inc_extra $_inc_schroedinger" && + _extra_cflags="$_extra_cflags $_inc_schroedinger" && _ld_extra="$_ld_extra $_ld_schroedinger" fi fi @@ -7725,7 +7725,7 @@ if test "$_gtk1" = no ; then if $_pkg_config gtk+-2.0 --exists ; then _gtk=`$_pkg_config gtk+-2.0 --modversion 2>/dev/null` - _inc_extra="$_inc_extra `$_pkg_config gtk+-2.0 --cflags 2>/dev/null`" + _extra_cflags="$_extra_cflags `$_pkg_config gtk+-2.0 --cflags 2>/dev/null`" _libs_mplayer="$_libs_mplayer `$_pkg_config gtk+-2.0 --libs 2>/dev/null`" echores "$_gtk" @@ -7761,7 +7761,7 @@ if test "$_gtk1" = yes ; then fi fi _gtk=`$_gtkconfig --version 2>&1` - _inc_extra="$_inc_extra `$_gtkconfig --cflags 2>&1`" + _extra_cflags="$_extra_cflags `$_gtkconfig --cflags 2>&1`" _libs_mplayer="$_libs_mplayer `$_gtkconfig --libs 2>&1`" echores "$_gtk (using $_gtkconfig)" @@ -7920,7 +7920,7 @@ EOF fi if test "$_maemo" = yes ; then def_maemo='#define CONFIG_MAEMO 1' - _inc_extra="$_inc_extra `$_pkg_config --cflags libosso`" + _extra_cflags="$_extra_cflags `$_pkg_config --cflags libosso`" _ld_extra="$_ld_extra `$_pkg_config --libs libosso` -lXsp" else def_maemo='#undef CONFIG_MAEMO' @@ -8027,7 +8027,7 @@ if test "$_dvdnav" = yes ; then cflags_libdvdnav="-Ilibdvdnav" _inputmodules="dvdnav(internal) $_inputmodules" else - _inc_extra="$_inc_extra `$_dvdnavconfig --cflags`" + _extra_cflags="$_extra_cflags `$_dvdnavconfig --cflags`" _ld_extra="$_ld_extra `$_dvdnavconfig --minilibs`" _inputmodules="dvdnav $_inputmodules" fi @@ -8073,9 +8073,9 @@ INSTALLSTRIP = $_install_strip RANLIB = $_ranlib WINDRES = $_windres -CFLAGS = $CFLAGS $_inc_extra -OPTFLAGS = $CFLAGS $_inc_extra -CXXFLAGS = $CXXFLAGS $_inc_extra $_inc_extraxx +CFLAGS = $CFLAGS $_extra_cflags +OPTFLAGS = $CFLAGS $_extra_cflags +CXXFLAGS = $CXXFLAGS $_extra_cflags $_extra_cxxflags CFLAGS_DHAHELPER = $cflags_dhahelper CFLAGS_FAAD_FIXED = $cflags_faad_fixed CFLAGS_LIBDVDCSS = $cflags_libdvdcss From subversion at mplayerhq.hu Tue Mar 24 00:41:24 2009 From: subversion at mplayerhq.hu (diego) Date: Tue, 24 Mar 2009 00:41:24 +0100 (CET) Subject: [MPlayer-cvslog] r29044 - trunk/configure Message-ID: <20090323234124.893373B801@natsuki.mplayerhq.hu> Author: diego Date: Tue Mar 24 00:41:24 2009 New Revision: 29044 Log: typo fix: Remove stray '-' from --extra-cflags option evaluation. Modified: trunk/configure Modified: trunk/configure ============================================================================== --- trunk/configure Tue Mar 24 00:37:51 2009 (r29043) +++ trunk/configure Tue Mar 24 00:41:24 2009 (r29044) @@ -799,7 +799,7 @@ for ac_option do ;; --extra-cflags=*) - _extra_cflags=-`echo $ac_option | cut -d '=' -f 2` + _extra_cflags=`echo $ac_option | cut -d '=' -f 2` ;; --extra-libs=*) _extra_libs=`echo $ac_option | cut -d '=' -f 2` From subversion at mplayerhq.hu Tue Mar 24 00:45:05 2009 From: subversion at mplayerhq.hu (diego) Date: Tue, 24 Mar 2009 00:45:05 +0100 (CET) Subject: [MPlayer-cvslog] [propchange]: r29043 - svn:log Message-ID: <20090323234505.30F8B3BBAB@natsuki.mplayerhq.hu> Author: diego Revision: 29043 Property Name: svn:log Action: modified Property diff: --- old property value +++ new property value @@ -1,2 +1,2 @@ -Rename --with-extraincdir option to --extra-cflags. -Also rename the corresponding variables for consistency. +Replace --with-extraincdir option by --extra-cflags, which accepts arbitrary +CFLAGS. Also rename the corresponding variables for consistency. From uoti.urpala at pp1.inet.fi Tue Mar 24 00:46:03 2009 From: uoti.urpala at pp1.inet.fi (Uoti Urpala) Date: Tue, 24 Mar 2009 01:46:03 +0200 Subject: [MPlayer-cvslog] r29041 - trunk/Makefile In-Reply-To: <20090323224253.E5AEA6C05C@natsuki.mplayerhq.hu> References: <20090323224253.E5AEA6C05C@natsuki.mplayerhq.hu> Message-ID: <1237851963.28165.276.camel@glyph.nonexistent.invalid> On Mon, 2009-03-23 at 23:42 +0100, diego wrote: > Log: > Do not use full CFLAGS to build codec-cfg, they are unnecessary. > codec-cfg$(EXESUF): codec-cfg.c help_mp.h > - $(HOST_CC) -O -DCODECS2HTML $(EXTRA_INC) -o $@ $< > + $(HOST_CC) -O -DCODECS2HTML -I. -o $@ $< This exactly reverts a commit you did earlier. Have the reasons for that earlier change disappeared? (IIRC it was done for separate libavutil support or something like that.) From subversion at mplayerhq.hu Tue Mar 24 01:22:52 2009 From: subversion at mplayerhq.hu (diego) Date: Tue, 24 Mar 2009 01:22:52 +0100 (CET) Subject: [MPlayer-cvslog] r29045 - trunk/configure Message-ID: <20090324002252.3D7E66C08E@natsuki.mplayerhq.hu> Author: diego Date: Tue Mar 24 01:22:51 2009 New Revision: 29045 Log: Replace --with-extralibdir option by --extra-ldflags, which accepts arbitrary LDFLAGS. Also rename the corresponding variable for consistency. Modified: trunk/configure Modified: trunk/configure ============================================================================== --- trunk/configure Tue Mar 24 00:41:24 2009 (r29044) +++ trunk/configure Tue Mar 24 01:22:51 2009 (r29045) @@ -61,9 +61,9 @@ compile_check() { echo >> "$TMPLOG" cat "$1" >> "$TMPLOG" echo >> "$TMPLOG" - echo "$_cc $CFLAGS $_extra_cflags $_ld_static $_ld_extra $_libs_mplayer $_libs_mencoder -o $TMPEXE $@" >> "$TMPLOG" + echo "$_cc $CFLAGS $_extra_cflags $_ld_static $_extra_ldflags $_libs_mplayer $_libs_mencoder -o $TMPEXE $@" >> "$TMPLOG" rm -f "$TMPEXE" - $_cc $CFLAGS $_extra_cflags $_ld_static $_ld_extra $_libs_mplayer $_libs_mencoder -o "$TMPEXE" "$@" >> "$TMPLOG" 2>&1 + $_cc $CFLAGS $_extra_cflags $_ld_static $_extra_ldflags $_libs_mplayer $_libs_mencoder -o "$TMPEXE" "$@" >> "$TMPLOG" 2>&1 TMP="$?" echo >> "$TMPLOG" echo >> "$TMPLOG" @@ -765,9 +765,6 @@ for ac_option do --realcodecsdir=*) _realcodecsdir=`echo $ac_option | cut -d '=' -f 2` ;; - --with-extralibdir=*) - _ld_extra=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'` - ;; --with-install=*) _install=`echo $ac_option | cut -d '=' -f 2 ` @@ -801,6 +798,9 @@ for ac_option do --extra-cflags=*) _extra_cflags=`echo $ac_option | cut -d '=' -f 2` ;; + --extra-ldflags=*) + _extra_ldflags=`echo $ac_option | cut -d '=' -f 2` + ;; --extra-libs=*) _extra_libs=`echo $ac_option | cut -d '=' -f 2` ;; @@ -1416,23 +1416,23 @@ _extra_cflags="-I. $_extra_cflags" _timer=timer-linux.c _getch=getch2.c if freebsd ; then - _ld_extra="$_ld_extra -L/usr/local/lib" + _extra_ldflags="$_extra_ldflags -L/usr/local/lib" _extra_cflags="$_extra_cflags -I/usr/local/include" fi if netbsd || dragonfly ; then - _ld_extra="$_ld_extra -L/usr/pkg/lib" + _extra_ldflags="$_extra_ldflags -L/usr/pkg/lib" _extra_cflags="$_extra_cflags -I/usr/pkg/include" fi if darwin; then - _ld_extra="$_ld_extra -L/usr/local/lib" + _extra_ldflags="$_extra_ldflags -L/usr/local/lib" _extra_cflags="$_extra_cflags -I/usr/local/include" _timer=timer-darwin.c fi if aix ; then - _ld_extra="$_ld_extra -lC" + _extra_ldflags="$_extra_ldflags -lC" fi if irix ; then @@ -1444,7 +1444,7 @@ fi if win32 ; then _exesuf=".exe" # -lwinmm is always needed for osdep/timer-win2.c - _ld_extra="$_ld_extra -lwinmm" + _extra_ldflags="$_extra_ldflags -lwinmm" _pe_executable=yes _timer=timer-win2.c _priority=yes @@ -1465,7 +1465,7 @@ if amigaos ; then fi if qnx ; then - _ld_extra="$_ld_extra -lph" + _extra_ldflags="$_extra_ldflags -lph" fi if os2 ; then @@ -2407,16 +2407,16 @@ elif test -z "$CFLAGS" ; then CFLAGS="-O2 $_march $_mcpu $_pipe" else CFLAGS="-Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer" - _ld_extra="$_ld_extra -ffast-math" + _extra_ldflags="$_extra_ldflags -ffast-math" fi else _warn_CFLAGS=yes fi if test -n "$LDFLAGS" ; then - _ld_extra="$_ld_extra $LDFLAGS" + _extra_ldflags="$_extra_ldflags $LDFLAGS" _warn_CFLAGS=yes elif test "$cc_vendor" = "intel" ; then - _ld_extra="$_ld_extra -i-static" + _extra_ldflags="$_extra_ldflags -i-static" fi if test -n "$CPPFLAGS" ; then _extra_cflags="$_extra_cflags $CPPFLAGS" @@ -2720,7 +2720,7 @@ cat > $TMPC < $TMPC << EOF #include @@ -5337,7 +5337,7 @@ EOF def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/dsp"' elif netbsd || openbsd ; then def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/sound"' - _ld_extra="$_ld_extra -lossaudio" + _extra_ldflags="$_extra_ldflags -lossaudio" else def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/dsp"' fi @@ -5614,7 +5614,7 @@ if test "$_alsaver" ; then _alsa=no _res_comment="unknown version" fi - _ld_extra="$_ld_extra -lasound $_ld_dl $_ld_pthread" + _extra_ldflags="$_extra_ldflags -lasound $_ld_dl $_ld_pthread" else _noaomodules="alsa $_noaomodules" fi @@ -5775,7 +5775,7 @@ EOF $_dvdreadcflags $_dvdreadlibs $_ld_dl ; then _dvdread=yes _extra_cflags="$_extra_cflags $_dvdreadcflags" - _ld_extra="$_ld_extra $_dvdreadlibs" + _extra_ldflags="$_extra_ldflags $_dvdreadlibs" _res_comment="external" fi fi @@ -5788,7 +5788,7 @@ if test "$_dvdread_internal" = yes; then elif test "$_dvdread" = yes; then def_dvdread='#define CONFIG_DVDREAD 1' _largefiles=yes - _ld_extra="$_ld_extra -ldvdread" + _extra_ldflags="$_extra_ldflags -ldvdread" _inputmodules="dvdread(external) $_inputmodules" _res_comment="external" else @@ -5812,7 +5812,7 @@ if test "$_libdvdcss_internal" = yes ; t def_dvd_bsd='#define HAVE_BSD_DVD_STRUCT 1' elif darwin ; then def_dvd_darwin='#define DARWIN_DVD_IOCTL' - _ld_extra="$_ld_extra -framework IOKit" + _extra_ldflags="$_extra_ldflags -framework IOKit" elif cygwin ; then cflags_libdvdcss="-DSYS_CYGWIN -DWIN32" elif beos ; then @@ -5845,8 +5845,8 @@ EOF fi if test "$_cdparanoia" = yes ; then _cdda='yes' - _ld_extra="$_ld_extra -lcdda_interface -lcdda_paranoia" - openbsd && _ld_extra="$_ld_extra -lutil" + _extra_ldflags="$_extra_ldflags -lcdda_interface -lcdda_paranoia" + openbsd && _extra_ldflags="$_extra_ldflags -lutil" fi echores "$_cdparanoia" @@ -5868,13 +5868,13 @@ EOF for _ld_tmp in "" "-lwinmm" ; do _ld_tmp="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp" cc_check $_ld_tmp $_ld_lm \ - && _libcdio=yes && _ld_extra="$_ld_extra $_ld_tmp" && break + && _libcdio=yes && _extra_ldflags="$_extra_ldflags $_ld_tmp" && break done if test "$_libcdio" = no && $_pkg_config --exists libcdio_paranoia ; then _inc_tmp=`$_pkg_config --cflags libcdio_paranoia` _ld_tmp=`$_pkg_config --libs libcdio_paranoia` cc_check $_inc_tmp $_ld_tmp $_ld_lm && _libcdio=yes \ - && _ld_extra="$_ld_extra $_ld_tmp" && _extra_cflags="$_extra_cflags $_inc_tmp" + && _extra_ldflags="$_extra_ldflags $_ld_tmp" && _extra_cflags="$_extra_cflags $_inc_tmp" fi fi if test "$_libcdio" = yes && test "$_cdparanoia" = no ; then @@ -5962,7 +5962,7 @@ fi if test "$_freetype" = yes ; then def_freetype='#define CONFIG_FREETYPE' _extra_cflags="$_extra_cflags `$_freetypeconfig --cflags`" - _ld_extra="$_ld_extra `$_freetypeconfig --libs`" + _extra_ldflags="$_extra_ldflags `$_freetypeconfig --libs`" else def_freetype='#undef CONFIG_FREETYPE' fi @@ -5990,13 +5990,13 @@ EOF _fontconfig=no for _ld_tmp in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" ; do _ld_tmp="-lfontconfig $_ld_tmp" - cc_check $_ld_tmp && _fontconfig=yes && _ld_extra="$_ld_extra $_ld_tmp" && break + cc_check $_ld_tmp && _fontconfig=yes && _extra_ldflags="$_extra_ldflags $_ld_tmp" && break done if test "$_fontconfig" = no && $_pkg_config --exists fontconfig ; then _inc_tmp=`$_pkg_config --cflags fontconfig` _ld_tmp=`$_pkg_config --libs fontconfig` cc_check $_inc_tmp $_ld_tmp && _fontconfig=yes \ - && _ld_extra="$_ld_extra $_ld_tmp" && _extra_cflags="$_extra_cflags $_inc_tmp" + && _extra_ldflags="$_extra_ldflags $_ld_tmp" && _extra_cflags="$_extra_cflags $_inc_tmp" fi fi if test "$_fontconfig" = yes ; then @@ -6062,7 +6062,7 @@ fi if test "$_fribidi" = yes ; then def_fribidi='#define CONFIG_FRIBIDI' _extra_cflags="$_extra_cflags `$_fribidiconfig --cflags`" - _ld_extra="$_ld_extra `$_fribidiconfig --libs`" + _extra_ldflags="$_extra_ldflags `$_fribidiconfig --libs`" else def_fribidi='#undef CONFIG_FRIBIDI' fi @@ -6086,7 +6086,7 @@ EOF fi if test "$_enca" = yes ; then def_enca='#define CONFIG_ENCA 1' - _ld_extra="$_ld_extra -lenca" + _extra_ldflags="$_extra_ldflags -lenca" else def_enca='#undef CONFIG_ENCA' fi @@ -6102,7 +6102,7 @@ _zlib=no cc_check -lz && _zlib=yes if test "$_zlib" = yes ; then def_zlib='#define CONFIG_ZLIB 1' - _ld_extra="$_ld_extra -lz" + _extra_ldflags="$_extra_ldflags -lz" else def_zlib='#define CONFIG_ZLIB 0' _libavdecoders=`echo $_libavdecoders | sed -e s/FLASHSV_DECODER// -e s/PNG_DECODER// -e s/ZMBV_DECODER// -e s/DXA_DECODER// -e s/TSCC_DECODER// ` @@ -6121,7 +6121,7 @@ EOF cc_check -lbz2 && bzlib=yes if test "$bzlib" = yes ; then def_bzlib='#define CONFIG_BZLIB 1' - _ld_extra="$_ld_extra -lbz2" + _extra_ldflags="$_extra_ldflags -lbz2" fi echores "$bzlib" @@ -6161,7 +6161,7 @@ EOF fi if test "$_liblzo" = yes ; then def_liblzo='#define CONFIG_LIBLZO 1' - _ld_extra="$_ld_extra -llzo2" + _extra_ldflags="$_extra_ldflags -llzo2" _codecmodules="liblzo $_codecmodules" else def_liblzo='#undef CONFIG_LIBLZO' @@ -6181,7 +6181,7 @@ EOF fi if test "$_mad" = yes ; then def_mad='#define CONFIG_LIBMAD 1' - _ld_extra="$_ld_extra -lmad" + _extra_ldflags="$_extra_ldflags -lmad" _codecmodules="libmad $_codecmodules" else def_mad='#undef CONFIG_LIBMAD' @@ -6269,13 +6269,13 @@ elif test "$_tremor" = yes ; then def_tremor='#define CONFIG_TREMOR 1' _codecmodules="tremor(external) $_codecmodules" _res_comment="external Tremor" - _ld_extra="$_ld_extra -logg -lvorbisidec" + _extra_ldflags="$_extra_ldflags -logg -lvorbisidec" elif test "$_libvorbis" = yes ; then _vorbis=yes def_vorbis='#define CONFIG_OGGVORBIS 1' _codecmodules="libvorbis $_codecmodules" _res_comment="libvorbis" - _ld_extra="$_ld_extra -lvorbis -logg" + _extra_ldflags="$_extra_ldflags -lvorbis -logg" else _vorbis=no _nocodecmodules="libvorbis $_nocodecmodules" @@ -6293,7 +6293,7 @@ EOF fi if test "$_speex" = yes ; then def_speex='#define CONFIG_SPEEX 1' - _ld_extra="$_ld_extra -lspeex" + _extra_ldflags="$_extra_ldflags -lspeex" _codecmodules="speex $_codecmodules" else def_speex='#undef CONFIG_SPEEX' @@ -6338,22 +6338,22 @@ int main(void) { EOF _ld_theora=$($_pkg_config --silence-errors --libs theora) _inc_theora=$($_pkg_config --silence-errors --cflags theora) - cc_check $_inc_theora $_ld_theora && _ld_extra="$_ld_extra $_ld_theora" && + cc_check $_inc_theora $_ld_theora && _extra_ldflags="$_extra_ldflags $_ld_theora" && _extra_cflags="$_extra_cflags $_inc_theora" && _theora=yes if test _theora = no; then _ld_theora="-ltheora -logg" - cc_check $_ld_theora && _ld_extra="$_ld_extra $_ld_theora" && _theora=yes + cc_check $_ld_theora && _extra_ldflags="$_extra_ldflags $_ld_theora" && _theora=yes fi if test "$_theora" = no && test "$_tremor_internal" = yes; then _ld_theora=$($_pkg_config --silence-errors --libs theora) _inc_theora=$($_pkg_config --silence-errors --cflags theora) cc_check tremor/bitwise.c $_inc_theora $_ld_theora && - _ld_extra="$_ld_extra $_ld_theora" && + _extra_ldflags="$_extra_ldflags $_ld_theora" && _extra_cflags="$_extra_cflags $_inc_theora" && _theora=yes if test _theora = no; then _ld_theora="-ltheora -logg" cc_check tremor/bitwise.c $_ld_theora && - _ld_extra="$_ld_extra $_ld_theora" && _theora=yes + _extra_ldflags="$_extra_ldflags $_ld_theora" && _theora=yes fi fi fi @@ -6362,7 +6362,7 @@ if test "$_theora" = yes ; then _codecmodules="libtheora $_codecmodules" # when --enable-theora is forced, we'd better provide a probably sane # $_ld_theora than nothing - test -z "$_ld_theora" && _ld_extra="$_ld_extra -ltheora -logg" + test -z "$_ld_theora" && _extra_ldflags="$_extra_ldflags -ltheora -logg" else def_theora='#undef CONFIG_OGGTHEORA' _nocodecmodules="libtheora $_nocodecmodules" @@ -6399,7 +6399,7 @@ elif test "$_liba52_internal" = no && te #include int main(void) { a52_state_t *testHand; testHand=a52_init(0); return 0; } EOF - cc_check -la52 && _liba52=yes && _res_comment="external" && _ld_extra="$_ld_extra -la52" + cc_check -la52 && _liba52=yes && _res_comment="external" && _extra_ldflags="$_extra_ldflags -la52" fi if test "$_liba52" = yes ; then def_liba52='#define CONFIG_LIBA52 1' @@ -6439,7 +6439,7 @@ if test "$_libdca" = auto ; then int main(void) { dts_init(0); return 0; } EOF for _ld_dca in -ldts -ldca ; do - cc_check $_ld_dca $_ld_lm && _ld_extra="$_ld_extra $_ld_dca" \ + cc_check $_ld_dca $_ld_lm && _extra_ldflags="$_extra_ldflags $_ld_dca" \ && _libdca=yes && break done fi @@ -6470,7 +6470,7 @@ EOF fi if test "$_musepack" = yes ; then def_musepack='#define CONFIG_MUSEPACK 1' - _ld_extra="$_ld_extra -lmpcdec" + _extra_ldflags="$_extra_ldflags -lmpcdec" _codecmodules="musepack $_codecmodules" else def_musepack='#undef CONFIG_MUSEPACK' @@ -6552,7 +6552,7 @@ if test "$_faad_internal" = yes ; then _res_comment="internal fixed-point" fi elif test "$_faad" = yes ; then - _ld_extra="$_ld_extra -lfaad" + _extra_ldflags="$_extra_ldflags -lfaad" fi if test "$_faad" = yes ; then @@ -6622,7 +6622,7 @@ if test "$_win32dll" = yes ; then def_win32_loader='#define WIN32_LOADER 1' _win32_emulation=yes else - _ld_extra="$_ld_extra -ladvapi32 -lole32" + _extra_ldflags="$_extra_ldflags -ladvapi32 -lole32" _res_comment="using native windows" fi _codecmodules="win32 $_codecmodules" @@ -6701,7 +6701,7 @@ if test "$_nemesi" = auto && test "$_ne _nemesi=no if $_pkg_config libnemesi --atleast-version=0.6.3 ; then _extra_cflags="$_extra_cflags `$_pkg_config --cflags libnemesi`" - _ld_extra="$_ld_extra `$_pkg_config --libs libnemesi`" + _extra_ldflags="$_extra_ldflags `$_pkg_config --libs libnemesi`" _nemesi=yes fi fi @@ -6731,11 +6731,11 @@ EOF for I in $_extra_cflags "-I$_libdir/live" "-I/usr/lib/live" "-I/usr/lib64/live" "-I/usr/local/live" "-I/usr/local/lib/live" ; do cxx_check $I/liveMedia/include $I/UsageEnvironment/include \ $I/groupsock/include && _livelibdir=`echo $I| sed s/-I//` && \ - _ld_extra="$_livelibdir/liveMedia/libliveMedia.a \ + _extra_ldflags="$_livelibdir/liveMedia/libliveMedia.a \ $_livelibdir/groupsock/libgroupsock.a \ $_livelibdir/UsageEnvironment/libUsageEnvironment.a \ $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \ - $_ld_extra -lstdc++" \ + $_extra_ldflags -lstdc++" \ _extra_cxxflags="-I$_livelibdir/liveMedia/include \ -I$_livelibdir/UsageEnvironment/include \ -I$_livelibdir/BasicUsageEnvironment/include \ @@ -6756,7 +6756,7 @@ elif test "$_live_dist" = yes && test "$ _res_comment="using distribution version" _live="yes" def_live='#define CONFIG_LIVE555 1' - _ld_extra="$_ld_extra -lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++" + _extra_ldflags="$_extra_ldflags -lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++" _extra_cxxflags="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \ -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock" _inputmodules="live555 $_inputmodules" @@ -6785,10 +6785,10 @@ EOF if $_pkg_config --exists libavutil ; then _inc_libavutil=`$_pkg_config --cflags libavutil` _ld_tmp=`$_pkg_config --libs libavutil` - cc_check $_inc_libavutil $_ld_tmp && _ld_extra="$_ld_extra $_ld_tmp" \ + cc_check $_inc_libavutil $_ld_tmp && _extra_ldflags="$_extra_ldflags $_ld_tmp" \ && _libavutil_so=yes elif cc_check -lavutil $_ld_lm ; then - _ld_extra="$_ld_extra -lavutil" + _extra_ldflags="$_extra_ldflags -lavutil" _libavutil_so=yes _res_comment="using libavutil.so, but static libavutil is recommended" fi @@ -6824,10 +6824,10 @@ EOF if $_pkg_config --exists libavcodec ; then _inc_libavcodec=`$_pkg_config --cflags libavcodec` _ld_tmp=`$_pkg_config --libs libavcodec` - cc_check $_inc_libavcodec $_ld_tmp && _ld_extra="$_ld_extra $_ld_tmp" \ + cc_check $_inc_libavcodec $_ld_tmp && _extra_ldflags="$_extra_ldflags $_ld_tmp" \ && _libavcodec_so=yes elif cc_check -lavcodec $_ld_lm ; then - _ld_extra="$_ld_extra -lavcodec" + _extra_ldflags="$_extra_ldflags -lavcodec" _libavcodec_so=yes _res_comment="using libavcodec.so, but static libavcodec is recommended" fi @@ -6868,10 +6868,10 @@ EOF if $_pkg_config --exists libavformat ; then _inc_libavformat=`$_pkg_config --cflags libavformat` _ld_tmp=`$_pkg_config --libs libavformat` - cc_check $_inc_libavformat $_ld_tmp && _ld_extra="$_ld_extra $_ld_tmp" \ + cc_check $_inc_libavformat $_ld_tmp && _extra_ldflags="$_extra_ldflags $_ld_tmp" \ && _libavformat_so=yes elif cc_check $_ld_lm -lavformat ; then - _ld_extra="$_ld_extra -lavformat" + _extra_ldflags="$_extra_ldflags -lavformat" _libavformat_so=yes _res_comment="using libavformat.so, but static libavformat is recommended" fi @@ -6902,7 +6902,7 @@ elif test "$_libpostproc_so" = auto ; th int main(void) { pp_get_mode_by_name_and_quality("de", 0); return 0; } EOF if cc_check -lpostproc $_ld_lm ; then - _ld_extra="$_ld_extra -lpostproc" + _extra_ldflags="$_extra_ldflags -lpostproc" _libpostproc_so=yes _res_comment="using libpostproc.so, but static libpostproc is recommended" fi @@ -6935,10 +6935,10 @@ EOF if $_pkg_config --exists libswscale ; then _inc_libswscale=`$_pkg_config --cflags libswscale` _ld_tmp=`$_pkg_config --libs libswscale` - cc_check $_inc_libswscale $_ld_tmp && _ld_extra="$_ld_extra $_ld_tmp" \ + cc_check $_inc_libswscale $_ld_tmp && _extra_ldflags="$_extra_ldflags $_ld_tmp" \ && _libswscale_so=yes elif cc_check -lswscale ; then - _ld_extra="$_ld_extra -lswscale" + _extra_ldflags="$_extra_ldflags -lswscale" _libswscale_so=yes fi fi @@ -6968,7 +6968,7 @@ EOF fi if test "$_libamr_nb" = yes ; then _libamr=yes - _ld_extra="$_ld_extra -lamrnb" + _extra_ldflags="$_extra_ldflags -lamrnb" def_libamr='#define CONFIG_LIBAMR 1' def_libamr_nb='#define CONFIG_LIBAMR_NB 1' _libavdecoders="$_libavdecoders LIBAMR_NB_DECODER" @@ -6996,7 +6996,7 @@ EOF fi if test "$_libamr_wb" = yes ; then _libamr=yes - _ld_extra="$_ld_extra -lamrwb" + _extra_ldflags="$_extra_ldflags -lamrwb" def_libamr='#define CONFIG_LIBAMR 1' def_libamr_wb='#define CONFIG_LIBAMR_WB 1' _libavdecoders="$_libavdecoders LIBAMR_WB_DECODER" @@ -7019,7 +7019,7 @@ EOF fi if test "$_libdv" = yes ; then def_libdv='#define CONFIG_LIBDV095 1' - _ld_extra="$_ld_extra -ldv" + _extra_ldflags="$_extra_ldflags -ldv" _codecmodules="libdv $_codecmodules" else def_libdv='#undef CONFIG_LIBDV095' @@ -7036,7 +7036,7 @@ if test "$_xvid" = auto ; then int main(void) { xvid_global(0, 0, 0, 0); return 0; } EOF for _ld_tmp in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do - cc_check $_ld_tmp && _ld_extra="$_ld_extra $_ld_tmp" && _xvid=yes && break + cc_check $_ld_tmp && _extra_ldflags="$_extra_ldflags $_ld_tmp" && _xvid=yes && break done fi @@ -7128,7 +7128,7 @@ EOF cc_check $_inc_dirac $_ld_dirac && _libdirac_lavc=yes && _extra_cflags="$_extra_cflags $_inc_dirac" && - _ld_extra="$_ld_extra $_ld_dirac" + _extra_ldflags="$_extra_ldflags $_ld_dirac" fi fi fi @@ -7160,7 +7160,7 @@ EOF cc_check $_inc_schroedinger $_ld_schroedinger && _libschroedinger_lavc=yes && _extra_cflags="$_extra_cflags $_inc_schroedinger" && - _ld_extra="$_ld_extra $_ld_schroedinger" + _extra_ldflags="$_extra_ldflags $_ld_schroedinger" fi fi fi @@ -7190,7 +7190,7 @@ fi if test "$_libnut" = yes ; then def_libnut='#define CONFIG_LIBNUT 1' - _ld_extra="$_ld_extra -lnut" + _extra_ldflags="$_extra_ldflags -lnut" else def_libnut='#undef CONFIG_LIBNUT' fi @@ -7406,7 +7406,7 @@ fi if test "$_tv_dshow" = yes ; then _inputmodules="tv-dshow $_inputmodules" def_tv_dshow='#define CONFIG_TV_DSHOW 1' - _ld_extra="$_ld_extra -lole32 -luuid" + _extra_ldflags="$_extra_ldflags -lole32 -luuid" else _noinputmodules="tv-dshow $_noinputmodules" def_tv_dshow='#undef CONFIG_TV_DSHOW' @@ -7620,7 +7620,7 @@ fi if test "$_vstream" = yes ; then def_vstream='#define CONFIG_VSTREAM 1' _inputmodules="vstream $_inputmodules" - _ld_extra="$_ld_extra -lvstream-client" + _extra_ldflags="$_extra_ldflags -lvstream-client" else _noinputmodules="vstream $_noinputmodules" def_vstream='#undef CONFIG_VSTREAM' @@ -7660,9 +7660,9 @@ if test "$_xmms" = yes ; then def_xmms='#define CONFIG_XMMS 1' if darwin ; then - _ld_extra="$_ld_extra ${_xmmslibdir}/libxmms.dylib" + _extra_ldflags="$_extra_ldflags ${_xmmslibdir}/libxmms.dylib" else - _ld_extra="$_ld_extra ${_xmmslibdir}/libxmms.so.1 -export-dynamic" + _extra_ldflags="$_extra_ldflags ${_xmmslibdir}/libxmms.so.1 -export-dynamic" fi else def_xmms='#undef CONFIG_XMMS' @@ -7836,7 +7836,7 @@ cat > $TMPC < References: <20090324002252.3D7E66C08E@natsuki.mplayerhq.hu> Message-ID: <20090323213009.fcd258db.tempn@twmi.rr.com> On Tue, 24 Mar 2009 01:22:52 +0100 (CET), diego wrote: >Author: diego >Date: Tue Mar 24 01:22:51 2009 >New Revision: 29045 > >Log: >Replace --with-extralibdir option by --extra-ldflags, which accepts so this breaks a lot of mplayer build scripts then? -compn From jknutar at nic.fi Tue Mar 24 04:11:34 2009 From: jknutar at nic.fi (Jan Knutar) Date: Tue, 24 Mar 2009 05:11:34 +0200 Subject: [MPlayer-cvslog] r29045 - trunk/configure In-Reply-To: <20090323213009.fcd258db.tempn@twmi.rr.com> References: <20090324002252.3D7E66C08E@natsuki.mplayerhq.hu> <20090323213009.fcd258db.tempn@twmi.rr.com> Message-ID: <200903240511.49009.jknutar@nic.fi> On Tuesday 24 March 2009, compn wrote: > On Tue, 24 Mar 2009 01:22:52 +0100 (CET), diego wrote: > >Author: diego > >Date: Tue Mar 24 01:22:51 2009 > >New Revision: 29045 > > > >Log: > >Replace --with-extralibdir option by --extra-ldflags, which accepts > > so this breaks a lot of mplayer build scripts then? Would be nice with a backwards compatible --with-extralibdir retained, and/or a mention i the changelog, for example, of how to specify directories with the new syntax. From diego at biurrun.de Tue Mar 24 08:16:54 2009 From: diego at biurrun.de (Diego Biurrun) Date: Tue, 24 Mar 2009 08:16:54 +0100 Subject: [MPlayer-cvslog] r29045 - trunk/configure In-Reply-To: <20090323213009.fcd258db.tempn@twmi.rr.com> References: <20090324002252.3D7E66C08E@natsuki.mplayerhq.hu> <20090323213009.fcd258db.tempn@twmi.rr.com> Message-ID: <20090324071654.GE8424@pool.informatik.rwth-aachen.de> On Mon, Mar 23, 2009 at 09:30:09PM -0400, compn wrote: > On Tue, 24 Mar 2009 01:22:52 +0100 (CET), diego wrote: > > > >Log: > >Replace --with-extralibdir option by --extra-ldflags, which accepts > > so this breaks a lot of mplayer build scripts then? Yes. There has never been a guarantee of stability for those options. Diego From Reimar.Doeffinger at gmx.de Tue Mar 24 09:43:17 2009 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Tue, 24 Mar 2009 09:43:17 +0100 Subject: [MPlayer-cvslog] r29045 - trunk/configure In-Reply-To: <20090324002252.3D7E66C08E@natsuki.mplayerhq.hu> References: <20090324002252.3D7E66C08E@natsuki.mplayerhq.hu> Message-ID: <20090324084317.GA6448@1und1.de> On Tue, Mar 24, 2009 at 01:22:52AM +0100, diego wrote: > Author: diego > Date: Tue Mar 24 01:22:51 2009 > New Revision: 29045 > > Log: > Replace --with-extralibdir option by --extra-ldflags, which accepts arbitrary > LDFLAGS. Also rename the corresponding variable for consistency. I think you forgot to change --help this time.. From diego at biurrun.de Tue Mar 24 10:24:53 2009 From: diego at biurrun.de (Diego Biurrun) Date: Tue, 24 Mar 2009 10:24:53 +0100 Subject: [MPlayer-cvslog] r29045 - trunk/configure In-Reply-To: <20090324084317.GA6448@1und1.de> References: <20090324002252.3D7E66C08E@natsuki.mplayerhq.hu> <20090324084317.GA6448@1und1.de> Message-ID: <20090324092453.GA9341@pool.informatik.rwth-aachen.de> On Tue, Mar 24, 2009 at 09:43:17AM +0100, Reimar D?ffinger wrote: > On Tue, Mar 24, 2009 at 01:22:52AM +0100, diego wrote: > > > > Log: > > Replace --with-extralibdir option by --extra-ldflags, which accepts arbitrary > > LDFLAGS. Also rename the corresponding variable for consistency. > > I think you forgot to change --help this time.. Aw crud, you are right of course. I'll fix it in a sec. Diego From subversion at mplayerhq.hu Tue Mar 24 10:32:36 2009 From: subversion at mplayerhq.hu (diego) Date: Tue, 24 Mar 2009 10:32:36 +0100 (CET) Subject: [MPlayer-cvslog] r29049 - trunk/configure Message-ID: <20090324093236.803713B7DD@natsuki.mplayerhq.hu> Author: diego Date: Tue Mar 24 10:32:35 2009 New Revision: 29049 Log: Update help output with previous --extra-ldflags change. Modified: trunk/configure Modified: trunk/configure ============================================================================== --- trunk/configure Tue Mar 24 08:11:35 2009 (r29048) +++ trunk/configure Tue Mar 24 10:32:35 2009 (r29049) @@ -464,13 +464,12 @@ Advanced options: --enable-crash-debug enable automatic gdb attach on crash [disable] --enable-dynamic-plugins enable dynamic A/V plugins [disable] -Use these options if autodetection fails (Options marked with (*) accept -multiple paths separated by ':'): +Use these options if autodetection fails: --extra-cflags=FLAGS extra CFLAGS + --extra-ldflags=FLAGS extra LDFLAGS --extra-libs=FLAGS extra linker flags --extra-libs-mplayer=FLAGS extra linker flags for MPlayer --extra-libs-mencoder=FLAGS extra linker flags for MEncoder - --with-extralibdir=DIR extra linker search paths in DIR (*) --with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA) --with-freetype-config=PATH path to freetype-config From diego at biurrun.de Tue Mar 24 11:14:24 2009 From: diego at biurrun.de (Diego Biurrun) Date: Tue, 24 Mar 2009 11:14:24 +0100 Subject: [MPlayer-cvslog] r29041 - trunk/Makefile In-Reply-To: <1237851963.28165.276.camel@glyph.nonexistent.invalid> References: <20090323224253.E5AEA6C05C@natsuki.mplayerhq.hu> <1237851963.28165.276.camel@glyph.nonexistent.invalid> Message-ID: <20090324101424.GC9341@pool.informatik.rwth-aachen.de> On Tue, Mar 24, 2009 at 01:46:03AM +0200, Uoti Urpala wrote: > On Mon, 2009-03-23 at 23:42 +0100, diego wrote: > > Log: > > Do not use full CFLAGS to build codec-cfg, they are unnecessary. > > > codec-cfg$(EXESUF): codec-cfg.c help_mp.h > > - $(HOST_CC) -O -DCODECS2HTML $(EXTRA_INC) -o $@ $< > > + $(HOST_CC) -O -DCODECS2HTML -I. -o $@ $< > > This exactly reverts a commit you did earlier. Have the reasons for that > earlier change disappeared? (IIRC it was done for separate libavutil > support or something like that.) This was the only place EXTRA_INC was used, I wanted to get rid of it. I am also a bit suspicious of using the very same CFLAGS with HOST_CC. Diego From bircoph at gmail.com Tue Mar 24 12:55:21 2009 From: bircoph at gmail.com (Andrew Savchenko) Date: Tue, 24 Mar 2009 14:55:21 +0300 Subject: [MPlayer-cvslog] r29043 - trunk/configure In-Reply-To: <20090323233751.7085C6C05D@natsuki.mplayerhq.hu> References: <20090323233751.7085C6C05D@natsuki.mplayerhq.hu> Message-ID: <200903241455.30422.bircoph@gmail.com> Hi, On Tuesday 24 March 2009 02:37, diego wrote: > Author: diego > Date: Tue Mar 24 00:37:51 2009 > New Revision: 29043 > > Log: > Rename --with-extraincdir option to --extra-cflags. [...] > Use these options if autodetection fails (Options marked with > (*) accept multiple paths separated by ':'): > + --extra-cflags=FLAGS extra CFLAGS > --extra-libs=FLAGS extra linker flags > --extra-libs-mplayer=FLAGS extra linker flags for MPlayer > --extra-libs-mencoder=FLAGS extra linker flags for MEncoder > - --with-extraincdir=DIR extra header search paths in DIR > (*) --with-extralibdir=DIR extra linker search paths in DIR > (*) --with-xvmclib=NAME adapter-specific library name > (e.g. XvMCNVIDIA) > > @@ -765,9 +765,6 @@ for ac_option do > --realcodecsdir=*) > _realcodecsdir=`echo $ac_option | cut -d '=' -f 2` > ;; > - --with-extraincdir=*) > - _inc_extra=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, > -I,g'` - ;; > --with-extralibdir=*) > _ld_extra=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, > -L,g'` ;; > @@ -801,6 +798,9 @@ for ac_option do > _dvdreadconfig=`echo $ac_option | cut -d '=' -f 2` > ;; > > + --extra-cflags=*) > + _extra_cflags=-`echo $ac_option | cut -d '=' -f 2` > + ;; This brokes multiple paths specification, previously it was possible using ':' separator. Please fix it. -- Best regards, Andrew -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From diego at biurrun.de Tue Mar 24 13:43:59 2009 From: diego at biurrun.de (Diego Biurrun) Date: Tue, 24 Mar 2009 13:43:59 +0100 Subject: [MPlayer-cvslog] r29043 - trunk/configure In-Reply-To: <200903241455.30422.bircoph@gmail.com> References: <20090323233751.7085C6C05D@natsuki.mplayerhq.hu> <200903241455.30422.bircoph@gmail.com> Message-ID: <20090324124359.GB20890@pool.informatik.rwth-aachen.de> On Tue, Mar 24, 2009 at 02:55:21PM +0300, Andrew Savchenko wrote: > > On Tuesday 24 March 2009 02:37, diego wrote: > > > > Log: > > Rename --with-extraincdir option to --extra-cflags. > [...] > > @@ -765,9 +765,6 @@ for ac_option do > > - --with-extraincdir=*) > > - _inc_extra=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, > > -I,g'` - ;; > > -L,g'` ;; > > @@ -801,6 +798,9 @@ for ac_option do > > > > + --extra-cflags=*) > > + _extra_cflags=-`echo $ac_option | cut -d '=' -f 2` > > + ;; > > This brokes multiple paths specification, previously it was > possible using ':' separator. Please fix it. This is intended behavior. Just pass whatever CFLAGS you need to the new option, surrounded by quotes. Diego From bircoph at gmail.com Tue Mar 24 13:55:02 2009 From: bircoph at gmail.com (Andrew Savchenko) Date: Tue, 24 Mar 2009 15:55:02 +0300 Subject: [MPlayer-cvslog] r29043 - trunk/configure In-Reply-To: <20090324124359.GB20890@pool.informatik.rwth-aachen.de> References: <20090323233751.7085C6C05D@natsuki.mplayerhq.hu> <200903241455.30422.bircoph@gmail.com> <20090324124359.GB20890@pool.informatik.rwth-aachen.de> Message-ID: <200903241555.20346.bircoph@gmail.com> Hi, On Tuesday 24 March 2009 15:43, Diego Biurrun wrote: > On Tue, Mar 24, 2009 at 02:55:21PM +0300, Andrew Savchenko wrote: > > On Tuesday 24 March 2009 02:37, diego wrote: > > > Log: > > > Rename --with-extraincdir option to --extra-cflags. > > > > [...] > > > > > @@ -765,9 +765,6 @@ for ac_option do > > > - --with-extraincdir=*) > > > - _inc_extra=-I`echo $ac_option | cut -d '=' -f 2 | sed > > > 's,:, -I,g'` - ;; > > > -L,g'` ;; > > > @@ -801,6 +798,9 @@ for ac_option do > > > > > > + --extra-cflags=*) > > > + _extra_cflags=-`echo $ac_option | cut -d '=' -f 2` > > > + ;; > > > > This brokes multiple paths specification, previously it was > > possible using ':' separator. Please fix it. > > This is intended behavior. Just pass whatever CFLAGS you need > to the new option, surrounded by quotes. This is easy to do on plain command line, but it will produce an escape hell for nested bash variables commonly used in different packaging systems. While this problem is still solvable, it creates a lot of headache and imho is not desirable. -- Best regards, Andrew -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From diego at biurrun.de Tue Mar 24 13:57:28 2009 From: diego at biurrun.de (Diego Biurrun) Date: Tue, 24 Mar 2009 13:57:28 +0100 Subject: [MPlayer-cvslog] r29043 - trunk/configure In-Reply-To: <200903241555.20346.bircoph@gmail.com> References: <20090323233751.7085C6C05D@natsuki.mplayerhq.hu> <200903241455.30422.bircoph@gmail.com> <20090324124359.GB20890@pool.informatik.rwth-aachen.de> <200903241555.20346.bircoph@gmail.com> Message-ID: <20090324125728.GE20890@pool.informatik.rwth-aachen.de> On Tue, Mar 24, 2009 at 03:55:02PM +0300, Andrew Savchenko wrote: > > On Tuesday 24 March 2009 15:43, Diego Biurrun wrote: > > On Tue, Mar 24, 2009 at 02:55:21PM +0300, Andrew Savchenko wrote: > > > On Tuesday 24 March 2009 02:37, diego wrote: > > > > Log: > > > > Rename --with-extraincdir option to --extra-cflags. > > > > > > [...] > > > > > > > @@ -765,9 +765,6 @@ for ac_option do > > > > - --with-extraincdir=*) > > > > - _inc_extra=-I`echo $ac_option | cut -d '=' -f 2 | sed > > > > 's,:, -I,g'` - ;; > > > > -L,g'` ;; > > > > @@ -801,6 +798,9 @@ for ac_option do > > > > > > > > + --extra-cflags=*) > > > > + _extra_cflags=-`echo $ac_option | cut -d '=' -f 2` > > > > + ;; > > > > > > This brokes multiple paths specification, previously it was > > > possible using ':' separator. Please fix it. > > > > This is intended behavior. Just pass whatever CFLAGS you need > > to the new option, surrounded by quotes. > > This is easy to do on plain command line, but it will produce an > escape hell for nested bash variables commonly used in different > packaging systems. While this problem is still solvable, it > creates a lot of headache and imho is not desirable. This is standard behavior for most other configure programs I know, so packaging systems must already have found a way to deal with this. Diego From subversion at mplayerhq.hu Tue Mar 24 20:48:52 2009 From: subversion at mplayerhq.hu (compn) Date: Tue, 24 Mar 2009 20:48:52 +0100 (CET) Subject: [MPlayer-cvslog] r29050 - trunk/etc/codecs.conf Message-ID: <20090324194852.A67F5500AD@natsuki.mplayerhq.hu> Author: compn Date: Tue Mar 24 20:48:51 2009 New Revision: 29050 Log: sqcp plays with ffqclp in ffmpeg Modified: trunk/etc/codecs.conf Modified: trunk/etc/codecs.conf ============================================================================== --- trunk/etc/codecs.conf Tue Mar 24 10:32:35 2009 (r29049) +++ trunk/etc/codecs.conf Tue Mar 24 20:48:51 2009 (r29050) @@ -3036,6 +3036,7 @@ audiocodec ffqclp info "FFmpeg QCLP audio" status buggy format 0x706C6351 ; "Qclp" + format 0x70637173 ; "sqcp" driver ffmpeg dll "qcelp" From subversion at mplayerhq.hu Tue Mar 24 22:45:40 2009 From: subversion at mplayerhq.hu (cehoyos) Date: Tue, 24 Mar 2009 22:45:40 +0100 (CET) Subject: [MPlayer-cvslog] r29051 - trunk/libvo/vo_vdpau.c Message-ID: <20090324214540.C00B05011F@natsuki.mplayerhq.hu> Author: cehoyos Date: Tue Mar 24 22:45:39 2009 New Revision: 29051 Log: Stephen Warren reported that VDPAU deinterlacing did not work correctly. New static function push_deint_surface() by Reimar. Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Tue Mar 24 20:48:51 2009 (r29050) +++ trunk/libvo/vo_vdpau.c Tue Mar 24 22:45:39 2009 (r29051) @@ -212,6 +212,13 @@ static int static void draw_eosd(void); +static void push_deint_surface(VdpVideoSurface surface) +{ + deint_surfaces[2] = deint_surfaces[1]; + deint_surfaces[1] = deint_surfaces[0]; + deint_surfaces[0] = surface; +} + static void video_to_output_surface(void) { VdpTime dummy; @@ -227,9 +234,10 @@ static void video_to_output_surface(void draw_eosd(); draw_osd(); flip_page(); + push_deint_surface(surface_render[vid_surface_num].surface); } if (deint) - field = top_field_first == i ? + field = (top_field_first == i) ^ (deint > 2) ? VDP_VIDEO_MIXER_PICTURE_STRUCTURE_BOTTOM_FIELD: VDP_VIDEO_MIXER_PICTURE_STRUCTURE_TOP_FIELD; output_surface = output_surfaces[surface_num]; @@ -887,9 +895,7 @@ static uint32_t draw_image(mp_image_t *m if (deint < 3) deint_surfaces[0] = surface_render[vid_surface_num].surface; video_to_output_surface(); - deint_surfaces[2] = deint_surfaces[1]; - deint_surfaces[1] = deint_surfaces[0]; - deint_surfaces[0] = surface_render[vid_surface_num].surface; + push_deint_surface(surface_render[vid_surface_num].surface); return VO_TRUE; } From subversion at mplayerhq.hu Tue Mar 24 22:47:56 2009 From: subversion at mplayerhq.hu (cehoyos) Date: Tue, 24 Mar 2009 22:47:56 +0100 (CET) Subject: [MPlayer-cvslog] r29052 - trunk/libvo/vo_vdpau.c Message-ID: <20090324214756.69BD15011E@natsuki.mplayerhq.hu> Author: cehoyos Date: Tue Mar 24 22:47:56 2009 New Revision: 29052 Log: New vdpau deinterlacing code needs one reference surface less. Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Tue Mar 24 22:45:39 2009 (r29051) +++ trunk/libvo/vo_vdpau.c Tue Mar 24 22:47:56 2009 (r29052) @@ -148,7 +148,7 @@ static void #define osd_surface output_surfaces[NUM_OUTPUT_SURFACES] static VdpOutputSurface output_surfaces[NUM_OUTPUT_SURFACES + 1]; static VdpVideoSurface deint_surfaces[3]; -static mp_image_t *deint_mpi[3]; +static mp_image_t *deint_mpi[2]; static int output_surface_width, output_surface_height; static VdpVideoMixer video_mixer; @@ -466,7 +466,7 @@ static void free_video_specific(void) { for (i = 0; i < 3; i++) deint_surfaces[i] = VDP_INVALID_HANDLE; - for (i = 0; i < 3; i++) + for (i = 0; i < 2; i++) if (deint_mpi[i]) { deint_mpi[i]->usage_count--; deint_mpi[i] = NULL; @@ -872,9 +872,8 @@ static uint32_t draw_image(mp_image_t *m vid_surface_num = rndr - surface_render; if (deint_buffer_past_frames) { mpi->usage_count++; - if (deint_mpi[2]) - deint_mpi[2]->usage_count--; - deint_mpi[2] = deint_mpi[1]; + if (deint_mpi[1]) + deint_mpi[1]->usage_count--; deint_mpi[1] = deint_mpi[0]; deint_mpi[0] = mpi; } @@ -1035,7 +1034,7 @@ static int preinit(const char *arg) deint_type = 3; deint_counter = 0; deint_buffer_past_frames = 0; - deint_mpi[0] = deint_mpi[1] = deint_mpi[2] = NULL; + deint_mpi[0] = deint_mpi[1] = NULL; chroma_deint = 1; pullup = 0; denoise = 0; From subversion at mplayerhq.hu Tue Mar 24 22:49:08 2009 From: subversion at mplayerhq.hu (cehoyos) Date: Tue, 24 Mar 2009 22:49:08 +0100 (CET) Subject: [MPlayer-cvslog] r29053 - trunk/libvo/vo_vdpau.c Message-ID: <20090324214908.C293F5011F@natsuki.mplayerhq.hu> Author: cehoyos Date: Tue Mar 24 22:49:08 2009 New Revision: 29053 Log: New VDPAU deinterlacing code needs one reference surface less for software decoding. Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Tue Mar 24 22:47:56 2009 (r29052) +++ trunk/libvo/vo_vdpau.c Tue Mar 24 22:49:08 2009 (r29053) @@ -881,7 +881,7 @@ static uint32_t draw_image(mp_image_t *m VdpStatus vdp_st; void *destdata[3] = {mpi->planes[0], mpi->planes[2], mpi->planes[1]}; struct vdpau_render_state *rndr = get_surface(deint_counter); - deint_counter = (deint_counter + 1) & 3; + deint_counter = (deint_counter + 1) % 3; vid_surface_num = rndr - surface_render; vdp_st = vdp_video_surface_put_bits_y_cb_cr(rndr->surface, VDP_YCBCR_FORMAT_YV12, From Reimar.Doeffinger at gmx.de Wed Mar 25 09:05:38 2009 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Wed, 25 Mar 2009 09:05:38 +0100 Subject: [MPlayer-cvslog] r29051 - trunk/libvo/vo_vdpau.c In-Reply-To: <20090324214540.C00B05011F@natsuki.mplayerhq.hu> References: <20090324214540.C00B05011F@natsuki.mplayerhq.hu> Message-ID: <20090325080538.GA5114@1und1.de> On Tue, Mar 24, 2009 at 10:45:40PM +0100, cehoyos wrote: > @@ -227,9 +234,10 @@ static void video_to_output_surface(void > draw_eosd(); > draw_osd(); > flip_page(); > + push_deint_surface(surface_render[vid_surface_num].surface); Hm, I think you should also use that function in draw_image() before video_to_output_surface(), so the surfaces are also correct when you toggle deinterlacing on. Also you should update the documentation, there should be no delay due to deinterlacing anymore, the first field of surface_render[vid_surface_num].surface will be displayed by the correctly timed flip_page. From subversion at mplayerhq.hu Wed Mar 25 20:48:06 2009 From: subversion at mplayerhq.hu (diego) Date: Wed, 25 Mar 2009 20:48:06 +0100 (CET) Subject: [MPlayer-cvslog] r29057 - trunk/configure Message-ID: <20090325194806.4F68A3B4AB@natsuki.mplayerhq.hu> Author: diego Date: Wed Mar 25 20:48:05 2009 New Revision: 29057 Log: cosmetics: Drop leading underscore from extra_ variables. Modified: trunk/configure Modified: trunk/configure ============================================================================== --- trunk/configure Wed Mar 25 19:08:52 2009 (r29056) +++ trunk/configure Wed Mar 25 20:48:05 2009 (r29057) @@ -61,9 +61,9 @@ compile_check() { echo >> "$TMPLOG" cat "$1" >> "$TMPLOG" echo >> "$TMPLOG" - echo "$_cc $CFLAGS $_extra_cflags $_ld_static $_extra_ldflags $_libs_mplayer $_libs_mencoder -o $TMPEXE $@" >> "$TMPLOG" + echo "$_cc $CFLAGS $extra_cflags $_ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o $TMPEXE $@" >> "$TMPLOG" rm -f "$TMPEXE" - $_cc $CFLAGS $_extra_cflags $_ld_static $_extra_ldflags $_libs_mplayer $_libs_mencoder -o "$TMPEXE" "$@" >> "$TMPLOG" 2>&1 + $_cc $CFLAGS $extra_cflags $_ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o "$TMPEXE" "$@" >> "$TMPLOG" 2>&1 TMP="$?" echo >> "$TMPLOG" echo >> "$TMPLOG" @@ -795,19 +795,19 @@ for ac_option do ;; --extra-cflags=*) - _extra_cflags=`echo $ac_option | cut -d '=' -f 2` + extra_cflags=`echo $ac_option | cut -d '=' -f 2` ;; --extra-ldflags=*) - _extra_ldflags=`echo $ac_option | cut -d '=' -f 2` + extra_ldflags=`echo $ac_option | cut -d '=' -f 2` ;; --extra-libs=*) - _extra_libs=`echo $ac_option | cut -d '=' -f 2` + extra_libs=`echo $ac_option | cut -d '=' -f 2` ;; --extra-libs-mplayer=*) - _libs_mplayer=`echo $ac_option | cut -d '=' -f 2` + libs_mplayer=`echo $ac_option | cut -d '=' -f 2` ;; --extra-libs-mencoder=*) - _libs_mencoder=`echo $ac_option | cut -d '=' -f 2` + libs_mencoder=`echo $ac_option | cut -d '=' -f 2` ;; --target=*) @@ -1411,27 +1411,27 @@ if test "$_runtime_cpudetection" = yes & fi -_extra_cflags="-I. $_extra_cflags" +extra_cflags="-I. $extra_cflags" _timer=timer-linux.c _getch=getch2.c if freebsd ; then - _extra_ldflags="$_extra_ldflags -L/usr/local/lib" - _extra_cflags="$_extra_cflags -I/usr/local/include" + extra_ldflags="$extra_ldflags -L/usr/local/lib" + extra_cflags="$extra_cflags -I/usr/local/include" fi if netbsd || dragonfly ; then - _extra_ldflags="$_extra_ldflags -L/usr/pkg/lib" - _extra_cflags="$_extra_cflags -I/usr/pkg/include" + extra_ldflags="$extra_ldflags -L/usr/pkg/lib" + extra_cflags="$extra_cflags -I/usr/pkg/include" fi if darwin; then - _extra_ldflags="$_extra_ldflags -L/usr/local/lib" - _extra_cflags="$_extra_cflags -I/usr/local/include" + extra_ldflags="$extra_ldflags -L/usr/local/lib" + extra_cflags="$extra_cflags -I/usr/local/include" _timer=timer-darwin.c fi if aix ; then - _extra_ldflags="$_extra_ldflags -lC" + extra_ldflags="$extra_ldflags -lC" fi if irix ; then @@ -1443,7 +1443,7 @@ fi if win32 ; then _exesuf=".exe" # -lwinmm is always needed for osdep/timer-win2.c - _extra_ldflags="$_extra_ldflags -lwinmm" + extra_ldflags="$extra_ldflags -lwinmm" _pe_executable=yes _timer=timer-win2.c _priority=yes @@ -1464,7 +1464,7 @@ if amigaos ; then fi if qnx ; then - _extra_ldflags="$_extra_ldflags -lph" + extra_ldflags="$extra_ldflags -lph" fi if os2 ; then @@ -2406,19 +2406,19 @@ elif test -z "$CFLAGS" ; then CFLAGS="-O2 $_march $_mcpu $_pipe" else CFLAGS="-Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer" - _extra_ldflags="$_extra_ldflags -ffast-math" + extra_ldflags="$extra_ldflags -ffast-math" fi else _warn_CFLAGS=yes fi if test -n "$LDFLAGS" ; then - _extra_ldflags="$_extra_ldflags $LDFLAGS" + extra_ldflags="$extra_ldflags $LDFLAGS" _warn_CFLAGS=yes elif test "$cc_vendor" = "intel" ; then - _extra_ldflags="$_extra_ldflags -i-static" + extra_ldflags="$extra_ldflags -i-static" fi if test -n "$CPPFLAGS" ; then - _extra_cflags="$_extra_cflags $CPPFLAGS" + extra_cflags="$extra_cflags $CPPFLAGS" _warn_CFLAGS=yes fi @@ -2719,7 +2719,7 @@ cat > $TMPC < "$TMPEXE"; then + if $_cc -E $TMPC $extra_cflags > "$TMPEXE"; then _directfb_version=`sed -n 's/^dfb_ver[^0-9]*\(.*\)/\1/p' "$TMPEXE" | tr -d '()'` _dfb_major=`echo $_directfb_version | cut -d . -f 1` _dfb_minor=`echo $_directfb_version | cut -d . -f 2` @@ -4129,7 +4129,7 @@ echores "$_directfb" if test "$_directfb" = yes ; then def_directfb='#define CONFIG_DIRECTFB 1' _vomodules="directfb $_vomodules" - _libs_mplayer="$_libs_mplayer -ldirectfb" + libs_mplayer="$libs_mplayer -ldirectfb" else def_directfb='#undef CONFIG_DIRECTFB' _novomodules="directfb $_novomodules" @@ -4146,7 +4146,7 @@ fi echocheck "X11 headers presence" _x11_headers="no" _res_comment="check if the dev(el) packages are installed" - for I in `echo $_extra_cflags | sed s/-I//g` /usr/include ; do + for I in `echo $extra_cflags | sed s/-I//g` /usr/include ; do if test -f "$I/X11/Xlib.h" ; then _x11_headers="yes" _res_comment="" @@ -4157,7 +4157,7 @@ echocheck "X11 headers presence" for I in /usr/X11/include /usr/X11R7/include /usr/X11R6/include \ /usr/include/X11R6 /usr/openwin/include ; do if test -f "$I/X11/Xlib.h" ; then - _extra_cflags="$_extra_cflags -I$I" + extra_cflags="$extra_cflags -I$I" _x11_headers="yes" _res_comment="using $I" break @@ -4182,7 +4182,7 @@ EOF else _ld_tmp="$I -lXext -lX11 $_ld_pthread" fi - cc_check $_ld_tmp && _libs_mplayer="$_libs_mplayer $_ld_tmp" \ + cc_check $_ld_tmp && libs_mplayer="$libs_mplayer $_ld_tmp" \ && _x11=yes && break done fi @@ -4211,7 +4211,7 @@ EOF fi if test "$_xss" = yes ; then def_xss='#define CONFIG_XSS 1' - _libs_mplayer="$_libs_mplayer -lXss" + libs_mplayer="$libs_mplayer -lXss" else def_xss='#undef CONFIG_XSS' fi @@ -4243,7 +4243,7 @@ if test "$_xdpms4" = yes ; then echores "yes" elif test "$_xdpms3" = yes ; then def_xdpms='#define CONFIG_XDPMS 1' - _libs_mplayer="$_libs_mplayer -lXdpms" + libs_mplayer="$libs_mplayer -lXdpms" _res_comment="using Xdpms 3" echores "yes" else @@ -4268,7 +4268,7 @@ fi if test "$_xv" = yes ; then def_xv='#define CONFIG_XV 1' - _libs_mplayer="$_libs_mplayer -lXv" + libs_mplayer="$libs_mplayer -lXv" _vomodules="xv $_vomodules" else def_xv='#undef CONFIG_XV' @@ -4295,7 +4295,7 @@ EOF fi if test "$_xvmc" = yes ; then def_xvmc='#define CONFIG_XVMC 1' - _libs_mplayer="$_libs_mplayer -lXvMC -l$_xvmclib" + libs_mplayer="$libs_mplayer -lXvMC -l$_xvmclib" _vomodules="xvmc $_vomodules" _res_comment="using $_xvmclib" else @@ -4341,7 +4341,7 @@ fi if test "$_xinerama" = yes ; then def_xinerama='#define CONFIG_XINERAMA 1' - _libs_mplayer="$_libs_mplayer -lXinerama" + libs_mplayer="$libs_mplayer -lXinerama" else def_xinerama='#undef CONFIG_XINERAMA' fi @@ -4365,7 +4365,7 @@ EOF fi if test "$_vm" = yes ; then def_vm='#define CONFIG_XF86VM 1' - _libs_mplayer="$_libs_mplayer -lXxf86vm" + libs_mplayer="$libs_mplayer -lXxf86vm" else def_vm='#undef CONFIG_XF86VM' fi @@ -4427,7 +4427,7 @@ elif test "$_dga2" = yes ; then fi if test "$_dga" = yes ; then def_dga='#define CONFIG_DGA 1' - _libs_mplayer="$_libs_mplayer -lXxf86dga" + libs_mplayer="$libs_mplayer -lXxf86dga" _vomodules="dga $_vomodules" else _novomodules="dga $_novomodules" @@ -4472,14 +4472,14 @@ EOF _gl=no if cc_check -lGL $_ld_lm ; then _gl=yes - _libs_mplayer="$_libs_mplayer -lGL $_ld_dl" + libs_mplayer="$libs_mplayer -lGL $_ld_dl" elif cc_check -lGL $_ld_lm $_ld_pthread ; then _gl=yes - _libs_mplayer="$_libs_mplayer -lGL $_ld_pthread $_ld_dl" + libs_mplayer="$libs_mplayer -lGL $_ld_pthread $_ld_dl" elif cc_check -DGL_WIN32 -lopengl32 ; then _gl=yes _gl_win32=yes - _libs_mplayer="$_libs_mplayer -lopengl32 -lgdi32" + libs_mplayer="$libs_mplayer -lopengl32 -lgdi32" fi else _gl=no @@ -4578,7 +4578,7 @@ fi if test "$_vidix" = yes && win32; then winvidix=yes _vomodules="winvidix $_vomodules" - _libs_mplayer="$_libs_mplayer -lgdi32" + libs_mplayer="$libs_mplayer -lgdi32" else _novomodules="winvidix $_novomodules" fi @@ -4630,7 +4630,7 @@ EOF fi if test "$_ggi" = yes ; then def_ggi='#define CONFIG_GGI 1' - _libs_mplayer="$_libs_mplayer -lggi" + libs_mplayer="$libs_mplayer -lggi" _vomodules="ggi $_vomodules" else def_ggi='#undef CONFIG_GGI' @@ -4652,7 +4652,7 @@ fi # like --disable-ggi --enable-ggiwmh if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then def_ggiwmh='#define CONFIG_GGIWMH 1' - _libs_mplayer="$_libs_mplayer -lggiwmh" + libs_mplayer="$libs_mplayer -lggiwmh" else _ggiwmh=no def_ggiwmh='#undef CONFIG_GGIWMH' @@ -4677,13 +4677,13 @@ return 0; } EOF _aa=no for _ld_tmp in "-laa" ; do - cc_check $_ld_tmp && _libs_mplayer="$_libs_mplayer $_ld_tmp" && _aa=yes && break + cc_check $_ld_tmp && libs_mplayer="$libs_mplayer $_ld_tmp" && _aa=yes && break done fi if test "$_aa" = yes ; then def_aa='#define CONFIG_AA 1' if cygwin ; then - _libs_mplayer="$_libs_mplayer `aalib-config --libs | cut -d " " -f 2,5,6`" + libs_mplayer="$libs_mplayer `aalib-config --libs | cut -d " " -f 2,5,6`" fi _vomodules="aa $_vomodules" else @@ -4709,8 +4709,8 @@ EOF fi if test "$_caca" = yes ; then def_caca='#define CONFIG_CACA 1' - _extra_cflags="$_extra_cflags `caca-config --cflags`" - _libs_mplayer="$_libs_mplayer `caca-config --libs`" + extra_cflags="$extra_cflags `caca-config --cflags`" + libs_mplayer="$libs_mplayer `caca-config --libs`" _vomodules="caca $_vomodules" else def_caca='#undef CONFIG_CACA' @@ -4730,7 +4730,7 @@ EOF fi if test "$_svga" = yes ; then def_svga='#define CONFIG_SVGALIB 1' - _libs_mplayer="$_libs_mplayer -lvga" + libs_mplayer="$libs_mplayer -lvga" _vomodules="svga $_vomodules" else def_svga='#undef CONFIG_SVGALIB' @@ -4773,7 +4773,7 @@ int main(void) {return 0;} EOF for _inc_tmp in "" "-I/usr/src/DVB/ost/include" ; do cc_check $_inc_tmp && _dvb=yes && \ - _extra_cflags="$_extra_cflags $_inc_tmp" && break + extra_cflags="$extra_cflags $_inc_tmp" && break done fi echores "$_dvb" @@ -4802,7 +4802,7 @@ int main(void) {return 0;} EOF for _inc_tmp in "" "-I/usr/src/DVB/include" ; do cc_check $_inc_tmp && _dvbhead=yes && \ - _extra_cflags="$_extra_cflags $_inc_tmp" && break + extra_cflags="$extra_cflags $_inc_tmp" && break done fi echores "$_dvbhead" @@ -4862,7 +4862,7 @@ fi echores "$_png" if test "$_png" = yes ; then def_png='#define CONFIG_PNG 1' - _extra_ldflags="$_extra_ldflags -lpng -lz" + extra_ldflags="$extra_ldflags -lpng -lz" _vomodules="png $_vomodules" else def_png='#undef CONFIG_PNG' @@ -4886,7 +4886,7 @@ fi echores "$_mng" if test "$_mng" = yes ; then def_mng='#define CONFIG_MNG 1' - _extra_ldflags="$_extra_ldflags -lmng -lz" + extra_ldflags="$extra_ldflags -lmng -lz" else def_mng='#undef CONFIG_MNG' fi @@ -4913,7 +4913,7 @@ echores "$_jpeg" if test "$_jpeg" = yes ; then def_jpeg='#define CONFIG_JPEG 1' _vomodules="jpeg $_vomodules" - _extra_ldflags="$_extra_ldflags -ljpeg" + extra_ldflags="$extra_ldflags -ljpeg" else def_jpeg='#undef CONFIG_JPEG' _novomodules="jpeg $_novomodules" @@ -4973,7 +4973,7 @@ if test "$_gif" = yes ; then _vomodules="gif89a $_vomodules" _res_comment="old version, some encoding functions disabled" def_gif_4='#undef CONFIG_GIF_4' - _extra_ldflags="$_extra_ldflags $_ld_gif" + extra_ldflags="$extra_ldflags $_ld_gif" cat > $TMPC << EOF #include @@ -5032,7 +5032,7 @@ EOF fi if test "$_vesa" = yes ; then def_vesa='#define CONFIG_VESA 1' - _libs_mplayer="$_libs_mplayer -lvbe -llrmi" + libs_mplayer="$libs_mplayer -lvbe -llrmi" _vomodules="vesa $_vomodules" else def_vesa='#undef CONFIG_VESA' @@ -5081,14 +5081,14 @@ fi if test "$_sdl" = yes ; then def_sdl='#define CONFIG_SDL 1' if cygwin ; then - _libs_mplayer="$_libs_mplayer `$_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/`" - _extra_cflags="$_extra_cflags `$_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/`" + libs_mplayer="$libs_mplayer `$_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/`" + extra_cflags="$extra_cflags `$_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/`" elif mingw32 ; then - _libs_mplayer="$_libs_mplayer `$_sdlconfig --libs | sed -e s/-mwindows// -e s/-lmingw32//`" - _extra_cflags="$_extra_cflags `$_sdlconfig --cflags | sed s/-Dmain=SDL_main//`" + libs_mplayer="$libs_mplayer `$_sdlconfig --libs | sed -e s/-mwindows// -e s/-lmingw32//`" + extra_cflags="$extra_cflags `$_sdlconfig --cflags | sed s/-Dmain=SDL_main//`" else - _libs_mplayer="$_libs_mplayer `$_sdlconfig --libs`" - _extra_cflags="$_extra_cflags `$_sdlconfig --cflags | sed s/-D_GNU_SOURCE=1//`" + libs_mplayer="$libs_mplayer `$_sdlconfig --libs`" + extra_cflags="$extra_cflags `$_sdlconfig --cflags | sed s/-D_GNU_SOURCE=1//`" fi _vomodules="sdl $_vomodules" _aomodules="sdl $_aomodules" @@ -5114,7 +5114,7 @@ EOF fi if test "$_kva" = yes ; then def_kva='#define CONFIG_KVA 1' - _libs_mplayer="$_libs_mplayer -lkva" + libs_mplayer="$libs_mplayer -lkva" _vomodules="kva $_vomodules" else def_kva='#undef CONFIG_KVA' @@ -5138,7 +5138,7 @@ EOF fi if test "$_win32waveout" = yes ; then def_win32waveout='#define CONFIG_WIN32WAVEOUT 1' - _libs_mplayer="$_libs_mplayer -lwinmm" + libs_mplayer="$libs_mplayer -lwinmm" _aomodules="win32 $_aomodules" else def_win32waveout='#undef CONFIG_WIN32WAVEOUT' @@ -5158,7 +5158,7 @@ EOF fi if test "$_direct3d" = yes ; then def_direct3d='#define CONFIG_DIRECT3D 1' - _libs_mplayer="$_libs_mplayer -ld3d9" + libs_mplayer="$libs_mplayer -ld3d9" _vomodules="direct3d $_vomodules" else def_direct3d='#undef CONFIG_DIRECT3D' @@ -5179,7 +5179,7 @@ EOF fi if test "$_directx" = yes ; then def_directx='#define CONFIG_DIRECTX 1' - _libs_mplayer="$_libs_mplayer -lgdi32" + libs_mplayer="$libs_mplayer -lgdi32" _vomodules="directx $_vomodules" _aomodules="dsound $_aomodules" else @@ -5201,7 +5201,7 @@ int main(void) { return 0; } EOF for _inc_tmp in "" -I/usr/local/include/dxr2 -I/usr/include/dxr2; do cc_check $_inc_tmp && _dxr2=yes && \ - _extra_cflags="$_extra_cflags $_inc_tmp" && break + extra_cflags="$extra_cflags $_inc_tmp" && break done fi if test "$_dxr2" = yes; then @@ -5336,7 +5336,7 @@ EOF def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/dsp"' elif netbsd || openbsd ; then def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/sound"' - _extra_ldflags="$_extra_ldflags -lossaudio" + extra_ldflags="$extra_ldflags -lossaudio" else def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/dsp"' fi @@ -5368,8 +5368,8 @@ fi if test "$_arts" = yes ; then def_arts='#define CONFIG_ARTS 1' _aomodules="arts $_aomodules" - _libs_mplayer="$_libs_mplayer `artsc-config --libs`" - _extra_cflags="$_extra_cflags `artsc-config --cflags`" + libs_mplayer="$libs_mplayer `artsc-config --libs`" + extra_cflags="$extra_cflags `artsc-config --cflags`" else _noaomodules="arts $_noaomodules" fi @@ -5394,8 +5394,8 @@ echores "$_esd" if test "$_esd" = yes ; then def_esd='#define CONFIG_ESD 1' _aomodules="esd $_aomodules" - _libs_mplayer="$_libs_mplayer `esd-config --libs`" - _extra_cflags="$_extra_cflags `esd-config --cflags`" + libs_mplayer="$libs_mplayer `esd-config --libs`" + extra_cflags="$extra_cflags `esd-config --cflags`" echocheck "esd_get_latency()" cat > $TMPC << EOF @@ -5422,7 +5422,7 @@ EOF fi if test "$_nas" = yes ; then def_nas='#define CONFIG_NAS 1' - _libs_mplayer="$_libs_mplayer -laudio -lXt" + libs_mplayer="$libs_mplayer -laudio -lXt" _aomodules="nas $_aomodules" else _noaomodules="nas $_noaomodules" @@ -5449,8 +5449,8 @@ echores "$_pulse" if test "$_pulse" = yes ; then def_pulse='#define CONFIG_PULSE 1' _aomodules="pulse $_aomodules" - _libs_mplayer="$_libs_mplayer `$_pkg_config --libs libpulse`" - _extra_cflags="$_extra_cflags `$_pkg_config --cflags libpulse`" + libs_mplayer="$libs_mplayer `$_pkg_config --libs libpulse`" + extra_cflags="$extra_cflags `$_pkg_config --cflags libpulse`" else def_pulse='#undef CONFIG_PULSE' _noaomodules="pulse $_noaomodules" @@ -5466,10 +5466,10 @@ cat > $TMPC << EOF int main(void) { jack_client_open("test", JackUseExactName, NULL); return 0; } EOF if cc_check -ljack ; then - _libs_mplayer="$_libs_mplayer -ljack" + libs_mplayer="$libs_mplayer -ljack" elif cc_check `$_pkg_config --libs --cflags --silence-errors jack` ; then - _libs_mplayer="$_libs_mplayer `$_pkg_config --libs jack`" - _extra_cflags="$_extra_cflags "`$_pkg_config --cflags jack`"" + libs_mplayer="$libs_mplayer `$_pkg_config --libs jack`" + extra_cflags="$extra_cflags "`$_pkg_config --cflags jack`"" else _jack=no fi @@ -5502,7 +5502,7 @@ EOF cc_check $I && _openal=yes && break cc_check -DOPENAL_AL_H=1 $I && def_openal_h='#define OPENAL_AL_H 1' && _openal=yes && break done - test "$_openal" = yes && _libs_mplayer="$_libs_mplayer $I" + test "$_openal" = yes && libs_mplayer="$libs_mplayer $I" fi if test "$_openal" = yes ; then def_openal='#define CONFIG_OPENAL 1' @@ -5613,7 +5613,7 @@ if test "$_alsaver" ; then _alsa=no _res_comment="unknown version" fi - _extra_ldflags="$_extra_ldflags -lasound $_ld_dl $_ld_pthread" + extra_ldflags="$extra_ldflags -lasound $_ld_dl $_ld_pthread" else _noaomodules="alsa $_noaomodules" fi @@ -5668,7 +5668,7 @@ EOF fi if test "$_sgiaudio" = "yes" ; then def_sgiaudio='#define CONFIG_SGI_AUDIO 1' - _libs_mplayer="$_libs_mplayer -laudio" + libs_mplayer="$libs_mplayer -laudio" _aomodules="sgi $_aomodules" else def_sgiaudio='#undef CONFIG_SGI_AUDIO' @@ -5691,7 +5691,7 @@ EOF fi if test "$_dart" = yes ; then def_dart='#define CONFIG_DART 1' - _libs_mplayer="$_libs_mplayer -ldart" + libs_mplayer="$libs_mplayer -ldart" _aomodules="dart $_aomodules" else def_dart='#undef CONFIG_DART' @@ -5754,7 +5754,7 @@ if test "$_dvdread_internal" = auto ; th || darwin || win32 || os2; then _dvdread_internal=yes _dvdread=yes - _extra_cflags="$_extra_cflags -Ilibdvdread4" + extra_cflags="$extra_cflags -Ilibdvdread4" fi elif test "$_dvdread" = auto ; then _dvdread=no @@ -5773,8 +5773,8 @@ EOF if cc_check -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \ $_dvdreadcflags $_dvdreadlibs $_ld_dl ; then _dvdread=yes - _extra_cflags="$_extra_cflags $_dvdreadcflags" - _extra_ldflags="$_extra_ldflags $_dvdreadlibs" + extra_cflags="$extra_cflags $_dvdreadcflags" + extra_ldflags="$extra_ldflags $_dvdreadlibs" _res_comment="external" fi fi @@ -5787,7 +5787,7 @@ if test "$_dvdread_internal" = yes; then elif test "$_dvdread" = yes; then def_dvdread='#define CONFIG_DVDREAD 1' _largefiles=yes - _extra_ldflags="$_extra_ldflags -ldvdread" + extra_ldflags="$extra_ldflags -ldvdread" _inputmodules="dvdread(external) $_inputmodules" _res_comment="external" else @@ -5811,7 +5811,7 @@ if test "$_libdvdcss_internal" = yes ; t def_dvd_bsd='#define HAVE_BSD_DVD_STRUCT 1' elif darwin ; then def_dvd_darwin='#define DARWIN_DVD_IOCTL' - _extra_ldflags="$_extra_ldflags -framework IOKit" + extra_ldflags="$extra_ldflags -framework IOKit" elif cygwin ; then cflags_libdvdcss="-DSYS_CYGWIN -DWIN32" elif beos ; then @@ -5839,13 +5839,13 @@ EOF _cdparanoia=no for _inc_tmp in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do cc_check $_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \ - _cdparanoia=yes && _extra_cflags="$_extra_cflags $_inc_tmp" && break + _cdparanoia=yes && extra_cflags="$extra_cflags $_inc_tmp" && break done fi if test "$_cdparanoia" = yes ; then _cdda='yes' - _extra_ldflags="$_extra_ldflags -lcdda_interface -lcdda_paranoia" - openbsd && _extra_ldflags="$_extra_ldflags -lutil" + extra_ldflags="$extra_ldflags -lcdda_interface -lcdda_paranoia" + openbsd && extra_ldflags="$extra_ldflags -lutil" fi echores "$_cdparanoia" @@ -5867,13 +5867,13 @@ EOF for _ld_tmp in "" "-lwinmm" ; do _ld_tmp="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp" cc_check $_ld_tmp $_ld_lm \ - && _libcdio=yes && _extra_ldflags="$_extra_ldflags $_ld_tmp" && break + && _libcdio=yes && extra_ldflags="$extra_ldflags $_ld_tmp" && break done if test "$_libcdio" = no && $_pkg_config --exists libcdio_paranoia ; then _inc_tmp=`$_pkg_config --cflags libcdio_paranoia` _ld_tmp=`$_pkg_config --libs libcdio_paranoia` cc_check $_inc_tmp $_ld_tmp $_ld_lm && _libcdio=yes \ - && _extra_ldflags="$_extra_ldflags $_ld_tmp" && _extra_cflags="$_extra_cflags $_inc_tmp" + && extra_ldflags="$extra_ldflags $_ld_tmp" && extra_cflags="$extra_cflags $_inc_tmp" fi fi if test "$_libcdio" = yes && test "$_cdparanoia" = no ; then @@ -5960,8 +5960,8 @@ EOF fi if test "$_freetype" = yes ; then def_freetype='#define CONFIG_FREETYPE' - _extra_cflags="$_extra_cflags `$_freetypeconfig --cflags`" - _extra_ldflags="$_extra_ldflags `$_freetypeconfig --libs`" + extra_cflags="$extra_cflags `$_freetypeconfig --cflags`" + extra_ldflags="$extra_ldflags `$_freetypeconfig --libs`" else def_freetype='#undef CONFIG_FREETYPE' fi @@ -5989,13 +5989,13 @@ EOF _fontconfig=no for _ld_tmp in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" ; do _ld_tmp="-lfontconfig $_ld_tmp" - cc_check $_ld_tmp && _fontconfig=yes && _extra_ldflags="$_extra_ldflags $_ld_tmp" && break + cc_check $_ld_tmp && _fontconfig=yes && extra_ldflags="$extra_ldflags $_ld_tmp" && break done if test "$_fontconfig" = no && $_pkg_config --exists fontconfig ; then _inc_tmp=`$_pkg_config --cflags fontconfig` _ld_tmp=`$_pkg_config --libs fontconfig` cc_check $_inc_tmp $_ld_tmp && _fontconfig=yes \ - && _extra_ldflags="$_extra_ldflags $_ld_tmp" && _extra_cflags="$_extra_cflags $_inc_tmp" + && extra_ldflags="$extra_ldflags $_ld_tmp" && extra_cflags="$extra_cflags $_inc_tmp" fi fi if test "$_fontconfig" = yes ; then @@ -6060,8 +6060,8 @@ EOF fi if test "$_fribidi" = yes ; then def_fribidi='#define CONFIG_FRIBIDI' - _extra_cflags="$_extra_cflags `$_fribidiconfig --cflags`" - _extra_ldflags="$_extra_ldflags `$_fribidiconfig --libs`" + extra_cflags="$extra_cflags `$_fribidiconfig --cflags`" + extra_ldflags="$extra_ldflags `$_fribidiconfig --libs`" else def_fribidi='#undef CONFIG_FRIBIDI' fi @@ -6085,7 +6085,7 @@ EOF fi if test "$_enca" = yes ; then def_enca='#define CONFIG_ENCA 1' - _extra_ldflags="$_extra_ldflags -lenca" + extra_ldflags="$extra_ldflags -lenca" else def_enca='#undef CONFIG_ENCA' fi @@ -6101,7 +6101,7 @@ _zlib=no cc_check -lz && _zlib=yes if test "$_zlib" = yes ; then def_zlib='#define CONFIG_ZLIB 1' - _extra_ldflags="$_extra_ldflags -lz" + extra_ldflags="$extra_ldflags -lz" else def_zlib='#define CONFIG_ZLIB 0' _libavdecoders=`echo $_libavdecoders | sed -e s/FLASHSV_DECODER// -e s/PNG_DECODER// -e s/ZMBV_DECODER// -e s/DXA_DECODER// -e s/TSCC_DECODER// ` @@ -6120,7 +6120,7 @@ EOF cc_check -lbz2 && bzlib=yes if test "$bzlib" = yes ; then def_bzlib='#define CONFIG_BZLIB 1' - _extra_ldflags="$_extra_ldflags -lbz2" + extra_ldflags="$extra_ldflags -lbz2" fi echores "$bzlib" @@ -6160,7 +6160,7 @@ EOF fi if test "$_liblzo" = yes ; then def_liblzo='#define CONFIG_LIBLZO 1' - _extra_ldflags="$_extra_ldflags -llzo2" + extra_ldflags="$extra_ldflags -llzo2" _codecmodules="liblzo $_codecmodules" else def_liblzo='#undef CONFIG_LIBLZO' @@ -6180,7 +6180,7 @@ EOF fi if test "$_mad" = yes ; then def_mad='#define CONFIG_LIBMAD 1' - _extra_ldflags="$_extra_ldflags -lmad" + extra_ldflags="$extra_ldflags -lmad" _codecmodules="libmad $_codecmodules" else def_mad='#undef CONFIG_LIBMAD' @@ -6199,7 +6199,7 @@ EOF fi if test "$_twolame" = yes ; then def_twolame='#define CONFIG_TWOLAME 1' - _libs_mencoder="$_libs_mencoder -ltwolame" + libs_mencoder="$libs_mencoder -ltwolame" _codecmodules="twolame $_codecmodules" else def_twolame='#undef CONFIG_TWOLAME' @@ -6222,7 +6222,7 @@ fi fi if test "$_toolame" = yes ; then def_toolame='#define CONFIG_TOOLAME 1' - _libs_mencoder="$_libs_mencoder -ltoolame" + libs_mencoder="$libs_mencoder -ltoolame" _codecmodules="toolame $_codecmodules" else def_toolame='#undef CONFIG_TOOLAME' @@ -6268,13 +6268,13 @@ elif test "$_tremor" = yes ; then def_tremor='#define CONFIG_TREMOR 1' _codecmodules="tremor(external) $_codecmodules" _res_comment="external Tremor" - _extra_ldflags="$_extra_ldflags -logg -lvorbisidec" + extra_ldflags="$extra_ldflags -logg -lvorbisidec" elif test "$_libvorbis" = yes ; then _vorbis=yes def_vorbis='#define CONFIG_OGGVORBIS 1' _codecmodules="libvorbis $_codecmodules" _res_comment="libvorbis" - _extra_ldflags="$_extra_ldflags -lvorbis -logg" + extra_ldflags="$extra_ldflags -lvorbis -logg" else _vorbis=no _nocodecmodules="libvorbis $_nocodecmodules" @@ -6292,7 +6292,7 @@ EOF fi if test "$_speex" = yes ; then def_speex='#define CONFIG_SPEEX 1' - _extra_ldflags="$_extra_ldflags -lspeex" + extra_ldflags="$extra_ldflags -lspeex" _codecmodules="speex $_codecmodules" else def_speex='#undef CONFIG_SPEEX' @@ -6337,22 +6337,22 @@ int main(void) { EOF _ld_theora=$($_pkg_config --silence-errors --libs theora) _inc_theora=$($_pkg_config --silence-errors --cflags theora) - cc_check $_inc_theora $_ld_theora && _extra_ldflags="$_extra_ldflags $_ld_theora" && - _extra_cflags="$_extra_cflags $_inc_theora" && _theora=yes + cc_check $_inc_theora $_ld_theora && extra_ldflags="$extra_ldflags $_ld_theora" && + extra_cflags="$extra_cflags $_inc_theora" && _theora=yes if test _theora = no; then _ld_theora="-ltheora -logg" - cc_check $_ld_theora && _extra_ldflags="$_extra_ldflags $_ld_theora" && _theora=yes + cc_check $_ld_theora && extra_ldflags="$extra_ldflags $_ld_theora" && _theora=yes fi if test "$_theora" = no && test "$_tremor_internal" = yes; then _ld_theora=$($_pkg_config --silence-errors --libs theora) _inc_theora=$($_pkg_config --silence-errors --cflags theora) cc_check tremor/bitwise.c $_inc_theora $_ld_theora && - _extra_ldflags="$_extra_ldflags $_ld_theora" && - _extra_cflags="$_extra_cflags $_inc_theora" && _theora=yes + extra_ldflags="$extra_ldflags $_ld_theora" && + extra_cflags="$extra_cflags $_inc_theora" && _theora=yes if test _theora = no; then _ld_theora="-ltheora -logg" cc_check tremor/bitwise.c $_ld_theora && - _extra_ldflags="$_extra_ldflags $_ld_theora" && _theora=yes + extra_ldflags="$extra_ldflags $_ld_theora" && _theora=yes fi fi fi @@ -6361,7 +6361,7 @@ if test "$_theora" = yes ; then _codecmodules="libtheora $_codecmodules" # when --enable-theora is forced, we'd better provide a probably sane # $_ld_theora than nothing - test -z "$_ld_theora" && _extra_ldflags="$_extra_ldflags -ltheora -logg" + test -z "$_ld_theora" && extra_ldflags="$extra_ldflags -ltheora -logg" else def_theora='#undef CONFIG_OGGTHEORA' _nocodecmodules="libtheora $_nocodecmodules" @@ -6398,7 +6398,7 @@ elif test "$_liba52_internal" = no && te #include int main(void) { a52_state_t *testHand; testHand=a52_init(0); return 0; } EOF - cc_check -la52 && _liba52=yes && _res_comment="external" && _extra_ldflags="$_extra_ldflags -la52" + cc_check -la52 && _liba52=yes && _res_comment="external" && extra_ldflags="$extra_ldflags -la52" fi if test "$_liba52" = yes ; then def_liba52='#define CONFIG_LIBA52 1' @@ -6438,7 +6438,7 @@ if test "$_libdca" = auto ; then int main(void) { dts_init(0); return 0; } EOF for _ld_dca in -ldts -ldca ; do - cc_check $_ld_dca $_ld_lm && _extra_ldflags="$_extra_ldflags $_ld_dca" \ + cc_check $_ld_dca $_ld_lm && extra_ldflags="$extra_ldflags $_ld_dca" \ && _libdca=yes && break done fi @@ -6469,7 +6469,7 @@ EOF fi if test "$_musepack" = yes ; then def_musepack='#define CONFIG_MUSEPACK 1' - _extra_ldflags="$_extra_ldflags -lmpcdec" + extra_ldflags="$extra_ldflags -lmpcdec" _codecmodules="musepack $_codecmodules" else def_musepack='#undef CONFIG_MUSEPACK' @@ -6487,7 +6487,7 @@ int main(void) { unsigned long x, y; faa EOF _faac=no for _ld_faac in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do - cc_check -O4 $_ld_faac $_ld_lm && _libs_mencoder="$_libs_mencoder $_ld_faac" && _faac=yes && break + cc_check -O4 $_ld_faac $_ld_lm && libs_mencoder="$libs_mencoder $_ld_faac" && _faac=yes && break done fi if test "$_faac" = yes ; then @@ -6495,7 +6495,7 @@ if test "$_faac" = yes ; then test "$_faac_lavc" = auto && _faac_lavc=yes if test "$_faac_lavc" = yes ; then def_faac_lavc="#define CONFIG_LIBFAAC 1" - _libs_mplayer="$_libs_mplayer $_ld_faac" + libs_mplayer="$libs_mplayer $_ld_faac" _libavencoders="$_libavencoders LIBFAAC_ENCODER" fi _codecmodules="faac $_codecmodules" @@ -6551,7 +6551,7 @@ if test "$_faad_internal" = yes ; then _res_comment="internal fixed-point" fi elif test "$_faad" = yes ; then - _extra_ldflags="$_extra_ldflags -lfaad" + extra_ldflags="$extra_ldflags -lfaad" fi if test "$_faad" = yes ; then @@ -6621,7 +6621,7 @@ if test "$_win32dll" = yes ; then def_win32_loader='#define WIN32_LOADER 1' _win32_emulation=yes else - _extra_ldflags="$_extra_ldflags -ladvapi32 -lole32" + extra_ldflags="$extra_ldflags -ladvapi32 -lole32" _res_comment="using native windows" fi _codecmodules="win32 $_codecmodules" @@ -6699,8 +6699,8 @@ echocheck "Nemesi Streaming Media librar if test "$_nemesi" = auto && test "$_network" = yes ; then _nemesi=no if $_pkg_config libnemesi --atleast-version=0.6.3 ; then - _extra_cflags="$_extra_cflags `$_pkg_config --cflags libnemesi`" - _extra_ldflags="$_extra_ldflags `$_pkg_config --libs libnemesi`" + extra_cflags="$extra_cflags `$_pkg_config --cflags libnemesi`" + extra_ldflags="$extra_ldflags `$_pkg_config --libs libnemesi`" _nemesi=yes fi fi @@ -6727,15 +6727,15 @@ int main(void) { return 0; } EOF _live=no - for I in $_extra_cflags "-I$_libdir/live" "-I/usr/lib/live" "-I/usr/lib64/live" "-I/usr/local/live" "-I/usr/local/lib/live" ; do + for I in $extra_cflags "-I$_libdir/live" "-I/usr/lib/live" "-I/usr/lib64/live" "-I/usr/local/live" "-I/usr/local/lib/live" ; do cxx_check $I/liveMedia/include $I/UsageEnvironment/include \ $I/groupsock/include && _livelibdir=`echo $I| sed s/-I//` && \ - _extra_ldflags="$_livelibdir/liveMedia/libliveMedia.a \ + extra_ldflags="$_livelibdir/liveMedia/libliveMedia.a \ $_livelibdir/groupsock/libgroupsock.a \ $_livelibdir/UsageEnvironment/libUsageEnvironment.a \ $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \ - $_extra_ldflags -lstdc++" \ - _extra_cxxflags="-I$_livelibdir/liveMedia/include \ + $extra_ldflags -lstdc++" \ + extra_cxxflags="-I$_livelibdir/liveMedia/include \ -I$_livelibdir/UsageEnvironment/include \ -I$_livelibdir/BasicUsageEnvironment/include \ -I$_livelibdir/groupsock/include" && \ @@ -6755,8 +6755,8 @@ elif test "$_live_dist" = yes && test "$ _res_comment="using distribution version" _live="yes" def_live='#define CONFIG_LIVE555 1' - _extra_ldflags="$_extra_ldflags -lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++" - _extra_cxxflags="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \ + extra_ldflags="$extra_ldflags -lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++" + extra_cxxflags="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \ -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock" _inputmodules="live555 $_inputmodules" else @@ -6784,10 +6784,10 @@ EOF if $_pkg_config --exists libavutil ; then _inc_libavutil=`$_pkg_config --cflags libavutil` _ld_tmp=`$_pkg_config --libs libavutil` - cc_check $_inc_libavutil $_ld_tmp && _extra_ldflags="$_extra_ldflags $_ld_tmp" \ + cc_check $_inc_libavutil $_ld_tmp && extra_ldflags="$extra_ldflags $_ld_tmp" \ && _libavutil_so=yes elif cc_check -lavutil $_ld_lm ; then - _extra_ldflags="$_extra_ldflags -lavutil" + extra_ldflags="$extra_ldflags -lavutil" _libavutil_so=yes _res_comment="using libavutil.so, but static libavutil is recommended" fi @@ -6823,10 +6823,10 @@ EOF if $_pkg_config --exists libavcodec ; then _inc_libavcodec=`$_pkg_config --cflags libavcodec` _ld_tmp=`$_pkg_config --libs libavcodec` - cc_check $_inc_libavcodec $_ld_tmp && _extra_ldflags="$_extra_ldflags $_ld_tmp" \ + cc_check $_inc_libavcodec $_ld_tmp && extra_ldflags="$extra_ldflags $_ld_tmp" \ && _libavcodec_so=yes elif cc_check -lavcodec $_ld_lm ; then - _extra_ldflags="$_extra_ldflags -lavcodec" + extra_ldflags="$extra_ldflags -lavcodec" _libavcodec_so=yes _res_comment="using libavcodec.so, but static libavcodec is recommended" fi @@ -6867,10 +6867,10 @@ EOF if $_pkg_config --exists libavformat ; then _inc_libavformat=`$_pkg_config --cflags libavformat` _ld_tmp=`$_pkg_config --libs libavformat` - cc_check $_inc_libavformat $_ld_tmp && _extra_ldflags="$_extra_ldflags $_ld_tmp" \ + cc_check $_inc_libavformat $_ld_tmp && extra_ldflags="$extra_ldflags $_ld_tmp" \ && _libavformat_so=yes elif cc_check $_ld_lm -lavformat ; then - _extra_ldflags="$_extra_ldflags -lavformat" + extra_ldflags="$extra_ldflags -lavformat" _libavformat_so=yes _res_comment="using libavformat.so, but static libavformat is recommended" fi @@ -6901,7 +6901,7 @@ elif test "$_libpostproc_so" = auto ; th int main(void) { pp_get_mode_by_name_and_quality("de", 0); return 0; } EOF if cc_check -lpostproc $_ld_lm ; then - _extra_ldflags="$_extra_ldflags -lpostproc" + extra_ldflags="$extra_ldflags -lpostproc" _libpostproc_so=yes _res_comment="using libpostproc.so, but static libpostproc is recommended" fi @@ -6934,10 +6934,10 @@ EOF if $_pkg_config --exists libswscale ; then _inc_libswscale=`$_pkg_config --cflags libswscale` _ld_tmp=`$_pkg_config --libs libswscale` - cc_check $_inc_libswscale $_ld_tmp && _extra_ldflags="$_extra_ldflags $_ld_tmp" \ + cc_check $_inc_libswscale $_ld_tmp && extra_ldflags="$extra_ldflags $_ld_tmp" \ && _libswscale_so=yes elif cc_check -lswscale ; then - _extra_ldflags="$_extra_ldflags -lswscale" + extra_ldflags="$extra_ldflags -lswscale" _libswscale_so=yes fi fi @@ -6967,7 +6967,7 @@ EOF fi if test "$_libamr_nb" = yes ; then _libamr=yes - _extra_ldflags="$_extra_ldflags -lamrnb" + extra_ldflags="$extra_ldflags -lamrnb" def_libamr='#define CONFIG_LIBAMR 1' def_libamr_nb='#define CONFIG_LIBAMR_NB 1' _libavdecoders="$_libavdecoders LIBAMR_NB_DECODER" @@ -6995,7 +6995,7 @@ EOF fi if test "$_libamr_wb" = yes ; then _libamr=yes - _extra_ldflags="$_extra_ldflags -lamrwb" + extra_ldflags="$extra_ldflags -lamrwb" def_libamr='#define CONFIG_LIBAMR 1' def_libamr_wb='#define CONFIG_LIBAMR_WB 1' _libavdecoders="$_libavdecoders LIBAMR_WB_DECODER" @@ -7018,7 +7018,7 @@ EOF fi if test "$_libdv" = yes ; then def_libdv='#define CONFIG_LIBDV095 1' - _extra_ldflags="$_extra_ldflags -ldv" + extra_ldflags="$extra_ldflags -ldv" _codecmodules="libdv $_codecmodules" else def_libdv='#undef CONFIG_LIBDV095' @@ -7035,7 +7035,7 @@ if test "$_xvid" = auto ; then int main(void) { xvid_global(0, 0, 0, 0); return 0; } EOF for _ld_tmp in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do - cc_check $_ld_tmp && _extra_ldflags="$_extra_ldflags $_ld_tmp" && _xvid=yes && break + cc_check $_ld_tmp && extra_ldflags="$extra_ldflags $_ld_tmp" && _xvid=yes && break done fi @@ -7078,7 +7078,7 @@ int main(void) { x264_encoder_open((void EOF _x264=no for _ld_x264 in "-lx264 $_ld_pthread" "-lx264 $_ld_pthread $_ld_lm" ; do - cc_check $_ld_x264 && _libs_mencoder="$_libs_mencoder $_ld_x264" && _x264=yes && break + cc_check $_ld_x264 && libs_mencoder="$libs_mencoder $_ld_x264" && _x264=yes && break done fi @@ -7088,7 +7088,7 @@ if test "$_x264" = yes ; then test "$_x264_lavc" = auto && _x264_lavc=yes if test "$_x264_lavc" = yes ; then def_x264_lavc='#define CONFIG_LIBX264 1' - _libs_mplayer="$_libs_mplayer $_ld_x264" + libs_mplayer="$libs_mplayer $_ld_x264" _libavencoders="$_libavencoders LIBX264_ENCODER" fi else @@ -7126,8 +7126,8 @@ EOF _ld_dirac=`$_pkg_config --silence-errors --libs dirac` cc_check $_inc_dirac $_ld_dirac && _libdirac_lavc=yes && - _extra_cflags="$_extra_cflags $_inc_dirac" && - _extra_ldflags="$_extra_ldflags $_ld_dirac" + extra_cflags="$extra_cflags $_inc_dirac" && + extra_ldflags="$extra_ldflags $_ld_dirac" fi fi fi @@ -7158,8 +7158,8 @@ EOF _ld_schroedinger=`$_pkg_config --silence-errors --libs schroedinger-1.0` cc_check $_inc_schroedinger $_ld_schroedinger && _libschroedinger_lavc=yes && - _extra_cflags="$_extra_cflags $_inc_schroedinger" && - _extra_ldflags="$_extra_ldflags $_ld_schroedinger" + extra_cflags="$extra_cflags $_inc_schroedinger" && + extra_ldflags="$extra_ldflags $_ld_schroedinger" fi fi fi @@ -7189,7 +7189,7 @@ fi if test "$_libnut" = yes ; then def_libnut='#define CONFIG_LIBNUT 1' - _extra_ldflags="$_extra_ldflags -lnut" + extra_ldflags="$extra_ldflags -lnut" else def_libnut='#undef CONFIG_LIBNUT' fi @@ -7240,7 +7240,7 @@ fi if test "$_mp3lame" = yes ; then def_mp3lame="#define CONFIG_MP3LAME" _ld_mp3lame=-lmp3lame - _libs_mencoder="$_libs_mencoder $_ld_mp3lame" + libs_mencoder="$libs_mencoder $_ld_mp3lame" cat > $TMPC << EOF #include int main(void) { lame_set_preset(NULL, STANDARD_FAST); return 0; } @@ -7255,7 +7255,7 @@ EOF if test "$_mp3lame_lavc" = yes ; then def_mp3lame_lavc="#define CONFIG_LIBMP3LAME 1" _libavencoders="$_libavencoders LIBMP3LAME_ENCODER" - _libs_mplayer="$_libs_mplayer $_ld_mp3lame" + libs_mplayer="$libs_mplayer $_ld_mp3lame" fi else _mp3lame_lavc=no @@ -7405,7 +7405,7 @@ fi if test "$_tv_dshow" = yes ; then _inputmodules="tv-dshow $_inputmodules" def_tv_dshow='#define CONFIG_TV_DSHOW 1' - _extra_ldflags="$_extra_ldflags -lole32 -luuid" + extra_ldflags="$extra_ldflags -lole32 -luuid" else _noinputmodules="tv-dshow $_noinputmodules" def_tv_dshow='#undef CONFIG_TV_DSHOW' @@ -7619,7 +7619,7 @@ fi if test "$_vstream" = yes ; then def_vstream='#define CONFIG_VSTREAM 1' _inputmodules="vstream $_inputmodules" - _extra_ldflags="$_extra_ldflags -lvstream-client" + extra_ldflags="$extra_ldflags -lvstream-client" else _noinputmodules="vstream $_noinputmodules" def_vstream='#undef CONFIG_VSTREAM' @@ -7659,9 +7659,9 @@ if test "$_xmms" = yes ; then def_xmms='#define CONFIG_XMMS 1' if darwin ; then - _extra_ldflags="$_extra_ldflags ${_xmmslibdir}/libxmms.dylib" + extra_ldflags="$extra_ldflags ${_xmmslibdir}/libxmms.dylib" else - _extra_ldflags="$_extra_ldflags ${_xmmslibdir}/libxmms.so.1 -export-dynamic" + extra_ldflags="$extra_ldflags ${_xmmslibdir}/libxmms.so.1 -export-dynamic" fi else def_xmms='#undef CONFIG_XMMS' @@ -7724,15 +7724,15 @@ if test "$_gtk1" = no ; then if $_pkg_config gtk+-2.0 --exists ; then _gtk=`$_pkg_config gtk+-2.0 --modversion 2>/dev/null` - _extra_cflags="$_extra_cflags `$_pkg_config gtk+-2.0 --cflags 2>/dev/null`" - _libs_mplayer="$_libs_mplayer `$_pkg_config gtk+-2.0 --libs 2>/dev/null`" + extra_cflags="$extra_cflags `$_pkg_config gtk+-2.0 --cflags 2>/dev/null`" + libs_mplayer="$libs_mplayer `$_pkg_config gtk+-2.0 --libs 2>/dev/null`" echores "$_gtk" # Check for GLIB2 if $_pkg_config glib-2.0 --exists ; then echocheck "glib version" _glib=`$_pkg_config glib-2.0 --modversion 2>/dev/null` - _libs_mplayer="$_libs_mplayer `$_pkg_config glib-2.0 --libs 2>/dev/null`" + libs_mplayer="$libs_mplayer `$_pkg_config glib-2.0 --libs 2>/dev/null`" echores "$_glib" def_gui='#define CONFIG_GUI 1' @@ -7760,8 +7760,8 @@ if test "$_gtk1" = yes ; then fi fi _gtk=`$_gtkconfig --version 2>&1` - _extra_cflags="$_extra_cflags `$_gtkconfig --cflags 2>&1`" - _libs_mplayer="$_libs_mplayer `$_gtkconfig --libs 2>&1`" + extra_cflags="$extra_cflags `$_gtkconfig --cflags 2>&1`" + libs_mplayer="$libs_mplayer `$_gtkconfig --libs 2>&1`" echores "$_gtk (using $_gtkconfig)" # Check for GLIB @@ -7776,7 +7776,7 @@ if test "$_gtk1" = yes ; then fi fi _glib=`$_glibconfig --version 2>&1` - _libs_mplayer="$_libs_mplayer `$_glibconfig --libs 2>&1`" + libs_mplayer="$libs_mplayer `$_glibconfig --libs 2>&1`" echores "$_glib (using $_glibconfig)" def_gui='#define CONFIG_GUI 1' @@ -7785,7 +7785,7 @@ fi else #if ! win32 _gui_win32=yes - _libs_mplayer="$_libs_mplayer -lcomdlg32 -lcomctl32 -lshell32 -lkernel32" + libs_mplayer="$libs_mplayer -lcomdlg32 -lcomctl32 -lshell32 -lkernel32" def_gui='#define CONFIG_GUI 1' def_gtk2='#undef CONFIG_GTK2' fi #if ! win32 @@ -7835,7 +7835,7 @@ cat > $TMPC < Author: diego Date: Wed Mar 25 22:31:56 2009 New Revision: 29058 Log: Rename 'default-binds' input option to 'default-bindings'. Modified: trunk/input/input.c Changes in other areas also in this revision: Modified: trunk/DOCS/man/en/mplayer.1 trunk/DOCS/man/fr/mplayer.1 trunk/DOCS/man/hu/mplayer.1 trunk/DOCS/man/ru/mplayer.1 trunk/DOCS/man/zh_CN/mplayer.1 Modified: trunk/input/input.c ============================================================================== --- trunk/input/input.c Wed Mar 25 20:48:05 2009 (r29057) +++ trunk/input/input.c Wed Mar 25 22:31:56 2009 (r29058) @@ -583,7 +583,7 @@ static mp_cmd_t* ar_cmd = NULL; static unsigned int ar_delay = 100, ar_rate = 8, last_ar = 0; static int use_joystick = 1, use_lirc = 1, use_lircc = 1; -static int default_binds = 1; +static int default_bindings = 1; static char* config_file = "input.conf"; /* Apple Remote */ @@ -612,8 +612,8 @@ static m_option_t input_conf[] = { { "cmdlist", mp_input_print_cmd_list, CONF_TYPE_FUNC, CONF_GLOBAL, 0, 0, NULL }, { "js-dev", &js_dev, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL }, { "file", &in_file, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL }, - { "default-binds", &default_binds, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL }, - { "nodefault-binds", &default_binds, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL }, + { "default-bindings", &default_bindings, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL }, + { "nodefault-bindings", &default_bindings, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL }, { NULL, NULL, 0, 0, 0, 0, NULL} }; @@ -1081,7 +1081,7 @@ mp_input_get_cmd_from_keys(int n,int* ke cmd = mp_input_find_bind_for_key(cmd_binds,n,keys); if(cmd_binds_default && cmd == NULL) cmd = mp_input_find_bind_for_key(cmd_binds_default,n,keys); - if(default_binds && cmd == NULL) + if(default_bindings && cmd == NULL) cmd = mp_input_find_bind_for_key(def_cmd_binds,n,keys); if(cmd == NULL) { From subversion at mplayerhq.hu Wed Mar 25 22:43:33 2009 From: subversion at mplayerhq.hu (diego) Date: Wed, 25 Mar 2009 22:43:33 +0100 (CET) Subject: [MPlayer-cvslog] r29060 - trunk/DOCS/tech/win32-codec-howto.txt Message-ID: <20090325214333.A21163B4EA@natsuki.mplayerhq.hu> Author: diego Date: Wed Mar 25 22:43:33 2009 New Revision: 29060 Log: typo fixes Modified: trunk/DOCS/tech/win32-codec-howto.txt Modified: trunk/DOCS/tech/win32-codec-howto.txt ============================================================================== --- trunk/DOCS/tech/win32-codec-howto.txt Wed Mar 25 22:37:57 2009 (r29059) +++ trunk/DOCS/tech/win32-codec-howto.txt Wed Mar 25 22:43:33 2009 (r29060) @@ -13,10 +13,10 @@ If you want to add a codec yourself, rea -VFW codecs +VfW codecs ~~~~~~~~~~ -VFW (Video for Windows) is the old video API for Windows. Its codecs have +VfW (Video for Windows) is the old video API for Windows. Its codecs have the '.dll' or (rarely) '.drv' extension. If MPlayer fails at playing your AVI with this kind of message: @@ -26,7 +26,7 @@ Cannot find codec matching selected -vo It means your AVI is encoded with a codec which has the HFYU fourcc (HFYU = HuffYUV codec, DIV3 = DivX Low Motion, etc.). Now that you know this, you have to find out which DLL Windows loads in order to play this file. -You can find the vfw codec by searching the internet for e.g. VIDC.HFYU. +You can find the VfW codec by searching the internet for e.g. VIDC.HFYU. In our case, the 'system.ini' also contains this information in a line that reads: @@ -111,9 +111,9 @@ false hits, but you may get lucky... Tips: ~~~~~~~ If you get an error loading a new codec, it may need some more files to work. -Start the filemon utility before loading MPlayer to find out which dlls are +Start the filemon utility before loading MPlayer to find out which DLLs are trying to be loaded. -Your codec may load some external .dll libraries. If the codec is already +Your codec may load some external DLL libraries. If the codec is already installed in Windows, run listdlls wmplayer.exe while Windows Media Player is playing your file to find out which. From subversion at mplayerhq.hu Thu Mar 26 00:32:28 2009 From: subversion at mplayerhq.hu (cehoyos) Date: Thu, 26 Mar 2009 00:32:28 +0100 (CET) Subject: [MPlayer-cvslog] r29061 - trunk/libvo/vo_vdpau.c Message-ID: <20090325233228.B2D7A3B4EF@natsuki.mplayerhq.hu> Author: cehoyos Date: Thu Mar 26 00:32:27 2009 New Revision: 29061 Log: Simplify vdpau deinterlacing code and fix timing for deint=2. Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Wed Mar 25 22:43:33 2009 (r29060) +++ trunk/libvo/vo_vdpau.c Thu Mar 26 00:32:27 2009 (r29061) @@ -224,9 +224,12 @@ static void video_to_output_surface(void VdpTime dummy; VdpStatus vdp_st; int i; - if (vid_surface_num < 0 || deint_surfaces[0] == VDP_INVALID_HANDLE) + if (vid_surface_num < 0) return; + if (deint < 2 || deint_surfaces[0] == VDP_INVALID_HANDLE) + push_deint_surface(surface_render[vid_surface_num].surface); + for (i = 0; i <= !!(deint > 1); i++) { int field = VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME; VdpOutputSurface output_surface; @@ -234,10 +237,9 @@ static void video_to_output_surface(void draw_eosd(); draw_osd(); flip_page(); - push_deint_surface(surface_render[vid_surface_num].surface); } if (deint) - field = (top_field_first == i) ^ (deint > 2) ? + field = (top_field_first == i) ^ (deint > 1) ? VDP_VIDEO_MIXER_PICTURE_STRUCTURE_BOTTOM_FIELD: VDP_VIDEO_MIXER_PICTURE_STRUCTURE_TOP_FIELD; output_surface = output_surfaces[surface_num]; @@ -254,6 +256,7 @@ static void video_to_output_surface(void output_surface, NULL, &out_rect_vid, 0, NULL); CHECK_ST_WARNING("Error when calling vdp_video_mixer_render") + push_deint_surface(surface_render[vid_surface_num].surface); } } @@ -891,10 +894,7 @@ static uint32_t draw_image(mp_image_t *m } top_field_first = !!(mpi->fields & MP_IMGFIELD_TOP_FIRST); - if (deint < 3) - deint_surfaces[0] = surface_render[vid_surface_num].surface; video_to_output_surface(); - push_deint_surface(surface_render[vid_surface_num].surface); return VO_TRUE; } @@ -1045,7 +1045,7 @@ static int preinit(const char *arg) } if (deint) deint_type = deint; - if (deint > 2) + if (deint > 1) deint_buffer_past_frames = 1; vdpau_lib_handle = dlopen(vdpaulibrary, RTLD_LAZY); From subversion at mplayerhq.hu Thu Mar 26 00:59:48 2009 From: subversion at mplayerhq.hu (compn) Date: Thu, 26 Mar 2009 00:59:48 +0100 (CET) Subject: [MPlayer-cvslog] r29062 - trunk/loader/win32.c Message-ID: <20090325235948.E7F013B501@natsuki.mplayerhq.hu> Author: compn Date: Thu Mar 26 00:59:48 2009 New Revision: 29062 Log: enable vp6 codec to read/write .fpf (passlogfile) fixes 2pass vp6 encoding on linux Modified: trunk/loader/win32.c Modified: trunk/loader/win32.c ============================================================================== --- trunk/loader/win32.c Thu Mar 26 00:32:27 2009 (r29061) +++ trunk/loader/win32.c Thu Mar 26 00:59:48 2009 (r29062) @@ -63,6 +63,8 @@ for DLL to know too much about its envir #include #include #include +#include +#include #ifdef HAVE_KSTAT #include #endif @@ -3519,7 +3521,7 @@ static HANDLE WINAPI expCreateFileA(LPCS free(tmp); return result; } - if (strstr(cs1, "vp3")) + if (strstr(cs1, "vp3") || strstr(cs1, ".fpf")) { int r; int flg = 0; @@ -3537,10 +3539,10 @@ static HANDLE WINAPI expCreateFileA(LPCS flg |= O_RDONLY; else if (GENERIC_WRITE & i1) { - flg |= O_WRONLY; + flg |= O_WRONLY | O_CREAT; printf("Warning: openning filename %s %d (flags; 0x%x) for write\n", tmp, r, flg); } - r=open(tmp, flg); + r=open(tmp, flg, S_IRWXU); free(tmp); return r; } From subversion at mplayerhq.hu Thu Mar 26 12:00:05 2009 From: subversion at mplayerhq.hu (reimar) Date: Thu, 26 Mar 2009 12:00:05 +0100 (CET) Subject: [MPlayer-cvslog] r29064 - trunk/stream/asf_streaming.c Message-ID: <20090326110005.554C13B539@natsuki.mplayerhq.hu> Author: reimar Date: Thu Mar 26 12:00:04 2009 New Revision: 29064 Log: Add support for mmsh:// as alias for mmshttp:// Patch by Francesco Cosoleto [cosoleto gmail com] Modified: trunk/stream/asf_streaming.c Modified: trunk/stream/asf_streaming.c ============================================================================== --- trunk/stream/asf_streaming.c Thu Mar 26 02:30:10 2009 (r29063) +++ trunk/stream/asf_streaming.c Thu Mar 26 12:00:04 2009 (r29064) @@ -84,7 +84,8 @@ static int asf_streaming_start( stream_t //Is protocol http, http_proxy, or mms? if (!strcasecmp(proto, "http_proxy") || !strcasecmp(proto, "http") || - !strcasecmp(proto, "mms") || !strcasecmp(proto, "mmshttp")) + !strcasecmp(proto, "mms") || !strcasecmp(proto, "mmsh") || + !strcasecmp(proto, "mmshttp")) { mp_msg(MSGT_NETWORK,MSGL_V,"Trying ASF/HTTP...\n"); fd = asf_http_streaming_start( stream, demuxer_type ); @@ -847,7 +848,7 @@ const stream_info_t stream_info_asf = { "Bertrand, Reimar Doeffinger, Albeu", "originally based on work by Majormms (is that code still there?)", open_s, - {"mms", "mmsu", "mmst", "http", "http_proxy", "mmshttp", NULL}, + {"mms", "mmsu", "mmst", "http", "http_proxy", "mmsh", "mmshttp", NULL}, NULL, 0 // Urls are an option string }; From subversion at mplayerhq.hu Thu Mar 26 13:41:43 2009 From: subversion at mplayerhq.hu (diego) Date: Thu, 26 Mar 2009 13:41:43 +0100 (CET) Subject: [MPlayer-cvslog] r29065 - in trunk/libswscale: . bfin mlib ppc sparc x86 Message-ID: <20090326124143.B0BDE3B50D@natsuki.mplayerhq.hu> Author: diego Date: Thu Mar 26 13:41:43 2009 New Revision: 29065 Log: Make svn:ignore properties globally consistent. Ignore all .d, .ho, .exe, -test files, all generated libraries and headers and example programs. Modified: trunk/libswscale/ (props changed) Changes in other areas also in this revision: Modified: trunk/libswscale/bfin/ (props changed) trunk/libswscale/mlib/ (props changed) trunk/libswscale/ppc/ (props changed) trunk/libswscale/sparc/ (props changed) trunk/libswscale/x86/ (props changed) From subversion at mplayerhq.hu Thu Mar 26 14:35:13 2009 From: subversion at mplayerhq.hu (compn) Date: Thu, 26 Mar 2009 14:35:13 +0100 (CET) Subject: [MPlayer-cvslog] r29066 - trunk/stream/asf_streaming.c Message-ID: <20090326133513.8367A3B19C@natsuki.mplayerhq.hu> Author: compn Date: Thu Mar 26 14:35:12 2009 New Revision: 29066 Log: change close to closesocket, unifies close streaming code patch by Francesco Cosoleto , cosoleto gmail com Modified: trunk/stream/asf_streaming.c Modified: trunk/stream/asf_streaming.c ============================================================================== --- trunk/stream/asf_streaming.c Thu Mar 26 13:41:43 2009 (r29065) +++ trunk/stream/asf_streaming.c Thu Mar 26 14:35:12 2009 (r29066) @@ -149,7 +149,7 @@ extern int audio_id; extern int video_id; static void close_s(stream_t *stream) { - close(stream->fd); + closesocket(stream->fd); stream->fd=-1; } From subversion at mplayerhq.hu Fri Mar 27 18:14:58 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 27 Mar 2009 18:14:58 +0100 (CET) Subject: [MPlayer-cvslog] r29068 - trunk/configure Message-ID: <20090327171458.D47B14E076@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 27 18:14:58 2009 New Revision: 29068 Log: Rename local TMP variable to TMPRES to avoid a clash with the variable holding the path used for temporary files - this is used by mingw-w64 and this change avoids crashes with it. Modified: trunk/configure Modified: trunk/configure ============================================================================== --- trunk/configure Thu Mar 26 15:20:15 2009 (r29067) +++ trunk/configure Fri Mar 27 18:14:58 2009 (r29068) @@ -64,10 +64,10 @@ compile_check() { echo "$_cc $CFLAGS $extra_cflags $_ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o $TMPEXE $@" >> "$TMPLOG" rm -f "$TMPEXE" $_cc $CFLAGS $extra_cflags $_ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o "$TMPEXE" "$@" >> "$TMPLOG" 2>&1 - TMP="$?" + TMPRES="$?" echo >> "$TMPLOG" echo >> "$TMPLOG" - return "$TMP" + return "$TMPRES" } cc_check() { @@ -85,10 +85,10 @@ yasm_check() { echo "$_yasm $YASMFLAGS -o $TMPEXE $TMPS $@" >> "$TMPLOG" rm -f "$TMPEXE" $_yasm $YASMFLAGS -o "$TMPEXE" "$TMPS" "$@" >> "$TMPLOG" 2>&1 - TMP="$?" + TMPRES="$?" echo >> "$TMPLOG" echo >> "$TMPLOG" - return "$TMP" + return "$TMPRES" } tmp_run() { From subversion at mplayerhq.hu Fri Mar 27 19:48:48 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 27 Mar 2009 19:48:48 +0100 (CET) Subject: [MPlayer-cvslog] r29069 - trunk/cpudetect.c Message-ID: <20090327184848.411B13B428@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 27 19:48:47 2009 New Revision: 29069 Log: Sync cpuid detection code with libavcodec: assume it is always available on x86_64 Modified: trunk/cpudetect.c Modified: trunk/cpudetect.c ============================================================================== --- trunk/cpudetect.c Fri Mar 27 18:14:58 2009 (r29068) +++ trunk/cpudetect.c Fri Mar 27 19:48:47 2009 (r29069) @@ -44,20 +44,15 @@ static void check_os_katmai_support( voi // return TRUE if cpuid supported static int has_cpuid(void) { - long a, c; - // code from libavcodec: #if ARCH_X86_64 -#define PUSHF "pushfq\n\t" -#define POPF "popfq\n\t" + return 1; #else -#define PUSHF "pushfl\n\t" -#define POPF "popfl\n\t" -#endif + long a, c; __asm__ volatile ( /* See if CPUID instruction is supported ... */ /* ... Get copies of EFLAGS into eax and ecx */ - PUSHF + "pushfl\n\t" "pop %0\n\t" "mov %0, %1\n\t" @@ -65,19 +60,18 @@ static int has_cpuid(void) /* to the EFLAGS reg */ "xor $0x200000, %0\n\t" "push %0\n\t" - POPF + "popfl\n\t" /* ... Get the (hopefully modified) EFLAGS */ - PUSHF + "pushfl\n\t" "pop %0\n\t" : "=a" (a), "=c" (c) : : "cc" ); -#undef PUSHF -#undef POPF return a != c; +#endif } static void @@ -277,7 +271,7 @@ static void sigill_handler_sse( int sign } #endif /* __linux__ && _POSIX_SOURCE */ -#if defined(__MINGW32__) || defined(__CYGWIN__) +#if (defined(__MINGW32__) || defined(__CYGWIN__)) && !ARCH_X86_64 LONG CALLBACK win32_sig_handler_sse(EXCEPTION_POINTERS* ep) { if(ep->ExceptionRecord->ExceptionCode==EXCEPTION_ILLEGAL_INSTRUCTION){ From subversion at mplayerhq.hu Fri Mar 27 19:51:32 2009 From: subversion at mplayerhq.hu (diego) Date: Fri, 27 Mar 2009 19:51:32 +0100 (CET) Subject: [MPlayer-cvslog] r29070 - trunk/DOCS/tech/release-howto.txt Message-ID: <20090327185133.059AA3B42E@natsuki.mplayerhq.hu> Author: diego Date: Fri Mar 27 19:51:32 2009 New Revision: 29070 Log: misc updates Modified: trunk/DOCS/tech/release-howto.txt Modified: trunk/DOCS/tech/release-howto.txt ============================================================================== --- trunk/DOCS/tech/release-howto.txt Fri Mar 27 19:48:47 2009 (r29069) +++ trunk/DOCS/tech/release-howto.txt Fri Mar 27 19:51:32 2009 (r29070) @@ -15,17 +15,12 @@ preparations: create the release tree: - tag Subversion with release name +- Add a VERSION file with the release version to the root of the source tree. - update release.sh script with version number ***the following steps are done automatically by release.sh script*** - checkout the mplayer src tree - check out FFmpeg subdirs - remove obsolete DOCS translations, help files -- replace version.sh with this (change version number too...): - -============ -#!/bin/sh -echo "#define VERSION \"1.0pre5-$1 \"" > version.h -============ - build the HTML docs from XML sources, then clean up: make html-chunked; make releaseclean @@ -38,9 +33,9 @@ release the tree: ***end of part done by release.sh** test it (download to your local machine, extract, compile, run) - - compilers: gcc 3, gcc 2.95, mingw, cygwin + - compilers: gcc 4.x, gcc 3.x, gcc 2.95, MinGW, Cygwin - architectures: PPC, AMD64, x86 with MMX[2], SSE[2], 3DNow - - OS: Linux, BSD, Windows, MacOS X + - OS: Linux, BSD, Windows, Mac OS X copy to FTP: cp MPlayer-0.90rc5.tar.bz2 /home/ftp/MPlayer/releases/ From subversion at mplayerhq.hu Fri Mar 27 19:55:21 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 27 Mar 2009 19:55:21 +0100 (CET) Subject: [MPlayer-cvslog] r29071 - trunk/libmpdemux/ms_hdr.h Message-ID: <20090327185521.BFC1F3B414@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 27 19:55:21 2009 New Revision: 29071 Log: Check for _WINGDI_ instead of _WINGDI_H before defining BITMAPINFOHEADER since former works on both 32 and 64 bit MinGW Modified: trunk/libmpdemux/ms_hdr.h Modified: trunk/libmpdemux/ms_hdr.h ============================================================================== --- trunk/libmpdemux/ms_hdr.h Fri Mar 27 19:51:32 2009 (r29070) +++ trunk/libmpdemux/ms_hdr.h Fri Mar 27 19:55:21 2009 (r29071) @@ -27,7 +27,7 @@ typedef struct __attribute__((__packed__ #endif /* _MPEGLAYER3WAVEFORMAT_ */ /* windows.h #includes wingdi.h on MinGW. */ -#if !defined(_BITMAPINFOHEADER_) && !defined(_WINGDI_H) +#if !defined(_BITMAPINFOHEADER_) && !defined(_WINGDI_) #define _BITMAPINFOHEADER_ typedef struct __attribute__((__packed__)) { From subversion at mplayerhq.hu Fri Mar 27 20:09:33 2009 From: subversion at mplayerhq.hu (diego) Date: Fri, 27 Mar 2009 20:09:33 +0100 (CET) Subject: [MPlayer-cvslog] r29072 - trunk/Changelog Message-ID: <20090327190933.B18B94E056@natsuki.mplayerhq.hu> Author: diego Date: Fri Mar 27 20:09:33 2009 New Revision: 29072 Log: spelling fixes, add release name Modified: trunk/Changelog Modified: trunk/Changelog ============================================================================== --- trunk/Changelog Fri Mar 27 19:55:21 2009 (r29071) +++ trunk/Changelog Fri Mar 27 20:09:33 2009 (r29072) @@ -1,8 +1,8 @@ MPlayer (1.0) - rc3: "StillAlive" March 1, 2009 + rc3: "BikeshedCounter" March 27, 2009 Decoders: - * support for X8 frame (fixes "J-type picture is not supported" for WMV2) + * support for X8 frames (fixes "J-type picture is not supported" for WMV2) * support for DTS WAV/DTS-CD passthrough by ad_hwac3 * Apple's raw YUV2 in MOV * LATM over LOAS AAC decoding via internal libfaad2 @@ -10,15 +10,15 @@ MPlayer (1.0) EA Maxis XA ADPCM audio, RL2 video, Beam Software SIFF video, V.Flash PTX video * AVOption support for libavcodec-based decoders * use lavc ADPCM codecs by default - * support for progressive jpeg in ffmjpeg - * ACDSystems mjpeg (ACDV) via binary DLL and lavc + * support for progressive JPEG in ffmjpeg + * ACDSystems MJPEG (ACDV) via binary DLL and lavc * SIF1 via binary DLL * wincam screen capture (WCMV) via binary DLL - * Creative Labs Video Blaster Webcam mjpeg (CJPG) via binary DLL and ijpg library - * kensington webcam (AJPG,ABYR) via binary DLL + * Creative Labs Video Blaster Webcam MJPEG (CJPG) via binary DLL and ijpg library + * kensington webcam (AJPG, ABYR) via binary DLL * centre for wavelets (wavc) via binary DLL - * GeoVision Advanced MPEG-4 (GMP4,GM40) via binary DLL - * Xiricam jpg from Veo PC Camera (XJPG) via binary DLL + * GeoVision Advanced MPEG-4 (GMP4, GM40) via binary DLL + * Xiricam JPEG from Veo PC Camera (XJPG) via binary DLL * WorldConnect Wavelet Video (SMSV) via binary DLL * VDOWave 3 advanced (VDO3,VDOM,VDOW) via binary DLL * VoxWare MetaVoice (format 0x0074) via binary DLL @@ -87,7 +87,7 @@ MPlayer (1.0) * Linux Media Labs MPEG-4 (LMLM4) demuxer * AVM2 (Flash 9) SWF muxer * QT variant of IMA ADPCM encoder - * Ipod/Iphone compatible mp4 muxer + * iPod/iPhone compatible MP4 muxer * Mimic decoder * MSN TCP Webcam stream demuxer * RL2 demuxer / decoder @@ -124,7 +124,7 @@ MPlayer (1.0) * NC (NC4600) cameras file demuxer * MXF D-10 muxer * Generic metadata API - * H.264 speedup and PAFF decoding (install Yasm for faster H264 decoding) + * H.264 speedup and PAFF decoding (install Yasm for faster H.264 decoding) * correctly decode more of the H.264 conformance testsuite * VC-1/WMV3 decoder speedup * VP3 decoder speedup @@ -141,11 +141,11 @@ MPlayer (1.0) * 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. + * VIDIX driver for SuperH Mobile VEU hardware block * support -border on vo_gl/gl2 in x11 - * Direct3D Windows video output driver added. + * Direct3D Windows video output driver added * factorize code in vo_wii - * removed unnecessary code from vo x11, xv, xvmc + * remove unnecessary code from vo x11, xv, xvmc * add OS/2 DART audio driver (-ao dart) * add VDPAU video output * add OS/2 KVA video driver (-vo kva) @@ -168,7 +168,7 @@ MPlayer (1.0) * some new slave commands (check DOCS/tech/slave.txt) * libdvdcss updated to 1.2.10, now same as upstream version * fix -endchapter support again for -dump* options - * add startup volume option + * add startup audio volume option * add option to disable default key binds * change default OSD and subtitle font size to a smaller default @@ -183,10 +183,10 @@ MPlayer (1.0) * 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. + * VIDIX on SuperH * workarounds for AltiVec on Apple gcc 3.3 on Mac OS X dropped * vo_macosx can now be compiled in 64-bits mode - * allow multiple MPlayer instances w/ vo_macosx using buffer_name + * allow multiple MPlayer instances with vo_macosx using buffer_name * OpenGL support for unmodified MinGW64 SWScaler: From subversion at mplayerhq.hu Fri Mar 27 20:13:50 2009 From: subversion at mplayerhq.hu (diego) Date: Fri, 27 Mar 2009 20:13:50 +0100 (CET) Subject: [MPlayer-cvslog] r29073 - branches/1.0rc3 Message-ID: <20090327191350.C6BB73B3E7@natsuki.mplayerhq.hu> Author: diego Date: Fri Mar 27 20:13:50 2009 New Revision: 29073 Log: Create 1.0rc3 release branch. Added: branches/1.0rc3/ - copied from r29072, trunk/ From subversion at mplayerhq.hu Fri Mar 27 20:27:47 2009 From: subversion at mplayerhq.hu (diego) Date: Fri, 27 Mar 2009 20:27:47 +0100 (CET) Subject: [MPlayer-cvslog] r29074 - branches/1.0rc3/libswscale Message-ID: <20090327192747.3FBC43B5FF@natsuki.mplayerhq.hu> Author: diego Date: Fri Mar 27 20:27:47 2009 New Revision: 29074 Log: Remove libswscale from release branch, it will become an FFmpeg svn:external. Deleted: branches/1.0rc3/libswscale/ From subversion at mplayerhq.hu Fri Mar 27 20:34:50 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 27 Mar 2009 20:34:50 +0100 (CET) Subject: [MPlayer-cvslog] r29075 - trunk/cpuinfo.c Message-ID: <20090327193450.64D9E3B606@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 27 20:34:50 2009 New Revision: 29075 Log: Get rid of gettimeofday reimplementation for MinGW, all remotely recent versions of MinGW already provide it. Modified: trunk/cpuinfo.c Modified: trunk/cpuinfo.c ============================================================================== --- trunk/cpuinfo.c Fri Mar 27 20:27:47 2009 (r29074) +++ trunk/cpuinfo.c Fri Mar 27 20:34:50 2009 (r29075) @@ -8,15 +8,6 @@ #include #include -#if defined(__MINGW32__) && (__MINGW32_MAJOR_VERSION <= 3) && (__MINGW32_MINOR_VERSION < 10) && !defined(MINGW64) -#include -void gettimeofday(struct timeval* t,void* timezone) { - struct timeb timebuffer; - ftime( &timebuffer ); - t->tv_sec=timebuffer.time; - t->tv_usec=1000*timebuffer.millitm; -} -#endif #ifdef __MINGW32__ #define MISSING_USLEEP #include From subversion at mplayerhq.hu Fri Mar 27 21:33:14 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 27 Mar 2009 21:33:14 +0100 (CET) Subject: [MPlayer-cvslog] r29076 - trunk/cpudetect.h Message-ID: <20090327203314.0CE8D3B5DE@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 27 21:33:13 2009 New Revision: 29076 Log: Directly include libavutil/x86_cpu.h in cpudetect.h instead of duplicating it incompletely. Modified: trunk/cpudetect.h Modified: trunk/cpudetect.h ============================================================================== --- trunk/cpudetect.h Fri Mar 27 20:34:50 2009 (r29075) +++ trunk/cpudetect.h Fri Mar 27 21:33:13 2009 (r29076) @@ -8,33 +8,7 @@ #define CPUTYPE_I586 5 #define CPUTYPE_I686 6 -#if ARCH_X86_64 -# define REGa rax -# define REGb rbx -# define REGBP rbp -# define REGSP rsp -# define REG_a "rax" -# define REG_b "rbx" -# define REG_c "rcx" -# define REG_d "rdx" -# define REG_S "rsi" -# define REG_D "rdi" -# define REG_SP "rsp" -# define REG_BP "rbp" -#else -# define REGa eax -# define REGb ebx -# define REGBP ebp -# define REGSP esp -# define REG_a "eax" -# define REG_b "ebx" -# define REG_c "ecx" -# define REG_d "edx" -# define REG_S "esi" -# define REG_D "edi" -# define REG_SP "esp" -# define REG_BP "ebp" -#endif +#include "libavutil/x86_cpu.h" typedef struct cpucaps_s { int cpuType; From subversion at mplayerhq.hu Fri Mar 27 21:34:55 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 27 Mar 2009 21:34:55 +0100 (CET) Subject: [MPlayer-cvslog] r29077 - in trunk/libmpcodecs: vf_filmdint.c vf_ilpack.c vf_noise.c vf_yadif.c Message-ID: <20090327203455.EE5863B5DF@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 27 21:34:55 2009 New Revision: 29077 Log: Use x86_reg instead of long in several video filters to fix compilation on MinGW64. Modified: trunk/libmpcodecs/vf_filmdint.c trunk/libmpcodecs/vf_ilpack.c trunk/libmpcodecs/vf_noise.c trunk/libmpcodecs/vf_yadif.c Modified: trunk/libmpcodecs/vf_filmdint.c ============================================================================== --- trunk/libmpcodecs/vf_filmdint.c Fri Mar 27 21:33:13 2009 (r29076) +++ trunk/libmpcodecs/vf_filmdint.c Fri Mar 27 21:34:55 2009 (r29077) @@ -424,7 +424,7 @@ block_metrics_faster_c(unsigned char *a, "paddusw %%mm2, %%mm7\n\t" \ "paddusw %%mm1, %%mm7\n\t" \ : "=r" (a), "=r" (b) \ - : "r"((long)as), "r"((long)bs), "m" (ones), "0"(a), "1"(b), "X"(*a), "X"(*b) \ + : "r"((x86_reg)as), "r"((x86_reg)bs), "m" (ones), "0"(a), "1"(b), "X"(*a), "X"(*b) \ ); \ } while (--lines); @@ -466,8 +466,8 @@ block_metrics_mmx2(unsigned char *a, uns mp_msg(MSGT_VFILTER, MSGL_FATAL, "block_metrics_mmx2: internal error\n"); #else static const unsigned long long ones = 0x0101010101010101ull; - unsigned long interlaced; - unsigned long prefetch_line = (((long)a>>3) & 7) + 10; + x86_reg interlaced; + x86_reg prefetch_line = (((long)a>>3) & 7) + 10; #ifdef DEBUG struct frame_stats ts = *s; #endif @@ -633,7 +633,7 @@ dint_copy_line_mmx2(unsigned char *dst, "por %%mm3, %%mm1 \n\t" /* avg if >= threshold */ "movq %%mm1, (%2,%4) \n\t" : /* no output */ - : "r" (a), "r" (bos), "r" (dst), "r" ((long)ss), "r" ((long)ds), "r" (cos) + : "r" (a), "r" ((x86_reg)bos), "r" ((x86_reg)dst), "r" ((x86_reg)ss), "r" ((x86_reg)ds), "r" ((x86_reg)cos) ); a += 8; dst += 8; Modified: trunk/libmpcodecs/vf_ilpack.c ============================================================================== --- trunk/libmpcodecs/vf_ilpack.c Fri Mar 27 21:33:13 2009 (r29076) +++ trunk/libmpcodecs/vf_ilpack.c Fri Mar 27 21:34:55 2009 (r29077) @@ -187,7 +187,7 @@ static void pack_li_0_MMX(unsigned char : : "S" (y), "D" (dst), "a" (u), "b" (v), "c" (w/16), #if ARCH_X86_64 - "d" ((long)us), "r" ((long)vs) + "d" ((x86_reg)us), "r" ((x86_reg)vs) #else "d" (&us) #endif @@ -299,7 +299,7 @@ static void pack_li_1_MMX(unsigned char : : "S" (y), "D" (dst), "a" (u), "b" (v), "c" (w/16), #if ARCH_X86_64 - "d" ((long)us), "r" ((long)vs) + "d" ((x86_reg)us), "r" ((x86_reg)vs) #else "d" (&us) #endif Modified: trunk/libmpcodecs/vf_noise.c ============================================================================== --- trunk/libmpcodecs/vf_noise.c Fri Mar 27 21:33:13 2009 (r29076) +++ trunk/libmpcodecs/vf_noise.c Fri Mar 27 21:34:55 2009 (r29077) @@ -147,7 +147,7 @@ static int8_t *initNoise(FilterParam *fp #if HAVE_MMX static inline void lineNoise_MMX(uint8_t *dst, uint8_t *src, int8_t *noise, int len, int shift){ - long mmx_len= len&(~7); + x86_reg mmx_len= len&(~7); noise+=shift; __asm__ volatile( @@ -176,7 +176,7 @@ static inline void lineNoise_MMX(uint8_t //duplicate of previous except movntq #if HAVE_MMX2 static inline void lineNoise_MMX2(uint8_t *dst, uint8_t *src, int8_t *noise, int len, int shift){ - long mmx_len= len&(~7); + x86_reg mmx_len= len&(~7); noise+=shift; __asm__ volatile( @@ -218,7 +218,7 @@ static inline void lineNoise_C(uint8_t * #if HAVE_MMX static inline void lineNoiseAvg_MMX(uint8_t *dst, uint8_t *src, int len, int8_t **shift){ - long mmx_len= len&(~7); + x86_reg mmx_len= len&(~7); __asm__ volatile( "mov %5, %%"REG_a" \n\t" Modified: trunk/libmpcodecs/vf_yadif.c ============================================================================== --- trunk/libmpcodecs/vf_yadif.c Fri Mar 27 21:33:13 2009 (r29076) +++ trunk/libmpcodecs/vf_yadif.c Fri Mar 27 21:34:55 2009 (r29077) @@ -247,8 +247,8 @@ static void filter_line_mmx2(struct vf_p :[prev] "r"(prev),\ [cur] "r"(cur),\ [next] "r"(next),\ - [prefs]"r"((long)refs),\ - [mrefs]"r"((long)-refs),\ + [prefs]"r"((x86_reg)refs),\ + [mrefs]"r"((x86_reg)-refs),\ [pw1] "m"(pw_1),\ [pb1] "m"(pb_1),\ [mode] "g"(mode)\ From Reimar.Doeffinger at gmx.de Fri Mar 27 21:39:25 2009 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Fri, 27 Mar 2009 21:39:25 +0100 Subject: [MPlayer-cvslog] r29077 - in trunk/libmpcodecs: vf_filmdint.c vf_ilpack.c vf_noise.c vf_yadif.c In-Reply-To: <20090327203455.EE5863B5DF@natsuki.mplayerhq.hu> References: <20090327203455.EE5863B5DF@natsuki.mplayerhq.hu> Message-ID: <20090327203925.GA18777@1und1.de> On Fri, Mar 27, 2009 at 09:34:55PM +0100, reimar wrote: > Author: reimar > Date: Fri Mar 27 21:34:55 2009 > New Revision: 29077 > > Log: > Use x86_reg instead of long in several video filters to fix compilation on MinGW64. Compilation on MinGW64 should now mostly work, --disable-vidix --disable-liba52 --disable-tv-dshow and manually disabling VCD support should be all that is needed. The VCD check should be fixed to check for "#include ", patch welcome. From subversion at mplayerhq.hu Fri Mar 27 22:26:27 2009 From: subversion at mplayerhq.hu (reimar) Date: Fri, 27 Mar 2009 22:26:27 +0100 (CET) Subject: [MPlayer-cvslog] r29078 - trunk/stream/stream_dvd.c Message-ID: <20090327212627.1A4833B643@natsuki.mplayerhq.hu> Author: reimar Date: Fri Mar 27 22:26:26 2009 New Revision: 29078 Log: Simplify detection of .ifo extension. Modified: trunk/stream/stream_dvd.c Modified: trunk/stream/stream_dvd.c ============================================================================== --- trunk/stream/stream_dvd.c Fri Mar 27 21:34:55 2009 (r29077) +++ trunk/stream/stream_dvd.c Fri Mar 27 22:26:26 2009 (r29078) @@ -1097,9 +1097,9 @@ static int ifo_stream_open (stream_t *st char *ext; char* filename; struct stream_priv_s *spriv; + int len = strlen(stream->url); - ext = strrchr (stream->url, '.'); - if (!ext || strcasecmp (ext + 1, "ifo")) + if (len < 4 || strcasecmp (stream->url + len - 4, ".ifo")) return STREAM_UNSUPPORTED; mp_msg(MSGT_DVD, MSGL_INFO, ".IFO detected. Redirecting to dvd://\n"); From subversion at mplayerhq.hu Sat Mar 28 12:46:34 2009 From: subversion at mplayerhq.hu (diego) Date: Sat, 28 Mar 2009 12:46:34 +0100 (CET) Subject: [MPlayer-cvslog] [propchange]: r28808 - svn:log Message-ID: <20090328114634.658814E04E@natsuki.mplayerhq.hu> Author: diego Revision: 28808 Property Name: svn:log Action: modified Property diff: --- old property value +++ new property value @@ -1 +1,2 @@ -Rewrite of rgb15to32 and rgb16to32 using fewer asm instructions and setting alpha channel to 0xFF \ No newline at end of file +Rewrite of rgb15to32 and rgb16to32 using fewer asm instructions +and setting alpha channel to 0xFF. From subversion at mplayerhq.hu Sat Mar 28 12:54:22 2009 From: subversion at mplayerhq.hu (diego) Date: Sat, 28 Mar 2009 12:54:22 +0100 (CET) Subject: [MPlayer-cvslog] [propchange]: r28942 - svn:log Message-ID: <20090328115422.D96993B5DD@natsuki.mplayerhq.hu> Author: diego Revision: 28942 Property Name: svn:log Action: modified Property diff: --- old property value +++ new property value @@ -1,2 +1,3 @@ -Check for HAVE_EBX_AVAILABLE before enabling MMX code that needs the EBX register. -Makes things a bit simpler for everyone who insists on compiling MPlayer as PIE-code. +Check for HAVE_EBX_AVAILABLE before enabling MMX code that needs the EBX +register. Makes things a bit simpler for everyone who insists on compiling +MPlayer as PIE-code. From subversion at mplayerhq.hu Sat Mar 28 12:59:20 2009 From: subversion at mplayerhq.hu (diego) Date: Sat, 28 Mar 2009 12:59:20 +0100 (CET) Subject: [MPlayer-cvslog] [propchange]: r29030 - svn:log Message-ID: <20090328115920.AD1733B5DF@natsuki.mplayerhq.hu> Author: diego Revision: 29030 Property Name: svn:log Action: modified Property diff: --- old property value +++ new property value @@ -1,5 +1,3 @@ -10l -C code of extract_even2avg(), extract_odd2() and extract_odd2avg() was buggy and untested -as the MMX* code was used and i forgot to explicitly test these functions with the MMX -code disabled. - +10l: C code of extract_even2avg(), extract_odd2() and extract_odd2avg() was +buggy and untested as the MMX* code was used and I forgot to explicitly test +these functions with the MMX code disabled. From subversion at mplayerhq.hu Sat Mar 28 13:15:10 2009 From: subversion at mplayerhq.hu (diego) Date: Sat, 28 Mar 2009 13:15:10 +0100 (CET) Subject: [MPlayer-cvslog] r29080 - in branches/1.0rc3: TOOLS/aconvert.sh TOOLS/binary_codecs.sh TOOLS/divx2svcd.sh TOOLS/mencvcd.sh TOOLS/midentify.sh TOOLS/mpconsole.sh libaf/af_resample_template.c libao2/ao_jack.c libao2/... Message-ID: <20090328121510.5BB373B4C3@natsuki.mplayerhq.hu> Author: diego Date: Sat Mar 28 13:15:10 2009 New Revision: 29080 Log: Revert r28917, which is incompatible with FFmpeg 0.5: Reuse libavutil fifo code instead of reimplementing it over and over. Modified: branches/1.0rc3/TOOLS/aconvert.sh (props changed) branches/1.0rc3/TOOLS/binary_codecs.sh (props changed) branches/1.0rc3/TOOLS/divx2svcd.sh (props changed) branches/1.0rc3/TOOLS/mencvcd.sh (props changed) branches/1.0rc3/TOOLS/midentify.sh (props changed) branches/1.0rc3/TOOLS/mpconsole.sh (props changed) branches/1.0rc3/libaf/af_resample_template.c (props changed) branches/1.0rc3/libao2/ao_jack.c branches/1.0rc3/libao2/ao_sdl.c branches/1.0rc3/libmpeg2/libmpeg2_changes.diff (props changed) branches/1.0rc3/stream/stream_live555.c (props changed) branches/1.0rc3/stream/stream_netstream.h (props changed) Modified: branches/1.0rc3/libao2/ao_jack.c ============================================================================== --- branches/1.0rc3/libao2/ao_jack.c Fri Mar 27 23:56:56 2009 (r29079) +++ branches/1.0rc3/libao2/ao_jack.c Sat Mar 28 13:15:10 2009 (r29080) @@ -36,7 +36,7 @@ #include "osdep/timer.h" #include "subopt-helper.h" -#include "libavutil/fifo.h" +#include "libvo/fastmemcpy.h" #include @@ -68,10 +68,47 @@ static volatile float callback_time = 0; #define CHUNK_SIZE (16 * 1024) //! number of "virtual" chunks the buffer consists of #define NUM_CHUNKS 8 -#define BUFFSIZE (NUM_CHUNKS * CHUNK_SIZE) +// This type of ring buffer may never fill up completely, at least +// one byte must always be unused. +// For performance reasons (alignment etc.) one whole chunk always stays +// empty, not only one byte. +#define BUFFSIZE ((NUM_CHUNKS + 1) * CHUNK_SIZE) //! buffer for audio data -static AVFifoBuffer *buffer; +static unsigned char *buffer = NULL; + +//! buffer read position, may only be modified by playback thread or while it is stopped +static volatile int read_pos; +//! buffer write position, may only be modified by MPlayer's thread +static volatile int write_pos; + +/** + * \brief get the number of free bytes in the buffer + * \return number of free bytes in buffer + * + * may only be called by MPlayer's thread + * return value may change between immediately following two calls, + * and the real number of free bytes might be larger! + */ +static int buf_free(void) { + int free = read_pos - write_pos - CHUNK_SIZE; + if (free < 0) free += BUFFSIZE; + return free; +} + +/** + * \brief get amount of data available in the buffer + * \return number of bytes available in buffer + * + * may only be called by the playback thread + * return value may change between immediately following two calls, + * and the real number of buffered bytes might be larger! + */ +static int buf_used(void) { + int used = write_pos - read_pos; + if (used < 0) used += BUFFSIZE; + return used; +} /** * \brief insert len bytes into buffer @@ -82,34 +119,22 @@ static AVFifoBuffer *buffer; * If there is not enough room, the buffer is filled up */ static int write_buffer(unsigned char* data, int len) { - int free = BUFFSIZE - av_fifo_size(buffer); + int first_len = BUFFSIZE - write_pos; + int free = buf_free(); if (len > free) len = free; - return av_fifo_generic_write(buffer, data, len, NULL); + if (first_len > len) first_len = len; + // till end of buffer + fast_memcpy (&buffer[write_pos], data, first_len); + if (len > first_len) { // we have to wrap around + // remaining part from beginning of buffer + fast_memcpy (buffer, &data[first_len], len - first_len); + } + write_pos = (write_pos + len) % BUFFSIZE; + return len; } static void silence(float **bufs, int cnt, int num_bufs); -struct deinterleave { - float **bufs; - int num_bufs; - int cur_buf; - int pos; -}; - -static void deinterleave(void *info, void *src, int len) { - struct deinterleave *di = info; - float *s = src; - int i; - len /= sizeof(float); - for (i = 0; i < len; i++) { - di->bufs[di->cur_buf++][di->pos] = s[i]; - if (di->cur_buf >= di->num_bufs) { - di->cur_buf = 0; - di->pos++; - } - } -} - /** * \brief read data from buffer and splitting it into channels * \param bufs num_bufs float buffers, each will contain the data of one channel @@ -124,13 +149,18 @@ static void deinterleave(void *info, voi * with silence. */ static int read_buffer(float **bufs, int cnt, int num_bufs) { - struct deinterleave di = {bufs, num_bufs, 0, 0}; - int buffered = av_fifo_size(buffer); + int buffered = buf_used(); + int i, j; if (cnt * sizeof(float) * num_bufs > buffered) { silence(bufs, cnt, num_bufs); cnt = buffered / sizeof(float) / num_bufs; } - av_fifo_generic_read(buffer, &di, cnt * num_bufs * sizeof(float), deinterleave); + for (i = 0; i < cnt; i++) { + for (j = 0; j < num_bufs; j++) { + bufs[j][i] = *(float *)&buffer[read_pos]; + read_pos = (read_pos + sizeof(float)) % BUFFSIZE; + } + } return cnt; } @@ -238,7 +268,7 @@ static int init(int rate, int channels, mp_msg(MSGT_AO, MSGL_FATAL, "[JACK] cannot open server\n"); goto err_out; } - buffer = av_fifo_alloc(BUFFSIZE); + reset(); jack_set_process_callback(client, outputaudio, 0); // list matching ports @@ -278,6 +308,7 @@ static int init(int rate, int channels, jack_latency = (float)(jack_port_get_total_latency(client, ports[0]) + jack_get_buffer_size(client)) / (float)rate; callback_interval = 0; + buffer = malloc(BUFFSIZE); ao_data.channels = channels; ao_data.samplerate = rate; @@ -296,7 +327,7 @@ err_out: free(client_name); if (client) jack_client_close(client); - av_fifo_free(buffer); + free(buffer); buffer = NULL; return 0; } @@ -309,7 +340,7 @@ static void uninit(int immed) { reset(); usec_sleep(100 * 1000); jack_client_close(client); - av_fifo_free(buffer); + free(buffer); buffer = NULL; } @@ -318,7 +349,8 @@ static void uninit(int immed) { */ static void reset(void) { paused = 1; - av_fifo_reset(buffer); + read_pos = 0; + write_pos = 0; paused = 0; } @@ -337,7 +369,7 @@ static void audio_resume(void) { } static int get_space(void) { - return BUFFSIZE - av_fifo_size(buffer); + return buf_free(); } /** @@ -351,7 +383,7 @@ static int play(void *data, int len, int } static float get_delay(void) { - int buffered = av_fifo_size(buffer); // could be less + int buffered = BUFFSIZE - CHUNK_SIZE - buf_free(); // could be less float in_jack = jack_latency; if (estimate && callback_interval > 0) { float elapsed = (float)GetTimer() / 1000000.0 - callback_time; Modified: branches/1.0rc3/libao2/ao_sdl.c ============================================================================== --- branches/1.0rc3/libao2/ao_sdl.c Fri Mar 27 23:56:56 2009 (r29079) +++ branches/1.0rc3/libao2/ao_sdl.c Sat Mar 28 13:15:10 2009 (r29080) @@ -3,6 +3,8 @@ * * Copyleft 2001 by Felix B?nemann (atmosfear at users.sf.net) * + * Thanks to Arpi for nice ringbuffer-code! + * * This file is part of MPlayer. * * MPlayer is free software; you can redistribute it and/or modify @@ -34,7 +36,7 @@ #include #include "osdep/timer.h" -#include "libavutil/fifo.h" +#include "libvo/fastmemcpy.h" static const ao_info_t info = { @@ -58,34 +60,76 @@ LIBAO_EXTERN(sdl) #define CHUNK_SIZE 4096 #define NUM_CHUNKS 8 -#define BUFFSIZE (NUM_CHUNKS * CHUNK_SIZE) +// This type of ring buffer may never fill up completely, at least +// one byte must always be unused. +// For performance reasons (alignment etc.) one whole chunk always stays +// empty, not only one byte. +#define BUFFSIZE ((NUM_CHUNKS + 1) * CHUNK_SIZE) -static AVFifoBuffer *buffer; +static unsigned char *buffer; +// may only be modified by SDL's playback thread or while it is stopped +static volatile int read_pos; +// may only be modified by mplayer's thread +static volatile int write_pos; #ifdef USE_SDL_INTERNAL_MIXER static unsigned char volume=SDL_MIX_MAXVOLUME; #endif -static int write_buffer(unsigned char* data,int len){ - int free = BUFFSIZE - av_fifo_size(buffer); - if (len > free) len = free; - return av_fifo_generic_write(buffer, data, len, NULL); +// may only be called by mplayer's thread +// return value may change between immediately following two calls, +// and the real number of free bytes might be larger! +static int buf_free(void) { + int free = read_pos - write_pos - CHUNK_SIZE; + if (free < 0) free += BUFFSIZE; + return free; } -#ifdef USE_SDL_INTERNAL_MIXER -static void mix_audio(void *dst, void *src, int len) { - SDL_MixAudio(dst, src, len, volume); +// may only be called by SDL's playback thread +// return value may change between immediately following two calls, +// and the real number of buffered bytes might be larger! +static int buf_used(void) { + int used = write_pos - read_pos; + if (used < 0) used += BUFFSIZE; + return used; +} + +static int write_buffer(unsigned char* data,int len){ + int first_len = BUFFSIZE - write_pos; + int free = buf_free(); + if (len > free) len = free; + if (first_len > len) first_len = len; + // till end of buffer + fast_memcpy (&buffer[write_pos], data, first_len); + if (len > first_len) { // we have to wrap around + // remaining part from beginning of buffer + fast_memcpy (buffer, &data[first_len], len - first_len); + } + write_pos = (write_pos + len) % BUFFSIZE; + return len; } -#endif static int read_buffer(unsigned char* data,int len){ - int buffered = av_fifo_size(buffer); + int first_len = BUFFSIZE - read_pos; + int buffered = buf_used(); if (len > buffered) len = buffered; + if (first_len > len) first_len = len; + // till end of buffer #ifdef USE_SDL_INTERNAL_MIXER - return av_fifo_generic_read(buffer, data, len, mix_audio); + SDL_MixAudio (data, &buffer[read_pos], first_len, volume); #else - return av_fifo_generic_read(buffer, data, len, NULL); + fast_memcpy (data, &buffer[read_pos], first_len); #endif + if (len > first_len) { // we have to wrap around + // remaining part from beginning of buffer +#ifdef USE_SDL_INTERNAL_MIXER + SDL_MixAudio (&data[first_len], buffer, len - first_len, volume); +#else + fast_memcpy (&data[first_len], buffer, len - first_len); +#endif + } + read_pos = (read_pos + len) % BUFFSIZE; + return len; } // end ring buffer stuff @@ -131,7 +175,7 @@ static int init(int rate,int channels,in SDL_AudioSpec aspec, obtained; /* Allocate ring-buffer memory */ - buffer = av_fifo_alloc(BUFFSIZE); + buffer = (unsigned char *) malloc(BUFFSIZE); mp_msg(MSGT_AO,MSGL_INFO,MSGTR_AO_SDL_INFO, rate, (channels > 1) ? "Stereo" : "Mono", af_fmt2str_short(format)); @@ -234,6 +278,7 @@ void callback(void *userdata, Uint8 *str ao_data.buffersize=obtained.size; ao_data.outburst = CHUNK_SIZE; + reset(); /* unsilence audio, if callback is ready */ SDL_PauseAudio(0); @@ -247,7 +292,6 @@ static void uninit(int immed){ usec_sleep(get_delay() * 1000 * 1000); SDL_CloseAudio(); SDL_QuitSubSystem(SDL_INIT_AUDIO); - av_fifo_free(buffer); } // stop playing and empty buffers (for seeking/pause) @@ -257,7 +301,8 @@ static void reset(void){ SDL_PauseAudio(1); /* Reset ring-buffer state */ - av_fifo_reset(buffer); + read_pos = 0; + write_pos = 0; SDL_PauseAudio(0); } @@ -280,7 +325,7 @@ static void audio_resume(void) // return: how many bytes can be played without blocking static int get_space(void){ - return BUFFSIZE - av_fifo_size(buffer); + return buf_free(); } // plays 'len' bytes of 'data' @@ -307,7 +352,7 @@ static int play(void* data,int len,int f // return: delay in seconds between first and last sample in buffer static float get_delay(void){ - int buffered = av_fifo_size(buffer); // could be less + int buffered = BUFFSIZE - CHUNK_SIZE - buf_free(); // could be less return (float)(buffered + ao_data.buffersize)/(float)ao_data.bps; } From subversion at mplayerhq.hu Sat Mar 28 13:17:43 2009 From: subversion at mplayerhq.hu (diego) Date: Sat, 28 Mar 2009 13:17:43 +0100 (CET) Subject: [MPlayer-cvslog] r29081 - in branches/1.0rc3: . Copyright Message-ID: <20090328121743.2F2BB3B5EA@natsuki.mplayerhq.hu> Author: diego Date: Sat Mar 28 13:17:42 2009 New Revision: 29081 Log: Use FFmpeg 0.5 for 1.0rc3 release. Modified: branches/1.0rc3/ (props changed) branches/1.0rc3/Copyright Modified: branches/1.0rc3/Copyright ============================================================================== --- branches/1.0rc3/Copyright Sat Mar 28 13:15:10 2009 (r29080) +++ branches/1.0rc3/Copyright Sat Mar 28 13:17:42 2009 (r29081) @@ -8,7 +8,7 @@ notices can be found in the file headers from several external sources: Name: FFmpeg -Version: Subversion HEAD +Version: 0.5 URL: http://www.ffmpeg.org Directory: libavcodec, libavformat, libavutil, libpostproc Copyright: Many, see individual files for copyright notices. From subversion at mplayerhq.hu Sat Mar 28 16:53:33 2009 From: subversion at mplayerhq.hu (reimar) Date: Sat, 28 Mar 2009 16:53:33 +0100 (CET) Subject: [MPlayer-cvslog] r29082 - trunk/stream/stream_dvd.c Message-ID: <20090328155333.0CC783B51D@natsuki.mplayerhq.hu> Author: reimar Date: Sat Mar 28 16:53:32 2009 New Revision: 29082 Log: Simplify extracting title number from ifo name Modified: trunk/stream/stream_dvd.c Modified: trunk/stream/stream_dvd.c ============================================================================== --- trunk/stream/stream_dvd.c Sat Mar 28 13:17:42 2009 (r29081) +++ trunk/stream/stream_dvd.c Sat Mar 28 16:53:32 2009 (r29082) @@ -1108,12 +1108,8 @@ static int ifo_stream_open (stream_t *st spriv=calloc(1, sizeof(struct stream_priv_s)); spriv->device = strdup(dirname(stream->url)); - if(!strncasecmp(filename,"vts_",4)) - { - if(sscanf(filename+3, "_%02d_", &spriv->title)!=1) + if(sscanf(filename, "vts_%02d_", &spriv->title)!=1) spriv->title=1; - }else - spriv->title=1; free(filename); free(stream->url); From subversion at mplayerhq.hu Sat Mar 28 16:54:08 2009 From: subversion at mplayerhq.hu (reimar) Date: Sat, 28 Mar 2009 16:54:08 +0100 (CET) Subject: [MPlayer-cvslog] r29083 - trunk/stream/stream_dvd.c Message-ID: <20090328155408.90F1E50029@natsuki.mplayerhq.hu> Author: reimar Date: Sat Mar 28 16:54:08 2009 New Revision: 29083 Log: Reindent Modified: trunk/stream/stream_dvd.c Modified: trunk/stream/stream_dvd.c ============================================================================== --- trunk/stream/stream_dvd.c Sat Mar 28 16:53:32 2009 (r29082) +++ trunk/stream/stream_dvd.c Sat Mar 28 16:54:08 2009 (r29083) @@ -1108,8 +1108,8 @@ static int ifo_stream_open (stream_t *st spriv=calloc(1, sizeof(struct stream_priv_s)); spriv->device = strdup(dirname(stream->url)); - if(sscanf(filename, "vts_%02d_", &spriv->title)!=1) - spriv->title=1; + if(sscanf(filename, "vts_%02d_", &spriv->title)!=1) + spriv->title=1; free(filename); free(stream->url); From subversion at mplayerhq.hu Sat Mar 28 17:09:56 2009 From: subversion at mplayerhq.hu (reimar) Date: Sat, 28 Mar 2009 17:09:56 +0100 (CET) Subject: [MPlayer-cvslog] r29084 - trunk/stream/stream_dvd.c Message-ID: <20090328160956.A953E3B397@natsuki.mplayerhq.hu> Author: reimar Date: Sat Mar 28 17:09:56 2009 New Revision: 29084 Log: 100l, revert r29082, I missed that the vts comparison should be case-insensitive. Replaced: trunk/stream/stream_dvd.c - copied unchanged from r29081, trunk/stream/stream_dvd.c From subversion at mplayerhq.hu Sat Mar 28 19:53:27 2009 From: subversion at mplayerhq.hu (reimar) Date: Sat, 28 Mar 2009 19:53:27 +0100 (CET) Subject: [MPlayer-cvslog] r29085 - trunk/configure Message-ID: <20090328185327.407303B532@natsuki.mplayerhq.hu> Author: reimar Date: Sat Mar 28 19:53:26 2009 New Revision: 29085 Log: Check for ddk/ntddcdrm.h header before enabling VCD on mingw. Fixes a compilation issue on mingw-w64 which does not have that header. Modified: trunk/configure Modified: trunk/configure ============================================================================== --- trunk/configure Sat Mar 28 17:09:56 2009 (r29084) +++ trunk/configure Sat Mar 28 19:53:26 2009 (r29085) @@ -5730,15 +5730,23 @@ fi echocheck "VCD support" -if linux || freebsd || netbsd || openbsd || dragonfly || bsdos || darwin || sunos || mingw32; then +_vcd=no +if linux || freebsd || netbsd || openbsd || dragonfly || bsdos || darwin || sunos; then + _vcd=yes +elif mingw32; then + cat > $TMPC << EOF +#include +int main(void) { return 0; } +EOF + cc_check && _vcd=yes +fi +if test "$_vcd" = yes; then _inputmodules="vcd $_inputmodules" def_vcd='#define CONFIG_VCD 1' - _vcd="yes" else def_vcd='#undef CONFIG_VCD' _noinputmodules="vcd $_noinputmodules" _res_comment="not supported on this OS" - _vcd="no" fi echores "$_vcd" From subversion at mplayerhq.hu Sat Mar 28 20:21:35 2009 From: subversion at mplayerhq.hu (reimar) Date: Sat, 28 Mar 2009 20:21:35 +0100 (CET) Subject: [MPlayer-cvslog] r29086 - trunk/libass/ass_render.c Message-ID: <20090328192135.2BD103B664@natsuki.mplayerhq.hu> Author: reimar Date: Sat Mar 28 20:21:34 2009 New Revision: 29086 Log: Initialize all structs to 0 before using them. This is consistent with the remaining code (which uses e.g. calloc) and makes it easier to extend the structs in the future. As a side effect it fixes several valgrind errors in hashmap_hash/hashmap_key_compare caused by padding in the structures, but it is not a correct fix for that issue. Modified: trunk/libass/ass_render.c Modified: trunk/libass/ass_render.c ============================================================================== --- trunk/libass/ass_render.c Sat Mar 28 19:53:26 2009 (r29085) +++ trunk/libass/ass_render.c Sat Mar 28 20:21:34 2009 (r29086) @@ -455,6 +455,7 @@ static void render_overlap(ass_image_t** cur_top = top-by; // Query cache + memset(&hk, 0, sizeof(hk)); memcpy(&hk.a, last_hash, sizeof(*last_hash)); memcpy(&hk.b, hash, sizeof(*hash)); hk.aw = aw; @@ -1429,6 +1430,7 @@ static void get_outline_glyph(int symbol int error; glyph_hash_val_t* val; glyph_hash_key_t key; + memset(&key, 0, sizeof(key)); key.font = render_context.font; key.size = render_context.font_size; key.ch = symbol; @@ -2166,6 +2168,7 @@ static int ass_render_event(ass_event_t* for (i = 0; i < text_info.length; ++i) get_bitmap_glyph(text_info.glyphs + i); + memset(event_images, 0, sizeof(*event_images)); event_images->top = device_y - d6_to_int(text_info.lines[0].asc); event_images->height = d6_to_int(text_info.height); event_images->detect_collisions = render_context.detect_collisions; From subversion at mplayerhq.hu Sat Mar 28 20:24:08 2009 From: subversion at mplayerhq.hu (reimar) Date: Sat, 28 Mar 2009 20:24:08 +0100 (CET) Subject: [MPlayer-cvslog] r29087 - trunk/libass/ass_render.c Message-ID: <20090328192408.7CDC63B67D@natsuki.mplayerhq.hu> Author: reimar Date: Sat Mar 28 20:24:08 2009 New Revision: 29087 Log: Document the ass_render_event event_images parameter. Modified: trunk/libass/ass_render.c Modified: trunk/libass/ass_render.c ============================================================================== --- trunk/libass/ass_render.c Sat Mar 28 20:21:34 2009 (r29086) +++ trunk/libass/ass_render.c Sat Mar 28 20:24:08 2009 (r29087) @@ -1875,6 +1875,7 @@ static void transform_3d(FT_Vector shift /** * \brief Main ass rendering function, glues everything together * \param event event to render + * \param event_images struct containing resulting images, will also be initialized * Process event, appending resulting ass_image_t's to images_root. */ static int ass_render_event(ass_event_t* event, event_images_t* event_images) From subversion at mplayerhq.hu Sat Mar 28 20:57:56 2009 From: subversion at mplayerhq.hu (bircoph) Date: Sat, 28 Mar 2009 20:57:56 +0100 (CET) Subject: [MPlayer-cvslog] r29088 - in trunk/libaf: af.c af.h af_center.c af_channels.c af_delay.c af_dummy.c af_equalizer.c af_export.c af_format.c af_hrtf.c af_ladspa.c af_lavcac3enc.c af_mp.h af_pan.c af_resample.c af_sca... Message-ID: <20090328195756.B78B53B658@natsuki.mplayerhq.hu> Author: bircoph Date: Sat Mar 28 20:57:56 2009 New Revision: 29088 Log: Remove af_msg special-casing API in libaf. Replace it by standard mp_msg message system. Modified: trunk/libaf/af.c trunk/libaf/af.h trunk/libaf/af_center.c trunk/libaf/af_channels.c trunk/libaf/af_delay.c trunk/libaf/af_dummy.c trunk/libaf/af_equalizer.c trunk/libaf/af_export.c trunk/libaf/af_format.c trunk/libaf/af_hrtf.c trunk/libaf/af_ladspa.c trunk/libaf/af_lavcac3enc.c trunk/libaf/af_mp.h trunk/libaf/af_pan.c trunk/libaf/af_resample.c trunk/libaf/af_scaletempo.c trunk/libaf/af_sinesuppress.c trunk/libaf/af_sub.c trunk/libaf/af_surround.c trunk/libaf/af_volume.c Modified: trunk/libaf/af.c ============================================================================== --- trunk/libaf/af.c Sat Mar 28 20:24:08 2009 (r29087) +++ trunk/libaf/af.c Sat Mar 28 20:57:56 2009 (r29088) @@ -91,9 +91,6 @@ static af_info_t* filter_list[]={ NULL }; -// Message printing -af_msg_cfg_t af_msg_cfg={0,NULL,NULL}; - // CPU speed int* af_cpu_speed = NULL; @@ -107,7 +104,7 @@ static af_info_t* af_find(char*name) return filter_list[i]; i++; } - af_msg(AF_MSG_ERROR,"Couldn't find audio filter '%s'\n",name); + mp_msg(MSGT_AFILTER, MSGL_ERR, "Couldn't find audio filter '%s'\n",name); return NULL; } @@ -135,7 +132,7 @@ static af_instance_t* af_create(af_strea // Allocate space for the new filter and reset all pointers af_instance_t* new=malloc(sizeof(af_instance_t)); if (!name || !new) { - af_msg(AF_MSG_ERROR,"[libaf] Could not allocate memory\n"); + mp_msg(MSGT_AFILTER, MSGL_ERR, "[libaf] Could not allocate memory\n"); goto err_out; } memset(new,0,sizeof(af_instance_t)); @@ -151,13 +148,13 @@ static af_instance_t* af_create(af_strea non-reentrant */ if(new->info->flags & AF_FLAGS_NOT_REENTRANT){ if(af_get(s,name)){ - af_msg(AF_MSG_ERROR,"[libaf] There can only be one instance of" + mp_msg(MSGT_AFILTER, MSGL_ERR, "[libaf] There can only be one instance of" " the filter '%s' in each stream\n",name); goto err_out; } } - af_msg(AF_MSG_VERBOSE,"[libaf] Adding filter %s \n",name); + mp_msg(MSGT_AFILTER, MSGL_V, "[libaf] Adding filter %s \n",name); // Initialize the new filter if(AF_OK == new->info->open(new) && @@ -172,7 +169,7 @@ static af_instance_t* af_create(af_strea err_out: free(new); - af_msg(AF_MSG_ERROR,"[libaf] Couldn't create or open audio filter '%s'\n", + mp_msg(MSGT_AFILTER, MSGL_ERR, "[libaf] Couldn't create or open audio filter '%s'\n", name); free(name); return NULL; @@ -232,7 +229,7 @@ void af_remove(af_stream_t* s, af_instan if(!af) return; // Print friendly message - af_msg(AF_MSG_VERBOSE,"[libaf] Removing filter %s \n",af->info->name); + mp_msg(MSGT_AFILTER, MSGL_V, "[libaf] Removing filter %s \n",af->info->name); // Notify filter before changing anything af->control(af,AF_CONTROL_PRE_DESTROY,0); @@ -321,14 +318,14 @@ static int af_reinit(af_stream_t* s, af_ return rv; } if(!new){ // Should _never_ happen - af_msg(AF_MSG_ERROR,"[libaf] Unable to correct audio format. " + mp_msg(MSGT_AFILTER, MSGL_ERR, "[libaf] Unable to correct audio format. " "This error should never uccur, please send bugreport.\n"); return AF_ERROR; } af=new->next; } else { - af_msg(AF_MSG_ERROR, "[libaf] Automatic filter insertion disabled " + mp_msg(MSGT_AFILTER, MSGL_ERR, "[libaf] Automatic filter insertion disabled " "but formats do not match. Giving up.\n"); return AF_ERROR; } @@ -347,7 +344,7 @@ static int af_reinit(af_stream_t* s, af_ break; } default: - af_msg(AF_MSG_ERROR,"[libaf] Reinitialization did not work, audio" + mp_msg(MSGT_AFILTER, MSGL_ERR, "[libaf] Reinitialization did not work, audio" " filter '%s' returned error code %i\n",af->info->name,rv); return AF_ERROR; } @@ -498,7 +495,7 @@ int af_init(af_stream_t* s) (s->last->data->nch != s->output.nch) || (s->last->data->rate != s->output.rate)) { // Something is stuffed audio out will not work - af_msg(AF_MSG_ERROR,"[libaf] Unable to setup filter system can not" + mp_msg(MSGT_AFILTER, MSGL_ERR, "[libaf] Unable to setup filter system can not" " meet sound-card demands, please send bugreport. \n"); af_uninit(s); return -1; @@ -589,7 +586,7 @@ int af_resize_local_buffer(af_instance_t { // Calculate new length register int len = af_lencalc(af->mul,data); - af_msg(AF_MSG_VERBOSE,"[libaf] Reallocating memory in module %s, " + mp_msg(MSGT_AFILTER, MSGL_V, "[libaf] Reallocating memory in module %s, " "old len = %i, new len = %i\n",af->info->name,af->data->len,len); // If there is a buffer free it if(af->data->audio) @@ -597,7 +594,7 @@ int af_resize_local_buffer(af_instance_t // Create new buffer and check that it is OK af->data->audio = malloc(len); if(!af->data->audio){ - af_msg(AF_MSG_FATAL,"[libaf] Could not allocate memory \n"); + mp_msg(MSGT_AFILTER, MSGL_FATAL, "[libaf] Could not allocate memory \n"); return AF_ERROR; } af->data->len=len; @@ -619,12 +616,12 @@ af_instance_t *af_control_any_rev (af_st void af_help (void) { int i = 0; - af_msg(AF_MSG_INFO, "Available audio filters:\n"); + mp_msg(MSGT_AFILTER, MSGL_INFO, "Available audio filters:\n"); while (filter_list[i]) { if (filter_list[i]->comment && filter_list[i]->comment[0]) - af_msg(AF_MSG_INFO, " %-15s: %s (%s)\n", filter_list[i]->name, filter_list[i]->info, filter_list[i]->comment); + mp_msg(MSGT_AFILTER, MSGL_INFO, " %-15s: %s (%s)\n", filter_list[i]->name, filter_list[i]->info, filter_list[i]->comment); else - af_msg(AF_MSG_INFO, " %-15s: %s\n", filter_list[i]->name, filter_list[i]->info); + mp_msg(MSGT_AFILTER, MSGL_INFO, " %-15s: %s\n", filter_list[i]->name, filter_list[i]->info); i++; } } Modified: trunk/libaf/af.h ============================================================================== --- trunk/libaf/af.h Sat Mar 28 20:24:08 2009 (r29087) +++ trunk/libaf/af.h Sat Mar 28 20:57:56 2009 (r29088) @@ -25,6 +25,7 @@ #include "af_mp.h" #include "control.h" #include "af_format.h" +#include "mp_msg.h" struct af_instance_s; @@ -342,34 +343,4 @@ void af_fix_parameters(af_data_t *data); #define lrnd(a,b) ((b)((a)>=0.0?(a)+0.5:(a)-0.5)) #endif -/* Error messages */ - -typedef struct af_msg_cfg_s -{ - int level; /* Message level for debug and error messages max = 2 - min = -2 default = 0 */ - FILE* err; // Stream to print error messages to - FILE* msg; // Stream to print information messages to -}af_msg_cfg_t; - -extern af_msg_cfg_t af_msg_cfg; // Message - -//! \addtogroup af_filter -//! \{ -#define AF_MSG_FATAL -3 ///< Fatal error exit immediately -#define AF_MSG_ERROR -2 ///< Error return gracefully -#define AF_MSG_WARN -1 ///< Print warning but do not exit (can be suppressed) -#define AF_MSG_INFO 0 ///< Important information -#define AF_MSG_VERBOSE 1 ///< Print this if verbose is enabled -#define AF_MSG_DEBUG0 2 ///< Print if very verbose -#define AF_MSG_DEBUG1 3 ///< Print if very very verbose - -//! Macro for printing error messages -#ifndef af_msg -#define af_msg(lev, args... ) \ -(((lev)= AF_NCH) || (*(int*)arg < 0)){ - af_msg(AF_MSG_ERROR,"[sub] Center channel number must be between " + mp_msg(MSGT_AFILTER, MSGL_ERR, "[sub] Center channel number must be between " " 0 and %i current value is %i\n", AF_NCH-1, *(int*)arg); return AF_ERROR; } Modified: trunk/libaf/af_channels.c ============================================================================== --- trunk/libaf/af_channels.c Sat Mar 28 20:24:08 2009 (r29087) +++ trunk/libaf/af_channels.c Sat Mar 28 20:57:56 2009 (r29088) @@ -108,7 +108,7 @@ static void copy(void* in, void* out, in break; } default: - af_msg(AF_MSG_ERROR,"[channels] Unsupported number of bytes/sample: %i" + mp_msg(MSGT_AFILTER, MSGL_ERR, "[channels] Unsupported number of bytes/sample: %i" " please report this error on the MPlayer mailing list. \n",bps); } } @@ -118,14 +118,14 @@ static int check_routes(af_channels_t* s { int i; if((s->nr < 1) || (s->nr > AF_NCH)){ - af_msg(AF_MSG_ERROR,"[channels] The number of routing pairs must be" + mp_msg(MSGT_AFILTER, MSGL_ERR, "[channels] The number of routing pairs must be" " between 1 and %i. Current value is %i\n",AF_NCH,s->nr); return AF_ERROR; } for(i=0;inr;i++){ if((s->route[i][FR] >= nin) || (s->route[i][TO] >= nout)){ - af_msg(AF_MSG_ERROR,"[channels] Invalid routing in pair nr. %i.\n", i); + mp_msg(MSGT_AFILTER, MSGL_ERR, "[channels] Invalid routing in pair nr. %i.\n", i); return AF_ERROR; } } @@ -180,14 +180,14 @@ static int control(struct af_instance_s* int ch = 0; // Sanity check if((s->nr < 1) || (s->nr > AF_NCH)){ - af_msg(AF_MSG_ERROR,"[channels] The number of routing pairs must be" + mp_msg(MSGT_AFILTER, MSGL_ERR, "[channels] The number of routing pairs must be" " between 1 and %i. Current value is %i\n",AF_NCH,s->nr); } s->router = 1; // Scan for pairs on commandline while((*cp == ':') && (ch < s->nr)){ sscanf(cp, ":%i:%i%n" ,&s->route[ch][FR], &s->route[ch][TO], &n); - af_msg(AF_MSG_VERBOSE,"[channels] Routing from channel %i to" + mp_msg(MSGT_AFILTER, MSGL_V, "[channels] Routing from channel %i to" " channel %i\n",s->route[ch][FR],s->route[ch][TO]); cp = &cp[n]; ch++; @@ -203,14 +203,14 @@ static int control(struct af_instance_s* // Sanity check if(((int*)arg)[0] <= 0 || ((int*)arg)[0] > AF_NCH){ - af_msg(AF_MSG_ERROR,"[channels] The number of output channels must be" + mp_msg(MSGT_AFILTER, MSGL_ERR, "[channels] The number of output channels must be" " between 1 and %i. Current value is %i\n",AF_NCH,((int*)arg)[0]); return AF_ERROR; } af->data->nch=((int*)arg)[0]; if(!s->router) - af_msg(AF_MSG_VERBOSE,"[channels] Changing number of channels" + mp_msg(MSGT_AFILTER, MSGL_V, "[channels] Changing number of channels" " to %i\n",af->data->nch); return AF_OK; case AF_CONTROL_CHANNELS | AF_CONTROL_GET: Modified: trunk/libaf/af_delay.c ============================================================================== --- trunk/libaf/af_delay.c Sat Mar 28 20:24:08 2009 (r29087) +++ trunk/libaf/af_delay.c Sat Mar 28 20:57:56 2009 (r29088) @@ -63,7 +63,7 @@ static int control(struct af_instance_s* for(i=0;idata->nch;i++){ s->q[i] = calloc(L,af->data->bps); if(NULL == s->q[i]) - af_msg(AF_MSG_FATAL,"[delay] Out of memory\n"); + mp_msg(MSGT_AFILTER, MSGL_FATAL, "[delay] Out of memory\n"); } return control(af,AF_CONTROL_DELAY_LEN | AF_CONTROL_SET,s->d); @@ -87,9 +87,9 @@ static int control(struct af_instance_s* return AF_ERROR; s->ri = 0; for(i=0;id[i],0.0,1000.0)); - af_msg(AF_MSG_DEBUG1,"[delay] Channel %i delayed by %i samples\n", + mp_msg(MSGT_AFILTER, MSGL_DBG3, "[delay] Channel %i delayed by %i samples\n", i,s->wi[i]); } return AF_OK; Modified: trunk/libaf/af_dummy.c ============================================================================== --- trunk/libaf/af_dummy.c Sat Mar 28 20:24:08 2009 (r29087) +++ trunk/libaf/af_dummy.c Sat Mar 28 20:57:56 2009 (r29088) @@ -31,7 +31,7 @@ static int control(struct af_instance_s* switch(cmd){ case AF_CONTROL_REINIT: memcpy(af->data,(af_data_t*)arg,sizeof(af_data_t)); - af_msg(AF_MSG_VERBOSE,"[dummy] Was reinitialized: %iHz/%ich/%s\n", + mp_msg(MSGT_AFILTER, MSGL_V, "[dummy] Was reinitialized: %iHz/%ich/%s\n", af->data->rate,af->data->nch,af_fmt2str_short(af->data->format)); return AF_OK; } @@ -50,7 +50,7 @@ static af_data_t* play(struct af_instanc { // Do something necessary to get rid of annoying warning during compile if(!af) - af_msg(AF_MSG_ERROR,"EEEK: Argument af == NULL in af_dummy.c play()."); + mp_msg(MSGT_AFILTER, MSGL_ERR, "EEEK: Argument af == NULL in af_dummy.c play()."); return data; } Modified: trunk/libaf/af_equalizer.c ============================================================================== --- trunk/libaf/af_equalizer.c Sat Mar 28 20:24:08 2009 (r29087) +++ trunk/libaf/af_equalizer.c Sat Mar 28 20:57:56 2009 (r29088) @@ -107,7 +107,7 @@ static int control(struct af_instance_s* s->K--; if(s->K != KM) - af_msg(AF_MSG_INFO,"[equalizer] Limiting the number of filters to" + mp_msg(MSGT_AFILTER, MSGL_INFO, "[equalizer] Limiting the number of filters to" " %i due to low sample rate.\n",s->K); // Generate filter taps Modified: trunk/libaf/af_export.c ============================================================================== --- trunk/libaf/af_export.c Sat Mar 28 20:24:08 2009 (r29087) +++ trunk/libaf/af_export.c Sat Mar 28 20:57:56 2009 (r29088) @@ -96,15 +96,15 @@ static int control(struct af_instance_s* // Allocate new buffers (as one continuous block) s->buf[0] = calloc(s->sz*af->data->nch, af->data->bps); if(NULL == s->buf[0]) - af_msg(AF_MSG_FATAL, "[export] Out of memory\n"); + mp_msg(MSGT_AFILTER, MSGL_FATAL, "[export] Out of memory\n"); for(i = 1; i < af->data->nch; i++) s->buf[i] = s->buf[0] + i*s->sz*af->data->bps; // Init memory mapping s->fd = open(s->filename, O_RDWR | O_CREAT | O_TRUNC, 0640); - af_msg(AF_MSG_INFO, "[export] Exporting to file: %s\n", s->filename); + mp_msg(MSGT_AFILTER, MSGL_INFO, "[export] Exporting to file: %s\n", s->filename); if(s->fd < 0) - af_msg(AF_MSG_FATAL, "[export] Could not open/create file: %s\n", + mp_msg(MSGT_AFILTER, MSGL_FATAL, "[export] Could not open/create file: %s\n", s->filename); // header + buffer @@ -119,8 +119,8 @@ static int control(struct af_instance_s* // mmap size s->mmap_area = mmap(0, mapsize, PROT_READ|PROT_WRITE,MAP_SHARED, s->fd, 0); if(s->mmap_area == NULL) - af_msg(AF_MSG_FATAL, "[export] Could not mmap file %s\n", s->filename); - af_msg(AF_MSG_INFO, "[export] Memory mapped to file: %s (%p)\n", + mp_msg(MSGT_AFILTER, MSGL_FATAL, "[export] Could not mmap file %s\n", s->filename); + mp_msg(MSGT_AFILTER, MSGL_INFO, "[export] Memory mapped to file: %s (%p)\n", s->filename, s->mmap_area); // Initialize header @@ -160,7 +160,7 @@ static int control(struct af_instance_s* case AF_CONTROL_EXPORT_SZ | AF_CONTROL_SET: s->sz = * (int *) arg; if((s->sz <= 0) || (s->sz > 2048)) - af_msg( AF_MSG_ERROR, "[export] Buffer size must be between" + mp_msg(MSGT_AFILTER, MSGL_ERR, "[export] Buffer size must be between" " 1 and 2048\n" ); return AF_OK; Modified: trunk/libaf/af_format.c ============================================================================== --- trunk/libaf/af_format.c Sat Mar 28 20:24:08 2009 (r29087) +++ trunk/libaf/af_format.c Sat Mar 28 20:57:56 2009 (r29088) @@ -62,7 +62,7 @@ static af_data_t* play_s16_float(struct static int check_bps(int bps) { if(bps != 4 && bps != 3 && bps != 2 && bps != 1){ - af_msg(AF_MSG_ERROR,"[format] The number of bytes per sample" + mp_msg(MSGT_AFILTER, MSGL_ERR, "[format] The number of bytes per sample" " must be 1, 2, 3 or 4. Current value is %i \n",bps); return AF_ERROR; } @@ -77,7 +77,7 @@ static int check_format(int format) case(AF_FORMAT_IMA_ADPCM): case(AF_FORMAT_MPEG2): case(AF_FORMAT_AC3): - af_msg(AF_MSG_ERROR,"[format] Sample format %s not yet supported \n", + mp_msg(MSGT_AFILTER, MSGL_ERR, "[format] Sample format %s not yet supported \n", af_fmt2str(format,buf,256)); return AF_ERROR; } @@ -105,7 +105,7 @@ static int control(struct af_instance_s* (AF_OK != check_format(af->data->format))) return AF_ERROR; - af_msg(AF_MSG_VERBOSE,"[format] Changing sample format from %s to %s\n", + mp_msg(MSGT_AFILTER, MSGL_V, "[format] Changing sample format from %s to %s\n", af_fmt2str(data->format,buf1,256), af_fmt2str(af->data->format,buf2,256)); @@ -119,13 +119,13 @@ static int control(struct af_instance_s* if ((af->data->format & ~AF_FORMAT_END_MASK) == (data->format & ~AF_FORMAT_END_MASK)) { - af_msg(AF_MSG_VERBOSE,"[format] Accelerated endianness conversion only\n"); + mp_msg(MSGT_AFILTER, MSGL_V, "[format] Accelerated endianness conversion only\n"); af->play = play_swapendian; } if ((data->format == AF_FORMAT_FLOAT_NE) && (af->data->format == AF_FORMAT_S16_NE)) { - af_msg(AF_MSG_VERBOSE,"[format] Accelerated %s to %s conversion\n", + mp_msg(MSGT_AFILTER, MSGL_V, "[format] Accelerated %s to %s conversion\n", af_fmt2str(data->format,buf1,256), af_fmt2str(af->data->format,buf2,256)); af->play = play_float_s16; @@ -133,7 +133,7 @@ static int control(struct af_instance_s* if ((data->format == AF_FORMAT_S16_NE) && (af->data->format == AF_FORMAT_FLOAT_NE)) { - af_msg(AF_MSG_VERBOSE,"[format] Accelerated %s to %s conversion\n", + mp_msg(MSGT_AFILTER, MSGL_V, "[format] Accelerated %s to %s conversion\n", af_fmt2str(data->format,buf1,256), af_fmt2str(af->data->format,buf2,256)); af->play = play_s16_float; @@ -143,7 +143,7 @@ static int control(struct af_instance_s* case AF_CONTROL_COMMAND_LINE:{ int format = af_str2fmt_short(arg); if (format == -1) { - af_msg(AF_MSG_ERROR, "[format] %s is not a valid format\n", (char *)arg); + mp_msg(MSGT_AFILTER, MSGL_ERR, "[format] %s is not a valid format\n", (char *)arg); return AF_ERROR; } if(AF_OK != af->control(af,AF_CONTROL_FORMAT_FMT | AF_CONTROL_SET,&format)) Modified: trunk/libaf/af_hrtf.c ============================================================================== --- trunk/libaf/af_hrtf.c Sat Mar 28 20:24:08 2009 (r29087) +++ trunk/libaf/af_hrtf.c Sat Mar 28 20:57:56 2009 (r29088) @@ -293,7 +293,7 @@ static int control(struct af_instance_s if(af->data->rate != 48000) { // automatic samplerate adjustment in the filter chain // is not yet supported. - af_msg(AF_MSG_ERROR, + mp_msg(MSGT_AFILTER, MSGL_ERR, "[hrtf] ERROR: Sampling rate is not 48000 Hz (%d)!\n", af->data->rate); return AF_ERROR; @@ -331,7 +331,7 @@ static int control(struct af_instance_s s->matrix_mode = 0; break; default: - af_msg(AF_MSG_ERROR, + mp_msg(MSGT_AFILTER, MSGL_ERR, "[hrtf] Mode is neither 'm', 's', nor '0' (%c).\n", mode); return AF_ERROR; @@ -409,29 +409,29 @@ static af_data_t* play(struct af_instanc s->print_flag = 0; switch (s->decode_mode) { case HRTF_MIX_51: - af_msg(AF_MSG_INFO, + mp_msg(MSGT_AFILTER, MSGL_INFO, "[hrtf] Using HRTF to mix %s discrete surround into " "L, R channels\n", s->matrix_mode ? "5+1" : "5"); break; case HRTF_MIX_STEREO: - af_msg(AF_MSG_INFO, + mp_msg(MSGT_AFILTER, MSGL_INFO, "[hrtf] Using HRTF to mix stereo into " "L, R channels\n"); break; case HRTF_MIX_MATRIX2CH: - af_msg(AF_MSG_INFO, + mp_msg(MSGT_AFILTER, MSGL_INFO, "[hrtf] Using active matrix to decode 2 channel " "input, HRTF to mix %s matrix surround into " "L, R channels\n", "3/2"); break; default: - af_msg(AF_MSG_WARN, + mp_msg(MSGT_AFILTER, MSGL_WARN, "[hrtf] bogus decode_mode: %d\n", s->decode_mode); break; } if(s->matrix_mode) - af_msg(AF_MSG_INFO, + mp_msg(MSGT_AFILTER, MSGL_INFO, "[hrtf] Using active matrix to decode rear center " "channel\n"); } @@ -636,7 +636,7 @@ static int af_open(af_instance_t* af) s->print_flag = 1; if (allocate(s) != 0) { - af_msg(AF_MSG_ERROR, "[hrtf] Memory allocation error.\n"); + mp_msg(MSGT_AFILTER, MSGL_ERR, "[hrtf] Memory allocation error.\n"); return AF_ERROR; } @@ -655,13 +655,13 @@ static int af_open(af_instance_t* af) s->cr_ir = cr_filt + (s->cr_o = pulse_detect(cr_filt)); if((s->ba_ir = malloc(s->basslen * sizeof(float))) == NULL) { - af_msg(AF_MSG_ERROR, "[hrtf] Memory allocation error.\n"); + mp_msg(MSGT_AFILTER, MSGL_ERR, "[hrtf] Memory allocation error.\n"); return AF_ERROR; } fc = 2.0 * BASSFILTFREQ / (float)af->data->rate; if(af_filter_design_fir(s->basslen, s->ba_ir, &fc, LP | KAISER, 4 * M_PI) == -1) { - af_msg(AF_MSG_ERROR, "[hrtf] Unable to design low-pass " + mp_msg(MSGT_AFILTER, MSGL_ERR, "[hrtf] Unable to design low-pass " "filter.\n"); return AF_ERROR; } Modified: trunk/libaf/af_ladspa.c ============================================================================== --- trunk/libaf/af_ladspa.c Sat Mar 28 20:24:08 2009 (r29087) +++ trunk/libaf/af_ladspa.c Sat Mar 28 20:57:56 2009 (r29088) @@ -212,30 +212,30 @@ static int af_ladspa_parse_plugin(af_lad } if (setup->ninputs == 0) { - af_msg(AF_MSG_WARN, "%s: %s\n", setup->myname, + mp_msg(MSGT_AFILTER, MSGL_WARN, "%s: %s\n", setup->myname, MSGTR_AF_LADSPA_WarnNoInputs); } else if (setup->ninputs == 1) { - af_msg(AF_MSG_VERBOSE, "%s: this is a mono effect\n", setup->myname); + mp_msg(MSGT_AFILTER, MSGL_V, "%s: this is a mono effect\n", setup->myname); } else if (setup->ninputs == 2) { - af_msg(AF_MSG_VERBOSE, "%s: this is a stereo effect\n", setup->myname); + mp_msg(MSGT_AFILTER, MSGL_V, "%s: this is a stereo effect\n", setup->myname); } else { - af_msg(AF_MSG_VERBOSE, "%s: this is a %i-channel effect, " + mp_msg(MSGT_AFILTER, MSGL_V, "%s: this is a %i-channel effect, " "support is experimental\n", setup->myname, setup->ninputs); } if (setup->noutputs == 0) { - af_msg(AF_MSG_ERROR, "%s: %s\n", setup->myname, + mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname, MSGTR_AF_LADSPA_ErrNoOutputs); return AF_ERROR; } if (setup->noutputs != setup->ninputs ) { - af_msg(AF_MSG_ERROR, "%s: %s\n", setup->myname, + mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname, MSGTR_AF_LADSPA_ErrInOutDiff); return AF_ERROR; } - af_msg(AF_MSG_VERBOSE, "%s: this plugin has %d input control(s)\n", + mp_msg(MSGT_AFILTER, MSGL_V, "%s: this plugin has %d input control(s)\n", setup->myname, setup->ninputcontrols); /* Print list of controls and its range of values it accepts */ @@ -243,18 +243,18 @@ static int af_ladspa_parse_plugin(af_lad for (i=0; ininputcontrols; i++) { p = setup->inputcontrolsmap[i]; hint = pdes->PortRangeHints[p]; - af_msg(AF_MSG_VERBOSE, " --- %d %s [", i, pdes->PortNames[p]); + mp_msg(MSGT_AFILTER, MSGL_V, " --- %d %s [", i, pdes->PortNames[p]); if (LADSPA_IS_HINT_BOUNDED_BELOW(hint.HintDescriptor)) { - af_msg(AF_MSG_VERBOSE, "%0.2f , ", hint.LowerBound); + mp_msg(MSGT_AFILTER, MSGL_V, "%0.2f , ", hint.LowerBound); } else { - af_msg(AF_MSG_VERBOSE, "... , "); + mp_msg(MSGT_AFILTER, MSGL_V, "... , "); } if (LADSPA_IS_HINT_BOUNDED_ABOVE(hint.HintDescriptor)) { - af_msg(AF_MSG_VERBOSE, "%0.2f]\n", hint.UpperBound); + mp_msg(MSGT_AFILTER, MSGL_V, "%0.2f]\n", hint.UpperBound); } else { - af_msg(AF_MSG_VERBOSE, "...]\n"); + mp_msg(MSGT_AFILTER, MSGL_V, "...]\n"); } } @@ -300,9 +300,9 @@ static void* mydlopen(const char *filena /* For Windows there's only absolute path support. * If you have a Windows machine, feel free to fix this. * (path separator, shared objects extension, et cetera). */ - af_msg(AF_MSG_VERBOSE, "\ton windows, only absolute pathnames " + mp_msg(MSGT_AFILTER, MSGL_V, "\ton windows, only absolute pathnames " "are supported\n"); - af_msg(AF_MSG_VERBOSE, "\ttrying %s\n", filename); + mp_msg(MSGT_AFILTER, MSGL_V, "\ttrying %s\n", filename); return dlopen(filename, flag); #endif @@ -343,7 +343,7 @@ static void* mydlopen(const char *filena } strcpy(buf+needslash+(end-start), filename); - af_msg(AF_MSG_VERBOSE, "\ttrying %s\n", buf); + mp_msg(MSGT_AFILTER, MSGL_V, "\ttrying %s\n", buf); result=dlopen(buf, flag); free(buf); @@ -357,7 +357,7 @@ static void* mydlopen(const char *filena } /* end if there's a ladspapath */ /* last resort, just open it again, so the dlerror() message is correct */ - af_msg(AF_MSG_VERBOSE, "\ttrying %s\n", filename); + mp_msg(MSGT_AFILTER, MSGL_V, "\ttrying %s\n", filename); return dlopen(filename,flag); } @@ -384,18 +384,18 @@ static int af_ladspa_load_plugin(af_lads int i; /* load library */ - af_msg(AF_MSG_VERBOSE, "%s: loading ladspa plugin library %s\n", + mp_msg(MSGT_AFILTER, MSGL_V, "%s: loading ladspa plugin library %s\n", setup->myname, setup->file); setup->libhandle = mydlopen(setup->file, RTLD_NOW); if (!setup->libhandle) { - af_msg(AF_MSG_ERROR, "%s: %s %s\n\t%s\n", setup->myname, + mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s %s\n\t%s\n", setup->myname, MSGTR_AF_LADSPA_ErrFailedToLoad, setup->file, dlerror() ); return AF_ERROR; } - af_msg(AF_MSG_VERBOSE, "%s: library found.\n", setup->myname); + mp_msg(MSGT_AFILTER, MSGL_V, "%s: library found.\n", setup->myname); /* find descriptor function */ dlerror(); @@ -403,7 +403,7 @@ static int af_ladspa_load_plugin(af_lads "ladspa_descriptor"); if (!descriptor_function) { - af_msg(AF_MSG_ERROR, "%s: %s\n\t%s\n", setup->myname, + mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n\t%s\n", setup->myname, MSGTR_AF_LADSPA_ErrNoDescriptor, dlerror()); return AF_ERROR; } @@ -411,33 +411,33 @@ static int af_ladspa_load_plugin(af_lads /* if label == help, list all labels in library and exit */ if (strcmp(setup->label, "help") == 0) { - af_msg(AF_MSG_INFO, "%s: %s %s:\n", setup->myname, + mp_msg(MSGT_AFILTER, MSGL_INFO, "%s: %s %s:\n", setup->myname, MSGTR_AF_LADSPA_AvailableLabels, setup->file); for (i=0; ; i++) { ladspa_descriptor = descriptor_function(i); if (ladspa_descriptor == NULL) { return AF_ERROR; } - af_msg(AF_MSG_INFO, " %-16s - %s (%lu)\n", + mp_msg(MSGT_AFILTER, MSGL_INFO, " %-16s - %s (%lu)\n", ladspa_descriptor->Label, ladspa_descriptor->Name, ladspa_descriptor->UniqueID); } } - af_msg(AF_MSG_VERBOSE, "%s: looking for label\n", setup->myname); + mp_msg(MSGT_AFILTER, MSGL_V, "%s: looking for label\n", setup->myname); /* find label in library */ for (i=0; ; i++) { ladspa_descriptor = descriptor_function(i); if (ladspa_descriptor == NULL) { - af_msg(AF_MSG_ERROR, "%s: %s\n", setup->myname, + mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname, MSGTR_AF_LADSPA_ErrLabelNotFound); return AF_ERROR; } if (strcmp(ladspa_descriptor->Label, setup->label) == 0) { setup->plugin_descriptor = ladspa_descriptor; - af_msg(AF_MSG_VERBOSE, "%s: %s found\n", setup->myname, + mp_msg(MSGT_AFILTER, MSGL_V, "%s: %s found\n", setup->myname, setup->label); return AF_OK; } @@ -458,7 +458,7 @@ static int af_ladspa_load_plugin(af_lads */ static int af_ladspa_malloc_failed(char *myname) { - af_msg(AF_MSG_ERROR, "%s: %s", myname, MSGTR_MemAllocFailed); + mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s", myname, MSGTR_MemAllocFailed); return AF_ERROR; } @@ -493,7 +493,7 @@ static int control(struct af_instance_s switch(cmd) { case AF_CONTROL_REINIT: - af_msg(AF_MSG_VERBOSE, "%s: (re)init\n", setup->myname); + mp_msg(MSGT_AFILTER, MSGL_V, "%s: (re)init\n", setup->myname); if (!arg) return AF_ERROR; @@ -512,14 +512,14 @@ static int control(struct af_instance_s case AF_CONTROL_COMMAND_LINE: { char *buf; - af_msg(AF_MSG_VERBOSE, "%s: parse suboptions\n", setup->myname); + mp_msg(MSGT_AFILTER, MSGL_V, "%s: parse suboptions\n", setup->myname); /* suboption parser here! * format is (ladspa=)file:label:controls.... */ if (!arg) { - af_msg(AF_MSG_ERROR, "%s: %s\n", setup->myname, + mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname, MSGTR_AF_LADSPA_ErrNoSuboptions); return AF_ERROR; } @@ -531,7 +531,7 @@ static int control(struct af_instance_s buf[0] = '\0'; sscanf(arg, "%[^:]", buf); if (buf[0] == '\0') { - af_msg(AF_MSG_ERROR, "%s: %s\n", setup->myname, + mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname, MSGTR_AF_LADSPA_ErrNoLibFile); free(buf); return AF_ERROR; @@ -539,7 +539,7 @@ static int control(struct af_instance_s arg += strlen(buf); setup->file = strdup(buf); if (!setup->file) return af_ladspa_malloc_failed(setup->myname); - af_msg(AF_MSG_VERBOSE, "%s: file --> %s\n", setup->myname, + mp_msg(MSGT_AFILTER, MSGL_V, "%s: file --> %s\n", setup->myname, setup->file); if (*(char*)arg != '\0') arg++; /* read ':' */ @@ -547,7 +547,7 @@ static int control(struct af_instance_s buf[0] = '\0'; sscanf(arg, "%[^:]", buf); if (buf[0] == '\0') { - af_msg(AF_MSG_ERROR, "%s: %s\n", setup->myname, + mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname, MSGTR_AF_LADSPA_ErrNoLabel); free(buf); return AF_ERROR; @@ -555,7 +555,7 @@ static int control(struct af_instance_s arg += strlen(buf); setup->label = strdup(buf); if (!setup->label) return af_ladspa_malloc_failed(setup->myname); - af_msg(AF_MSG_VERBOSE, "%s: label --> %s\n", setup->myname, + mp_msg(MSGT_AFILTER, MSGL_V, "%s: label --> %s\n", setup->myname, setup->label); /* if (*(char*)arg != '0') arg++; */ /* read ':' */ @@ -583,14 +583,14 @@ static int control(struct af_instance_s for(i=0; ininputcontrols; i++) { if (!arg || (*(char*)arg != ':') ) { - af_msg(AF_MSG_ERROR, "%s: %s\n", setup->myname, + mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname, MSGTR_AF_LADSPA_ErrNotEnoughControls); return AF_ERROR; } arg++; r = sscanf(arg, "%f", &val); if (r!=1) { - af_msg(AF_MSG_ERROR, "%s: %s\n", setup->myname, + mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname, MSGTR_AF_LADSPA_ErrNotEnoughControls); return AF_ERROR; } @@ -598,16 +598,16 @@ static int control(struct af_instance_s arg = strchr(arg, ':'); } - af_msg(AF_MSG_VERBOSE, "%s: input controls: ", setup->myname); + mp_msg(MSGT_AFILTER, MSGL_V, "%s: input controls: ", setup->myname); for(i=0; ininputcontrols; i++) { - af_msg(AF_MSG_VERBOSE, "%0.4f ", + mp_msg(MSGT_AFILTER, MSGL_V, "%0.4f ", setup->inputcontrols[setup->inputcontrolsmap[i]]); } - af_msg(AF_MSG_VERBOSE, "\n"); + mp_msg(MSGT_AFILTER, MSGL_V, "\n"); /* check boundaries of inputcontrols */ - af_msg(AF_MSG_VERBOSE, "%s: checking boundaries of input controls\n", + mp_msg(MSGT_AFILTER, MSGL_V, "%s: checking boundaries of input controls\n", setup->myname); for(i=0; ininputcontrols; i++) { int p = setup->inputcontrolsmap[i]; @@ -617,18 +617,18 @@ static int control(struct af_instance_s if (LADSPA_IS_HINT_BOUNDED_BELOW(hint.HintDescriptor) && val < hint.LowerBound) { - af_msg(AF_MSG_ERROR, MSGTR_AF_LADSPA_ErrControlBelow, + mp_msg(MSGT_AFILTER, MSGL_ERR, MSGTR_AF_LADSPA_ErrControlBelow, setup->myname, i, hint.LowerBound); return AF_ERROR; } if (LADSPA_IS_HINT_BOUNDED_ABOVE(hint.HintDescriptor) && val > hint.UpperBound) { - af_msg(AF_MSG_ERROR, MSGTR_AF_LADSPA_ErrControlAbove, + mp_msg(MSGT_AFILTER, MSGL_ERR, MSGTR_AF_LADSPA_ErrControlAbove, setup->myname, i, hint.UpperBound); return AF_ERROR; } } - af_msg(AF_MSG_VERBOSE, "%s: all controls have sane values\n", + mp_msg(MSGT_AFILTER, MSGL_V, "%s: all controls have sane values\n", setup->myname); /* All is well! */ @@ -660,7 +660,7 @@ static void uninit(struct af_instance_s const LADSPA_Descriptor *pdes = setup->plugin_descriptor; if (setup->myname) { - af_msg(AF_MSG_VERBOSE, "%s: cleaning up\n", setup->myname); + mp_msg(MSGT_AFILTER, MSGL_V, "%s: cleaning up\n", setup->myname); free(setup->myname); } @@ -750,7 +750,7 @@ static af_data_t* play(struct af_instanc */ if (setup->nch != 0) { - af_msg(AF_MSG_DEBUG1, "%s: bufsize change; free old buffer\n", + mp_msg(MSGT_AFILTER, MSGL_DBG3, "%s: bufsize change; free old buffer\n", setup->myname); if(setup->inbufs) { @@ -775,7 +775,7 @@ static af_data_t* play(struct af_instanc setup->inbufs = calloc(nch, sizeof(float*)); setup->outbufs = calloc(nch, sizeof(float*)); - af_msg(AF_MSG_DEBUG1, "%s: bufsize = %d\n", + mp_msg(MSGT_AFILTER, MSGL_DBG3, "%s: bufsize = %d\n", setup->myname, setup->bufsize); for(i=0; imul = (double)AC3_MAX_CODED_FRAME_SIZE / s->expect_len; - af_msg(AF_MSG_DEBUG0, "af_lavcac3enc reinit: %d, %d, %f, %d.\n", + mp_msg(MSGT_AFILTER, MSGL_DBG2, "af_lavcac3enc reinit: %d, %d, %f, %d.\n", data->nch, data->rate, af->mul, s->expect_len); af->data->format = AF_FORMAT_S16_NE; @@ -98,7 +98,7 @@ static int control(struct af_instance_s s->lavc_actx->bit_rate = bit_rate; if(avcodec_open(s->lavc_actx, s->lavc_acodec) < 0) { - af_msg(AF_MSG_ERROR, MSGTR_CouldntOpenCodec, "ac3", bit_rate); + mp_msg(MSGT_AFILTER, MSGL_ERR, MSGTR_CouldntOpenCodec, "ac3", bit_rate); return AF_ERROR; } } @@ -106,7 +106,7 @@ static int control(struct af_instance_s af->data->nch = 2; return test_output_res; case AF_CONTROL_COMMAND_LINE: - af_msg(AF_MSG_DEBUG0, "af_lavcac3enc cmdline: %s.\n", (char*)arg); + mp_msg(MSGT_AFILTER, MSGL_DBG2, "af_lavcac3enc cmdline: %s.\n", (char*)arg); s->bit_rate = 0; s->min_channel_num = 0; s->add_iec61937_header = 0; @@ -119,7 +119,7 @@ static int control(struct af_instance_s if (ff_ac3_bitrate_tab[i] * 1000 == s->bit_rate) break; if (i >= 19) { - af_msg(AF_MSG_WARN, "af_lavcac3enc unable set unsupported " + mp_msg(MSGT_AFILTER, MSGL_WARN, "af_lavcac3enc unable set unsupported " "bitrate %d, use default bitrate (check manpage to see " "supported bitrates).\n", s->bit_rate); s->bit_rate = 0; @@ -127,7 +127,7 @@ static int control(struct af_instance_s } if (s->min_channel_num == 0) s->min_channel_num = 5; - af_msg(AF_MSG_VERBOSE, "af_lavcac3enc config spdif:%d, bitrate:%d, " + mp_msg(MSGT_AFILTER, MSGL_V, "af_lavcac3enc config spdif:%d, bitrate:%d, " "minchnum:%d.\n", s->add_iec61937_header, s->bit_rate, s->min_channel_num); return AF_OK; @@ -171,13 +171,13 @@ static af_data_t* play(struct af_instanc max_output_len = AC3_MAX_CODED_FRAME_SIZE * frame_num; if (af->data->len < max_output_len) { - af_msg(AF_MSG_VERBOSE,"[libaf] Reallocating memory in module %s, " + mp_msg(MSGT_AFILTER, MSGL_V, "[libaf] Reallocating memory in module %s, " "old len = %i, new len = %i\n", af->info->name, af->data->len, max_output_len); free(af->data->audio); af->data->audio = malloc(max_output_len); if (!af->data->audio) { - af_msg(AF_MSG_FATAL,"[libaf] Could not allocate memory \n"); + mp_msg(MSGT_AFILTER, MSGL_FATAL, "[libaf] Could not allocate memory \n"); return NULL; } af->data->len = max_output_len; @@ -231,7 +231,7 @@ static af_data_t* play(struct af_instanc src += s->expect_len; left -= s->expect_len; } - af_msg(AF_MSG_DEBUG0, "avcodec_encode_audio got %d, pending %d.\n", + mp_msg(MSGT_AFILTER, MSGL_DBG2, "avcodec_encode_audio got %d, pending %d.\n", len, s->pending_len); if (s->add_iec61937_header) { @@ -269,7 +269,7 @@ static af_data_t* play(struct af_instanc c->nch = 2; c->bps = 2; c->len = outsize; - af_msg(AF_MSG_DEBUG0, "play return size %d, pending %d\n", + mp_msg(MSGT_AFILTER, MSGL_DBG2, "play return size %d, pending %d\n", outsize, s->pending_len); return c; } @@ -295,13 +295,13 @@ static int af_open(af_instance_t* af){ s->lavc_acodec = avcodec_find_encoder_by_name("ac3"); if (!s->lavc_acodec) { - af_msg(AF_MSG_ERROR, MSGTR_LavcAudioCodecNotFound, "ac3"); + mp_msg(MSGT_AFILTER, MSGL_ERR, MSGTR_LavcAudioCodecNotFound, "ac3"); return AF_ERROR; } s->lavc_actx = avcodec_alloc_context(); if (!s->lavc_actx) { - af_msg(AF_MSG_ERROR, MSGTR_CouldntAllocateLavcContext); + mp_msg(MSGT_AFILTER, MSGL_ERR, MSGTR_CouldntAllocateLavcContext); return AF_ERROR; } Modified: trunk/libaf/af_mp.h ============================================================================== --- trunk/libaf/af_mp.h Sat Mar 28 20:24:08 2009 (r29087) +++ trunk/libaf/af_mp.h Sat Mar 28 20:57:56 2009 (r29088) @@ -21,7 +21,6 @@ #define MPLAYER_AF_MP_H #include "config.h" -#include "mp_msg.h" #include "cpudetect.h" /* Set the initialization type from mplayers cpudetect */ @@ -31,10 +30,4 @@ ((gCpuCaps.has3DNow || gCpuCaps.hasSSE)?AF_INIT_FAST:AF_INIT_SLOW) #endif -#ifdef af_msg -#undef af_msg -#endif -#define af_msg(lev, args... ) \ - mp_msg(MSGT_AFILTER,(((lev)<0)?((lev)+3):(((lev)==0)?MSGL_INFO:((lev)+5))), ##args ) - #endif /* MPLAYER_AF_MP_H */ Modified: trunk/libaf/af_pan.c ============================================================================== --- trunk/libaf/af_pan.c Sat Mar 28 20:24:08 2009 (r29087) +++ trunk/libaf/af_pan.c Sat Mar 28 20:57:56 2009 (r29088) @@ -72,7 +72,7 @@ static int control(struct af_instance_s* j = 0; k = 0; while((*cp == ':') && (k < AF_NCH)){ sscanf(cp, ":%f%n" , &s->level[j][k], &n); - af_msg(AF_MSG_VERBOSE,"[pan] Pan level from channel %i to" + mp_msg(MSGT_AFILTER, MSGL_V, "[pan] Pan level from channel %i to" " channel %i = %f\n",k,j,s->level[j][k]); cp =&cp[n]; j++; @@ -108,7 +108,7 @@ static int control(struct af_instance_s* // Sanity check if(((int*)arg)[0] <= 0 || ((int*)arg)[0] > AF_NCH){ - af_msg(AF_MSG_ERROR,"[pan] The number of output channels must be" + mp_msg(MSGT_AFILTER, MSGL_ERR, "[pan] The number of output channels must be" " between 1 and %i. Current value is %i\n",AF_NCH,((int*)arg)[0]); return AF_ERROR; } Modified: trunk/libaf/af_resample.c ============================================================================== --- trunk/libaf/af_resample.c Sat Mar 28 20:24:08 2009 (r29087) +++ trunk/libaf/af_resample.c Sat Mar 28 20:57:56 2009 (r29088) @@ -139,7 +139,7 @@ static int set_types(struct af_instance_ s->setup = (s->setup & ~RSMP_MASK) | RSMP_LIN; af->data->format = AF_FORMAT_S16_NE; af->data->bps = 2; - af_msg(AF_MSG_VERBOSE,"[resample] Using linear interpolation. \n"); + mp_msg(MSGT_AFILTER, MSGL_V, "[resample] Using linear interpolation. \n"); } else{ /* If the input format is float or if float is explicitly selected @@ -155,7 +155,7 @@ static int set_types(struct af_instance_ af->data->format = AF_FORMAT_S16_NE; af->data->bps = 2; } - af_msg(AF_MSG_VERBOSE,"[resample] Using %s processing and %s frequecy" + mp_msg(MSGT_AFILTER, MSGL_V, "[resample] Using %s processing and %s frequecy" " conversion.\n", ((s->setup & RSMP_MASK) == RSMP_FLOAT)?"floating point":"integer", ((s->setup & FREQ_MASK) == FREQ_SLOPPY)?"inexact":"exact"); @@ -193,7 +193,7 @@ static int control(struct af_instance_s* if((s->setup & RSMP_MASK) == RSMP_LIN){ s->pt=0LL; s->step=((uint64_t)n->rate<data->rate+1LL; - af_msg(AF_MSG_DEBUG0,"[resample] Linear interpolation step: 0x%016"PRIX64".\n", + mp_msg(MSGT_AFILTER, MSGL_DBG2, "[resample] Linear interpolation step: 0x%016"PRIX64".\n", s->step); af->mul = (double)af->data->rate / n->rate; return rv; @@ -243,7 +243,7 @@ static int control(struct af_instance_s* // Design prototype filter type using Kaiser window with beta = 10 if(NULL == w || NULL == s->w || -1 == af_filter_design_fir(s->up*L, w, &fc, LP|KAISER , 10.0)){ - af_msg(AF_MSG_ERROR,"[resample] Unable to design prototype filter.\n"); + mp_msg(MSGT_AFILTER, MSGL_ERR, "[resample] Unable to design prototype filter.\n"); return AF_ERROR; } // Copy data from prototype to polyphase filter @@ -260,7 +260,7 @@ static int control(struct af_instance_s* } } free(w); - af_msg(AF_MSG_VERBOSE,"[resample] New filter designed up: %i " + mp_msg(MSGT_AFILTER, MSGL_V, "[resample] New filter designed up: %i " "down: %i\n", s->up, s->dn); } @@ -288,14 +288,14 @@ static int control(struct af_instance_s* // Sanity check if(((int*)arg)[0] < 8000 || ((int*)arg)[0] > 192000){ - af_msg(AF_MSG_ERROR,"[resample] The output sample frequency " + mp_msg(MSGT_AFILTER, MSGL_ERR, "[resample] The output sample frequency " "must be between 8kHz and 192kHz. Current value is %i \n", ((int*)arg)[0]); return AF_ERROR; } af->data->rate=((int*)arg)[0]; - af_msg(AF_MSG_VERBOSE,"[resample] Changing sample rate " + mp_msg(MSGT_AFILTER, MSGL_V, "[resample] Changing sample rate " "to %iHz\n",af->data->rate); return AF_OK; } Modified: trunk/libaf/af_scaletempo.c ============================================================================== --- trunk/libaf/af_scaletempo.c Sat Mar 28 20:24:08 2009 (r29087) +++ trunk/libaf/af_scaletempo.c Sat Mar 28 20:57:56 2009 (r29088) @@ -232,11 +232,11 @@ static af_data_t* play(struct af_instanc // RESIZE_LOCAL_BUFFER - can't use macro max_bytes_out = ((int)(data->len / s->bytes_stride_scaled) + 1) * s->bytes_stride; if (max_bytes_out > af->data->len) { - af_msg(AF_MSG_VERBOSE, "[libaf] Reallocating memory in module %s, " + mp_msg(MSGT_AFILTER, MSGL_V, "[libaf] Reallocating memory in module %s, " "old len = %i, new len = %i\n",af->info->name,af->data->len,max_bytes_out); af->data->audio = realloc(af->data->audio, max_bytes_out); if (!af->data->audio) { - af_msg(AF_MSG_FATAL, "[libaf] Could not allocate memory\n"); + mp_msg(MSGT_AFILTER, MSGL_FATAL, "[libaf] Could not allocate memory\n"); return NULL; } af->data->len = max_bytes_out; @@ -296,7 +296,7 @@ static int control(struct af_instance_s* int frames_stride, frames_overlap; int i, j; - af_msg(AF_MSG_VERBOSE, + mp_msg(MSGT_AFILTER, MSGL_V, "[scaletempo] %.3f speed * %.3f scale_nominal = %.3f\n", s->speed, s->scale_nominal, s->scale); @@ -339,7 +339,7 @@ static int control(struct af_instance_s* s->buf_overlap = realloc(s->buf_overlap, s->bytes_overlap); s->table_blend = realloc(s->table_blend, s->bytes_overlap * 4); if(!s->buf_overlap || !s->table_blend) { - af_msg(AF_MSG_FATAL, "[scaletempo] Out of memory\n"); + mp_msg(MSGT_AFILTER, MSGL_FATAL, "[scaletempo] Out of memory\n"); return AF_ERROR; } memset(s->buf_overlap, 0, s->bytes_overlap); @@ -377,7 +377,7 @@ static int control(struct af_instance_s* s->buf_pre_corr = realloc(s->buf_pre_corr, s->bytes_overlap * 2 + UNROLL_PADDING); s->table_window = realloc(s->table_window, s->bytes_overlap * 2 - nch * bps * 2); if(!s->buf_pre_corr || !s->table_window) { - af_msg(AF_MSG_FATAL, "[scaletempo] Out of memory\n"); + mp_msg(MSGT_AFILTER, MSGL_FATAL, "[scaletempo] Out of memory\n"); return AF_ERROR; } memset((char *)s->buf_pre_corr + s->bytes_overlap * 2, 0, UNROLL_PADDING); @@ -394,7 +394,7 @@ static int control(struct af_instance_s* s->buf_pre_corr = realloc(s->buf_pre_corr, s->bytes_overlap); s->table_window = realloc(s->table_window, s->bytes_overlap - nch * bps); if(!s->buf_pre_corr || !s->table_window) { - af_msg(AF_MSG_FATAL, "[scaletempo] Out of memory\n"); + mp_msg(MSGT_AFILTER, MSGL_FATAL, "[scaletempo] Out of memory\n"); return AF_ERROR; } pw = s->table_window; @@ -415,11 +415,11 @@ static int control(struct af_instance_s* = (s->frames_search + frames_stride + frames_overlap) * bps * nch; s->buf_queue = realloc(s->buf_queue, s->bytes_queue + UNROLL_PADDING); if(!s->buf_queue) { - af_msg(AF_MSG_FATAL, "[scaletempo] Out of memory\n"); + mp_msg(MSGT_AFILTER, MSGL_FATAL, "[scaletempo] Out of memory\n"); return AF_ERROR; } - af_msg (AF_MSG_DEBUG0, "[scaletempo] " + mp_msg (MSGT_AFILTER, MSGL_DBG2, "[scaletempo] " "%.2f stride_in, %i stride_out, %i standing, " "%i overlap, %i search, %i queue, %s mode\n", s->frames_stride_scaled, @@ -470,25 +470,25 @@ static int control(struct af_instance_s* return AF_ERROR; } if (s->scale_nominal <= 0) { - af_msg(AF_MSG_ERROR, "[scaletempo] " + mp_msg(MSGT_AFILTER, MSGL_ERR, "[scaletempo] " MSGTR_ErrorParsingCommandLine ": " MSGTR_AF_ValueOutOfRange ": scale > 0\n"); return AF_ERROR; } if (s->ms_stride <= 0) { - af_msg(AF_MSG_ERROR, "[scaletempo] " + mp_msg(MSGT_AFILTER, MSGL_ERR, "[scaletempo] " MSGTR_ErrorParsingCommandLine ": " MSGTR_AF_ValueOutOfRange ": stride > 0\n"); return AF_ERROR; } if (s->percent_overlap < 0 || s->percent_overlap > 1) { - af_msg(AF_MSG_ERROR, "[scaletempo] " + mp_msg(MSGT_AFILTER, MSGL_ERR, "[scaletempo] " MSGTR_ErrorParsingCommandLine ": " MSGTR_AF_ValueOutOfRange ": 0 <= overlap <= 1\n"); return AF_ERROR; } if (s->ms_search < 0) { - af_msg(AF_MSG_ERROR, "[scaletempo] " + mp_msg(MSGT_AFILTER, MSGL_ERR, "[scaletempo] " MSGTR_ErrorParsingCommandLine ": " MSGTR_AF_ValueOutOfRange ": search >= 0\n"); return AF_ERROR; @@ -507,14 +507,14 @@ static int control(struct af_instance_s* s->speed_tempo = 1; s->speed_pitch = 1; } else { - af_msg(AF_MSG_ERROR, "[scaletempo] " + mp_msg(MSGT_AFILTER, MSGL_ERR, "[scaletempo] " MSGTR_ErrorParsingCommandLine ": " MSGTR_AF_ValueOutOfRange ": speed=[pitch|tempo|none|both]\n"); return AF_ERROR; } } s->scale = s->speed * s->scale_nominal; - af_msg(AF_MSG_DEBUG0, "[scaletempo] %6.3f scale, %6.2f stride, %6.2f overlap, %6.2f search, speed = %s\n", s->scale_nominal, s->ms_stride, s->percent_overlap, s->ms_search, (s->speed_tempo?(s->speed_pitch?"tempo and speed":"tempo"):(s->speed_pitch?"pitch":"none"))); + mp_msg(MSGT_AFILTER, MSGL_DBG2, "[scaletempo] %6.3f scale, %6.2f stride, %6.2f overlap, %6.2f search, speed = %s\n", s->scale_nominal, s->ms_stride, s->percent_overlap, s->ms_search, (s->speed_tempo?(s->speed_pitch?"tempo and speed":"tempo"):(s->speed_pitch?"pitch":"none"))); return AF_OK; } } Modified: trunk/libaf/af_sinesuppress.c ============================================================================== --- trunk/libaf/af_sinesuppress.c Sat Mar 28 20:24:08 2009 (r29087) +++ trunk/libaf/af_sinesuppress.c Sat Mar 28 20:57:56 2009 (r29088) @@ -130,7 +130,7 @@ static af_data_t* play_s16(struct af_ins s->pos += 2 * M_PI * s->freq / data->rate; } - af_msg(AF_MSG_VERBOSE,"[sinesuppress] f:%8.2f: amp:%8.2f\n", s->freq, sqrt(s->real*s->real + s->imag*s->imag) / s->ref); + mp_msg(MSGT_AFILTER, MSGL_V, "[sinesuppress] f:%8.2f: amp:%8.2f\n", s->freq, sqrt(s->real*s->real + s->imag*s->imag) / s->ref); return data; } Modified: trunk/libaf/af_sub.c ============================================================================== --- trunk/libaf/af_sub.c Sat Mar 28 20:24:08 2009 (r29087) +++ trunk/libaf/af_sub.c Sat Mar 28 20:57:56 2009 (r29088) @@ -94,7 +94,7 @@ static int control(struct af_instance_s* case AF_CONTROL_SUB_CH | AF_CONTROL_SET: // Requires reinit // Sanity check if((*(int*)arg >= AF_NCH) || (*(int*)arg < 0)){ - af_msg(AF_MSG_ERROR,"[sub] Subwoofer channel number must be between " + mp_msg(MSGT_AFILTER, MSGL_ERR, "[sub] Subwoofer channel number must be between " " 0 and %i current value is %i\n", AF_NCH-1, *(int*)arg); return AF_ERROR; } @@ -106,7 +106,7 @@ static int control(struct af_instance_s* case AF_CONTROL_SUB_FC | AF_CONTROL_SET: // Requires reinit // Sanity check if((*(float*)arg > 300) || (*(float*)arg < 20)){ - af_msg(AF_MSG_ERROR,"[sub] Cutoff frequency must be between 20Hz and" + mp_msg(MSGT_AFILTER, MSGL_ERR, "[sub] Cutoff frequency must be between 20Hz and" " 300Hz current value is %0.2f",*(float*)arg); return AF_ERROR; } Modified: trunk/libaf/af_surround.c ============================================================================== --- trunk/libaf/af_surround.c Sat Mar 28 20:24:08 2009 (r29087) +++ trunk/libaf/af_surround.c Sat Mar 28 20:57:56 2009 (r29088) @@ -98,13 +98,13 @@ static int control(struct af_instance_s* af->data->bps = 4; if (af->data->nch != 4){ - af_msg(AF_MSG_ERROR,"[surround] Only stereo input is supported.\n"); + mp_msg(MSGT_AFILTER, MSGL_ERR, "[surround] Only stereo input is supported.\n"); return AF_DETACH; } // Surround filer coefficients fc = 2.0 * 7000.0/(float)af->data->rate; if (-1 == af_filter_design_fir(L, s->w, &fc, LP|HAMMING, 0)){ - af_msg(AF_MSG_ERROR,"[surround] Unable to design low-pass filter.\n"); + mp_msg(MSGT_AFILTER, MSGL_ERR, "[surround] Unable to design low-pass filter.\n"); return AF_ERROR; } @@ -117,7 +117,7 @@ static int control(struct af_instance_s* s->dl = calloc(LD,af->data->bps); s->dr = calloc(LD,af->data->bps); if((NULL == s->dl) || (NULL == s->dr)) - af_msg(AF_MSG_FATAL,"[delay] Out of memory\n"); + mp_msg(MSGT_AFILTER, MSGL_FATAL, "[delay] Out of memory\n"); // Initialize delay queue index if(AF_OK != af_from_ms(1, &s->d, &s->wi, af->data->rate, 0.0, 1000.0)) @@ -137,7 +137,7 @@ static int control(struct af_instance_s* float d = 0; sscanf((char*)arg,"%f",&d); if ((d < 0) || (d > 1000)){ - af_msg(AF_MSG_ERROR,"[surround] Invalid delay time, valid time values" + mp_msg(MSGT_AFILTER, MSGL_ERR, "[surround] Invalid delay time, valid time values" " are 0ms to 1000ms current value is %0.3f ms\n",d); return AF_ERROR; } Modified: trunk/libaf/af_volume.c ============================================================================== --- trunk/libaf/af_volume.c Sat Mar 28 20:24:08 2009 (r29087) +++ trunk/libaf/af_volume.c Sat Mar 28 20:57:56 2009 (r29088) @@ -78,7 +78,7 @@ static int control(struct af_instance_s* float x = 2.0*M_PI*15.0/(float)af->data->rate; float t = 2.0-cos(x); s->time = 1.0 - (t - sqrt(t*t - 1)); - af_msg(AF_MSG_DEBUG0,"[volume] Forgetting factor = %0.5f\n",s->time); + mp_msg(MSGT_AFILTER, MSGL_DBG2, "[volume] Forgetting factor = %0.5f\n",s->time); af->data->format = AF_FORMAT_FLOAT_NE; af->data->bps = 4; } @@ -122,7 +122,7 @@ static int control(struct af_instance_s* for(i=0;imax[i]); af_to_dB(1, &m, &m, 10.0); - af_msg(AF_MSG_INFO,"[volume] The maximum volume was %0.2fdB \n", m); + mp_msg(MSGT_AFILTER, MSGL_INFO, "[volume] The maximum volume was %0.2fdB \n", m); } return AF_OK; } From subversion at mplayerhq.hu Sat Mar 28 21:01:43 2009 From: subversion at mplayerhq.hu (bircoph) Date: Sat, 28 Mar 2009 21:01:43 +0100 (CET) Subject: [MPlayer-cvslog] r29089 - in trunk/libaf: af.h af_mp.h Message-ID: <20090328200143.744753B6AB@natsuki.mplayerhq.hu> Author: bircoph Date: Sat Mar 28 21:01:43 2009 New Revision: 29089 Log: Remove af_mp.h and add its content to af.h Deleted: trunk/libaf/af_mp.h Modified: trunk/libaf/af.h Modified: trunk/libaf/af.h ============================================================================== --- trunk/libaf/af.h Sat Mar 28 20:57:56 2009 (r29088) +++ trunk/libaf/af.h Sat Mar 28 21:01:43 2009 (r29089) @@ -22,10 +22,17 @@ #include #include "config.h" -#include "af_mp.h" #include "control.h" #include "af_format.h" #include "mp_msg.h" +#include "cpudetect.h" + +/* Set the initialization type from mplayers cpudetect */ +#ifdef AF_INIT_TYPE +#undef AF_INIT_TYPE +#define AF_INIT_TYPE \ + ((gCpuCaps.has3DNow || gCpuCaps.hasSSE)?AF_INIT_FAST:AF_INIT_SLOW) +#endif struct af_instance_s; From subversion at mplayerhq.hu Sat Mar 28 21:03:08 2009 From: subversion at mplayerhq.hu (bircoph) Date: Sat, 28 Mar 2009 21:03:08 +0100 (CET) Subject: [MPlayer-cvslog] r29090 - trunk/libaf/af.h Message-ID: <20090328200308.B54A03B6BB@natsuki.mplayerhq.hu> Author: bircoph Date: Sat Mar 28 21:03:08 2009 New Revision: 29090 Log: Reorder includes alphabetically. Modified: trunk/libaf/af.h Modified: trunk/libaf/af.h ============================================================================== --- trunk/libaf/af.h Sat Mar 28 21:01:43 2009 (r29089) +++ trunk/libaf/af.h Sat Mar 28 21:03:08 2009 (r29090) @@ -21,11 +21,11 @@ #include +#include "af_format.h" #include "config.h" #include "control.h" -#include "af_format.h" -#include "mp_msg.h" #include "cpudetect.h" +#include "mp_msg.h" /* Set the initialization type from mplayers cpudetect */ #ifdef AF_INIT_TYPE From Reimar.Doeffinger at gmx.de Sat Mar 28 21:08:18 2009 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Sat, 28 Mar 2009 21:08:18 +0100 Subject: [MPlayer-cvslog] r29090 - trunk/libaf/af.h In-Reply-To: <20090328200308.B54A03B6BB@natsuki.mplayerhq.hu> References: <20090328200308.B54A03B6BB@natsuki.mplayerhq.hu> Message-ID: <20090328200818.GA4115@1und1.de> On Sat, Mar 28, 2009 at 09:03:08PM +0100, bircoph wrote: > Author: bircoph > Date: Sat Mar 28 21:03:08 2009 > New Revision: 29090 > > Log: > Reorder includes alphabetically. > > Modified: > trunk/libaf/af.h > > Modified: trunk/libaf/af.h > ============================================================================== > --- trunk/libaf/af.h Sat Mar 28 21:01:43 2009 (r29089) > +++ trunk/libaf/af.h Sat Mar 28 21:03:08 2009 (r29090) > @@ -21,11 +21,11 @@ > > #include > > +#include "af_format.h" > #include "config.h" > #include "control.h" > -#include "af_format.h" > -#include "mp_msg.h" > #include "cpudetect.h" > +#include "mp_msg.h" Please be extremely careful with such cosmetic changes. Especially the config.h include IMO should always be first, on principle. From subversion at mplayerhq.hu Sat Mar 28 21:21:20 2009 From: subversion at mplayerhq.hu (bircoph) Date: Sat, 28 Mar 2009 21:21:20 +0100 (CET) Subject: [MPlayer-cvslog] r29091 - trunk/libaf/af.h Message-ID: <20090328202120.6DF2250066@natsuki.mplayerhq.hu> Author: bircoph Date: Sat Mar 28 21:21:20 2009 New Revision: 29091 Log: Move config.h include directive up as a precaution measure. Modified: trunk/libaf/af.h Modified: trunk/libaf/af.h ============================================================================== --- trunk/libaf/af.h Sat Mar 28 21:03:08 2009 (r29090) +++ trunk/libaf/af.h Sat Mar 28 21:21:20 2009 (r29091) @@ -21,8 +21,9 @@ #include -#include "af_format.h" #include "config.h" + +#include "af_format.h" #include "control.h" #include "cpudetect.h" #include "mp_msg.h" From bircoph at gmail.com Sat Mar 28 21:23:08 2009 From: bircoph at gmail.com (Andrew Savchenko) Date: Sat, 28 Mar 2009 23:23:08 +0300 Subject: [MPlayer-cvslog] r29090 - trunk/libaf/af.h In-Reply-To: <20090328200818.GA4115@1und1.de> References: <20090328200308.B54A03B6BB@natsuki.mplayerhq.hu> <20090328200818.GA4115@1und1.de> Message-ID: <200903282323.22133.bircoph@gmail.com> Hi, On Saturday 28 March 2009 23:08, Reimar D?ffinger wrote: > On Sat, Mar 28, 2009 at 09:03:08PM +0100, bircoph wrote: > > Author: bircoph > > Date: Sat Mar 28 21:03:08 2009 > > New Revision: 29090 > > > > Log: > > Reorder includes alphabetically. > > > > Modified: > > trunk/libaf/af.h > > > > Modified: trunk/libaf/af.h > > ============================================================== > >================ --- trunk/libaf/af.h Sat Mar 28 21:01:43 > > 2009 (r29089) +++ trunk/libaf/af.h Sat Mar 28 21:03:08 > > 2009 (r29090) @@ -21,11 +21,11 @@ > > > > #include > > > > +#include "af_format.h" > > #include "config.h" > > #include "control.h" > > -#include "af_format.h" > > -#include "mp_msg.h" > > #include "cpudetect.h" > > +#include "mp_msg.h" > > Please be extremely careful with such cosmetic changes. > Especially the config.h include IMO should always be first, on > principle. I tested patch for compilation and playback before applying. However, I moved config.h up as a precausion measure. -- Best regards, Andrew -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From subversion at mplayerhq.hu Sun Mar 29 13:15:23 2009 From: subversion at mplayerhq.hu (cehoyos) Date: Sun, 29 Mar 2009 13:15:23 +0200 (CEST) Subject: [MPlayer-cvslog] r29093 - trunk/libvo/vo_vdpau.c Message-ID: <20090329111523.B12353B46C@natsuki.mplayerhq.hu> Author: cehoyos Date: Sun Mar 29 13:15:22 2009 New Revision: 29093 Log: 10l: Don't use MP_IMGFIELD_TOP_FIRST if MP_IMGFIELD_ORDERED is not set. Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Sat Mar 28 23:54:01 2009 (r29092) +++ trunk/libvo/vo_vdpau.c Sun Mar 29 13:15:22 2009 (r29093) @@ -892,7 +892,10 @@ static uint32_t draw_image(mp_image_t *m mpi->stride); // pitch CHECK_ST_ERROR("Error when calling vdp_video_surface_put_bits_y_cb_cr") } + if (mpi->fields & MP_IMGFIELD_ORDERED) top_field_first = !!(mpi->fields & MP_IMGFIELD_TOP_FIRST); + else + top_field_first = 1; video_to_output_surface(); return VO_TRUE; From subversion at mplayerhq.hu Sun Mar 29 13:16:14 2009 From: subversion at mplayerhq.hu (cehoyos) Date: Sun, 29 Mar 2009 13:16:14 +0200 (CEST) Subject: [MPlayer-cvslog] r29094 - trunk/libvo/vo_vdpau.c Message-ID: <20090329111614.D79BB3B4AB@natsuki.mplayerhq.hu> Author: cehoyos Date: Sun Mar 29 13:16:14 2009 New Revision: 29094 Log: Cosmetics: Reindent after last commit. Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Sun Mar 29 13:15:22 2009 (r29093) +++ trunk/libvo/vo_vdpau.c Sun Mar 29 13:16:14 2009 (r29094) @@ -893,7 +893,7 @@ static uint32_t draw_image(mp_image_t *m CHECK_ST_ERROR("Error when calling vdp_video_surface_put_bits_y_cb_cr") } if (mpi->fields & MP_IMGFIELD_ORDERED) - top_field_first = !!(mpi->fields & MP_IMGFIELD_TOP_FIRST); + top_field_first = !!(mpi->fields & MP_IMGFIELD_TOP_FIRST); else top_field_first = 1; From subversion at mplayerhq.hu Sun Mar 29 13:21:18 2009 From: subversion at mplayerhq.hu (reimar) Date: Sun, 29 Mar 2009 13:21:18 +0200 (CEST) Subject: [MPlayer-cvslog] r29095 - trunk/libmpdemux/demuxer.c Message-ID: <20090329112118.7B9ED4E002@natsuki.mplayerhq.hu> Author: reimar Date: Sun Mar 29 13:21:18 2009 New Revision: 29095 Log: Update demuxer->sub->id and demuxer->sub->sh if a new subtitle stream is created that matches the user-requested one. Fixes -slang and -sid with DVDs (anything that uses demux_mpg actually). Modified: trunk/libmpdemux/demuxer.c Modified: trunk/libmpdemux/demuxer.c ============================================================================== --- trunk/libmpdemux/demuxer.c Sun Mar 29 13:16:14 2009 (r29094) +++ trunk/libmpdemux/demuxer.c Sun Mar 29 13:21:18 2009 (r29095) @@ -259,6 +259,10 @@ sh_sub_t *new_sh_sub_sid(demuxer_t *demu sh->sid = sid; mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SUBTITLE_ID=%d\n", sid); } + if (sid == dvdsub_id) { + demuxer->sub->id = id; + demuxer->sub->sh = demuxer->s_streams[id]; + } return demuxer->s_streams[id]; } From subversion at mplayerhq.hu Sun Mar 29 16:15:09 2009 From: subversion at mplayerhq.hu (reimar) Date: Sun, 29 Mar 2009 16:15:09 +0200 (CEST) Subject: [MPlayer-cvslog] r29098 - in trunk/libmpcodecs: vd_ffmpeg.c vd_libmpeg2.c Message-ID: <20090329141509.C543D3B5CA@natsuki.mplayerhq.hu> Author: reimar Date: Sun Mar 29 16:15:09 2009 New Revision: 29098 Log: Use MP_MAX_PLANES as size of arrays passed to mpcodecs_draw_slice. Modified: trunk/libmpcodecs/vd_ffmpeg.c trunk/libmpcodecs/vd_libmpeg2.c Modified: trunk/libmpcodecs/vd_ffmpeg.c ============================================================================== --- trunk/libmpcodecs/vd_ffmpeg.c Sun Mar 29 15:47:30 2009 (r29097) +++ trunk/libmpcodecs/vd_ffmpeg.c Sun Mar 29 16:15:09 2009 (r29098) @@ -451,7 +451,7 @@ static void draw_slice(struct AVCodecCon AVFrame *src, int offset[4], int y, int type, int height){ sh_video_t *sh = s->opaque; - uint8_t *source[3]= {src->data[0] + offset[0], src->data[1] + offset[1], src->data[2] + offset[2]}; + uint8_t *source[MP_MAX_PLANES]= {src->data[0] + offset[0], src->data[1] + offset[1], src->data[2] + offset[2]}; #if 0 int start=0, i; int width= s->width; Modified: trunk/libmpcodecs/vd_libmpeg2.c ============================================================================== --- trunk/libmpcodecs/vd_libmpeg2.c Sun Mar 29 15:47:30 2009 (r29097) +++ trunk/libmpcodecs/vd_libmpeg2.c Sun Mar 29 16:15:09 2009 (r29098) @@ -125,14 +125,12 @@ static void draw_slice (void * _sh, uint vd_libmpeg2_ctx_t *context = sh->context; mpeg2dec_t* mpeg2dec = context->mpeg2dec; const mpeg2_info_t * info = mpeg2_info (mpeg2dec); - int stride[3]; + int stride[MP_MAX_PLANES] = {mpeg2dec->decoder.stride, mpeg2dec->decoder.uv_stride, mpeg2dec->decoder.uv_stride}; + uint8_t *srcs[MP_MAX_PLANES] = {src[0], src[1], src[2]}; // printf("draw_slice() y=%d \n",y); - stride[0]=mpeg2dec->decoder.stride; - stride[1]=stride[2]=mpeg2dec->decoder.uv_stride; - - mpcodecs_draw_slice(sh, (uint8_t **)src, + mpcodecs_draw_slice(sh, srcs, stride, info->sequence->picture_width, (y+16<=info->sequence->picture_height) ? 16 : info->sequence->picture_height-y, From subversion at mplayerhq.hu Sun Mar 29 16:37:21 2009 From: subversion at mplayerhq.hu (reimar) Date: Sun, 29 Mar 2009 16:37:21 +0200 (CEST) Subject: [MPlayer-cvslog] r29101 - in trunk/libvo: vo_aa.c vo_kva.c vo_vesa.c vo_x11.c Message-ID: <20090329143721.674313B681@natsuki.mplayerhq.hu> Author: reimar Date: Sun Mar 29 16:37:21 2009 New Revision: 29101 Log: Consistently use MP_MAX_PLANES as size for plane pointer/stride arrays. This might avoid some issues since sws_scale in some cases assumes these have at least 4 valid entries. Modified: trunk/libvo/vo_aa.c trunk/libvo/vo_kva.c trunk/libvo/vo_vesa.c trunk/libvo/vo_x11.c Modified: trunk/libvo/vo_aa.c ============================================================================== --- trunk/libvo/vo_aa.c Sun Mar 29 16:35:38 2009 (r29100) +++ trunk/libvo/vo_aa.c Sun Mar 29 16:37:21 2009 (r29101) @@ -68,8 +68,8 @@ aa_context *c; aa_renderparams *p; static int fast =0; /* used for the sws */ -static uint8_t * image[3]; -static int image_stride[3]; +static uint8_t * image[MP_MAX_PLANES]; +static int image_stride[MP_MAX_PLANES]; /* image infos */ static int image_format; @@ -123,13 +123,11 @@ resize(void){ sws = sws_getContextFromCmdLine(src_width,src_height,image_format, image_width,image_height,IMGFMT_Y8); + memset(image, 0, sizeof(image)); image[0] = aa_image(c) + image_y * aa_imgwidth(c) + image_x; - image[1] = NULL; - image[2] = NULL; + memset(image_stride, 0, sizeof(image_stride)); image_stride[0] = aa_imgwidth(c); - image_stride[1] = 0; - image_stride[2] = 0; showosdmessage=0; @@ -339,7 +337,7 @@ query_format(uint32_t format) { static int draw_frame(uint8_t *src[]) { - int stride[3] = { 0 , 0 , 0 }; + int stride[MP_MAX_PLANES] = {0}; switch(image_format) { case IMGFMT_BGR15: Modified: trunk/libvo/vo_kva.c ============================================================================== --- trunk/libvo/vo_kva.c Sun Mar 29 16:35:38 2009 (r29100) +++ trunk/libvo/vo_kva.c Sun Mar 29 16:37:21 2009 (r29101) @@ -131,8 +131,8 @@ struct { PBYTE pbImage; BOOL fFixT23; PFNWP pfnwpOldFrame; - uint8_t *planes[3]; // y = 0, u = 1, v = 2 - int stride[3]; + uint8_t *planes[MP_MAX_PLANES]; // y = 0, u = 1, v = 2 + int stride[MP_MAX_PLANES]; BOOL fHWAccel; RECTL rclParent; struct SwsContext *sws; @@ -230,6 +230,8 @@ static void imgCreate(void) m_int.pbImage = malloc(size); + memset(m_int.planes, 0, sizeof(m_int.planes)); + memset(m_int.stride, 0, sizeof(m_int.stride)); m_int.planes[0] = m_int.pbImage; m_int.stride[0] = m_int.lStride; @@ -257,8 +259,8 @@ static void imgDisplay(void) ULONG ulBPL; if (!kvaLockBuffer(&pBuffer, &ulBPL)) { - uint8_t *dst[3]; - int dstStride[3]; + uint8_t *dst[MP_MAX_PLANES] = {NULL}; + int dstStride[MP_MAX_PLANES] = {0}; // Get packed or Y dst[0] = pBuffer; Modified: trunk/libvo/vo_vesa.c ============================================================================== --- trunk/libvo/vo_vesa.c Sun Mar 29 16:35:38 2009 (r29100) +++ trunk/libvo/vo_vesa.c Sun Mar 29 16:37:21 2009 (r29101) @@ -283,8 +283,8 @@ static void vbeCopyData(uint8_t *image) static int draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y) { int dstride=HAS_DGA()?video_mode_info.XResolution:dstW; - uint8_t *dst[3]= {dga_buffer, NULL, NULL}; - int dstStride[3]; + uint8_t *dst[MP_MAX_PLANES]={dga_buffer}; + int dstStride[MP_MAX_PLANES]={0}; if( mp_msg_test(MSGT_VO,MSGL_DBG3) ) mp_msg(MSGT_VO,MSGL_DBG3, "vo_vesa: draw_slice was called: w=%u h=%u x=%u y=%u\n",w,h,x,y); dstStride[0]=dstride*((dstBpp+7)/8); @@ -423,8 +423,8 @@ static int draw_frame(uint8_t *src[]) { int dstride=HAS_DGA()?video_mode_info.XResolution:dstW; int srcStride[1]; - uint8_t *dst[3]= {dga_buffer, NULL, NULL}; - int dstStride[3]; + uint8_t *dst[MP_MAX_PLANES]={dga_buffer}; + int dstStride[MP_MAX_PLANES]={0}; dstStride[0]=dstride*((dstBpp+7)/8); dstStride[1]= dstStride[2]=dstStride[0]>>1; Modified: trunk/libvo/vo_x11.c ============================================================================== --- trunk/libvo/vo_x11.c Sun Mar 29 16:35:38 2009 (r29100) +++ trunk/libvo/vo_x11.c Sun Mar 29 16:37:21 2009 (r29101) @@ -523,8 +523,8 @@ static void flip_page(void) static int draw_slice(uint8_t * src[], int stride[], int w, int h, int x, int y) { - uint8_t *dst[3]; - int dstStride[3]; + uint8_t *dst[MP_MAX_PLANES] = {NULL}; + int dstStride[MP_MAX_PLANES] = {0}; if ((old_vo_dwidth != vo_dwidth || old_vo_dheight != vo_dheight) /*&& y==0 */ && zoomFlag) @@ -557,8 +557,6 @@ static int draw_slice(uint8_t * src[], i } dst_width = newW; } - dstStride[1] = dstStride[2] = 0; - dst[1] = dst[2] = NULL; dstStride[0] = image_width * ((bpp + 7) / 8); dst[0] = ImageData; From subversion at mplayerhq.hu Sun Mar 29 16:38:44 2009 From: subversion at mplayerhq.hu (reimar) Date: Sun, 29 Mar 2009 16:38:44 +0200 (CEST) Subject: [MPlayer-cvslog] [propchange]: r29101 - svn:log Message-ID: <20090329143844.A3D793B67F@natsuki.mplayerhq.hu> Author: reimar Revision: 29101 Property Name: svn:log Action: modified Property diff: --- old property value +++ new property value @@ -1,3 +1,3 @@ -Consistently use MP_MAX_PLANES as size for plane pointer/stride arrays. +Consistently use MP_MAX_PLANES as size for plane pointer/stride arrays in libvo. This might avoid some issues since sws_scale in some cases assumes these have at least 4 valid entries. From subversion at mplayerhq.hu Sun Mar 29 16:43:11 2009 From: subversion at mplayerhq.hu (diego) Date: Sun, 29 Mar 2009 16:43:11 +0200 (CEST) Subject: [MPlayer-cvslog] r29102 - trunk/libswscale Message-ID: <20090329144311.57EE14E042@natsuki.mplayerhq.hu> Author: diego Date: Sun Mar 29 16:43:11 2009 New Revision: 29102 Log: Globally ignore all example binaries. Modified: trunk/libswscale/ (props changed) From subversion at mplayerhq.hu Sun Mar 29 16:46:59 2009 From: subversion at mplayerhq.hu (reimar) Date: Sun, 29 Mar 2009 16:46:59 +0200 (CEST) Subject: [MPlayer-cvslog] r29103 - in trunk/libmpcodecs: vf_sab.c vf_scale.c vf_screenshot.c vf_smartblur.c Message-ID: <20090329144659.6F2353B6A4@natsuki.mplayerhq.hu> Author: reimar Date: Sun Mar 29 16:46:59 2009 New Revision: 29103 Log: Consistently use MP_MAX_PLANES as size for plane pointer/stride arrays in libmpcodecs. This might avoid some issues since sws_scale in some cases assumes these have at least 4 valid entries. Modified: trunk/libmpcodecs/vf_sab.c trunk/libmpcodecs/vf_scale.c trunk/libmpcodecs/vf_screenshot.c trunk/libmpcodecs/vf_smartblur.c Modified: trunk/libmpcodecs/vf_sab.c ============================================================================== --- trunk/libmpcodecs/vf_sab.c Sun Mar 29 16:43:11 2009 (r29102) +++ trunk/libmpcodecs/vf_sab.c Sun Mar 29 16:46:59 2009 (r29103) @@ -174,10 +174,10 @@ static inline void blur(uint8_t *dst, ui int x, y; FilterParam f= *fp; const int radius= f.distWidth/2; - uint8_t *srcArray[3]= {src, NULL, NULL}; - uint8_t *dstArray[3]= {f.preFilterBuf, NULL, NULL}; - int srcStrideArray[3]= {srcStride, 0, 0}; - int dstStrideArray[3]= {f.preFilterStride, 0, 0}; + uint8_t *srcArray[MP_MAX_PLANES]= {src}; + uint8_t *dstArray[MP_MAX_PLANES]= {f.preFilterBuf}; + int srcStrideArray[MP_MAX_PLANES]= {srcStride}; + int dstStrideArray[MP_MAX_PLANES]= {f.preFilterStride}; // f.preFilterContext->swScale(f.preFilterContext, srcArray, srcStrideArray, 0, h, dstArray, dstStrideArray); sws_scale(f.preFilterContext, srcArray, srcStrideArray, 0, h, dstArray, dstStrideArray); Modified: trunk/libmpcodecs/vf_scale.c ============================================================================== --- trunk/libmpcodecs/vf_scale.c Sun Mar 29 16:43:11 2009 (r29102) +++ trunk/libmpcodecs/vf_scale.c Sun Mar 29 16:46:59 2009 (r29103) @@ -319,9 +319,9 @@ static void start_slice(struct vf_instan vf->priv->w, vf->priv->h); } -static void scale(struct SwsContext *sws1, struct SwsContext *sws2, uint8_t *src[3], int src_stride[3], int y, int h, - uint8_t *dst[3], int dst_stride[3], int interlaced){ - uint8_t *src2[3]={src[0], src[1], src[2]}; +static void scale(struct SwsContext *sws1, struct SwsContext *sws2, uint8_t *src[MP_MAX_PLANES], int src_stride[MP_MAX_PLANES], + int y, int h, uint8_t *dst[MP_MAX_PLANES], int dst_stride[MP_MAX_PLANES], int interlaced){ + uint8_t *src2[MP_MAX_PLANES]={src[0], src[1], src[2]}; #ifdef WORDS_BIGENDIAN uint32_t pal2[256]; if (src[1] && !src[2]){ @@ -334,9 +334,9 @@ static void scale(struct SwsContext *sws if(interlaced){ int i; - uint8_t *dst2[3]={dst[0], dst[1], dst[2]}; - int src_stride2[3]={2*src_stride[0], 2*src_stride[1], 2*src_stride[2]}; - int dst_stride2[3]={2*dst_stride[0], 2*dst_stride[1], 2*dst_stride[2]}; + uint8_t *dst2[MP_MAX_PLANES]={dst[0], dst[1], dst[2]}; + int src_stride2[MP_MAX_PLANES]={2*src_stride[0], 2*src_stride[1], 2*src_stride[2]}; + int dst_stride2[MP_MAX_PLANES]={2*dst_stride[0], 2*dst_stride[1], 2*dst_stride[2]}; sws_scale_ordered(sws1, src2, src_stride2, y>>1, h>>1, dst2, dst_stride2); for(i=0; i<3; i++){ Modified: trunk/libmpcodecs/vf_screenshot.c ============================================================================== --- trunk/libmpcodecs/vf_screenshot.c Sun Mar 29 16:43:11 2009 (r29102) +++ trunk/libmpcodecs/vf_screenshot.c Sun Mar 29 16:46:59 2009 (r29103) @@ -108,16 +108,14 @@ static void gen_fname(struct vf_priv_s* static void scale_image(struct vf_priv_s* priv, mp_image_t *mpi) { - uint8_t *dst[3]; - int dst_stride[3]; + uint8_t *dst[MP_MAX_PLANES] = {NULL}; + int dst_stride[MP_MAX_PLANES] = {0}; dst_stride[0] = priv->stride; - dst_stride[1] = dst_stride[2] = 0; if (!priv->buffer) 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); } @@ -137,12 +135,10 @@ static void draw_slice(struct vf_instanc int* stride, int w,int h, int x, int y) { if (vf->priv->store_slices) { - uint8_t *dst[3]; - int dst_stride[3]; + uint8_t *dst[MP_MAX_PLANES] = {NULL}; + int dst_stride[MP_MAX_PLANES] = {0}; 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); Modified: trunk/libmpcodecs/vf_smartblur.c ============================================================================== --- trunk/libmpcodecs/vf_smartblur.c Sun Mar 29 16:43:11 2009 (r29102) +++ trunk/libmpcodecs/vf_smartblur.c Sun Mar 29 16:46:59 2009 (r29103) @@ -132,10 +132,10 @@ static void uninit(struct vf_instance_s* static inline void blur(uint8_t *dst, uint8_t *src, int w, int h, int dstStride, int srcStride, FilterParam *fp){ int x, y; FilterParam f= *fp; - uint8_t *srcArray[3]= {src, NULL, NULL}; - uint8_t *dstArray[3]= {dst, NULL, NULL}; - int srcStrideArray[3]= {srcStride, 0, 0}; - int dstStrideArray[3]= {dstStride, 0, 0}; + uint8_t *srcArray[MP_MAX_PLANES]= {src}; + uint8_t *dstArray[MP_MAX_PLANES]= {dst}; + int srcStrideArray[MP_MAX_PLANES]= {srcStride}; + int dstStrideArray[MP_MAX_PLANES]= {dstStride}; sws_scale(f.filterContext, srcArray, srcStrideArray, 0, h, dstArray, dstStrideArray); From Reimar.Doeffinger at gmx.de Sun Mar 29 16:51:52 2009 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Sun, 29 Mar 2009 16:51:52 +0200 Subject: [MPlayer-cvslog] r29103 - in trunk/libmpcodecs: vf_sab.c vf_scale.c vf_screenshot.c vf_smartblur.c In-Reply-To: <20090329144659.6F2353B6A4@natsuki.mplayerhq.hu> References: <20090329144659.6F2353B6A4@natsuki.mplayerhq.hu> Message-ID: <20090329145152.GA23993@1und1.de> On Sun, Mar 29, 2009 at 04:46:59PM +0200, reimar wrote: > Author: reimar > Date: Sun Mar 29 16:46:59 2009 > New Revision: 29103 > > Log: > Consistently use MP_MAX_PLANES as size for plane pointer/stride arrays in libmpcodecs. > This might avoid some issues since sws_scale in some cases assumes these > have at least 4 valid entries. Note that the only currently known issue is the planarCopy function, which means it is only the unscaled and non-converting "scaling" case. Usually, "-vf scale,smartblur=0.3:-1:0" should allow reproducing the issue. Whether this should be considered a bug in libswscale or not is still up to discussion, but IMO it is more correct to use MP_MAX_PLANES anyway. From subversion at mplayerhq.hu Sun Mar 29 21:25:22 2009 From: subversion at mplayerhq.hu (cehoyos) Date: Sun, 29 Mar 2009 21:25:22 +0200 (CEST) Subject: [MPlayer-cvslog] r29104 - trunk/libvo/vo_vdpau.c Message-ID: <20090329192522.C58745003C@natsuki.mplayerhq.hu> Author: cehoyos Date: Sun Mar 29 21:25:22 2009 New Revision: 29104 Log: VDPAU supports IMGFMT_I420 and IMGFMT_IYUV. Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Sun Mar 29 16:46:59 2009 (r29103) +++ trunk/libvo/vo_vdpau.c Sun Mar 29 21:25:22 2009 (r29104) @@ -930,6 +930,8 @@ static int query_format(uint32_t format) int default_flags = VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN | VFCAP_OSD | VFCAP_EOSD | VFCAP_EOSD_UNSCALED; switch (format) { case IMGFMT_YV12: + case IMGFMT_I420: + case IMGFMT_IYUV: return default_flags | VOCAP_NOSLICES; case IMGFMT_VDPAU_MPEG1: case IMGFMT_VDPAU_MPEG2: From subversion at mplayerhq.hu Sun Mar 29 21:43:53 2009 From: subversion at mplayerhq.hu (cehoyos) Date: Sun, 29 Mar 2009 21:43:53 +0200 (CEST) Subject: [MPlayer-cvslog] r29105 - trunk/libvo/vo_vdpau.c Message-ID: <20090329194353.128443B6E1@natsuki.mplayerhq.hu> Author: cehoyos Date: Sun Mar 29 21:43:52 2009 New Revision: 29105 Log: Add support for IMGFMT_YUY2 and IMGFMT_UYVY to vo vdpau. Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Sun Mar 29 21:25:22 2009 (r29104) +++ trunk/libvo/vo_vdpau.c Sun Mar 29 21:43:52 2009 (r29105) @@ -174,7 +174,8 @@ static int static int vid_surface_num; static uint32_t vid_width, vid_height; static uint32_t image_format; -static const VdpChromaType vdp_chroma_type = VDP_CHROMA_TYPE_420; +static VdpChromaType vdp_chroma_type; +static VdpYCbCrFormat vdp_pixel_format; /* draw_osd */ static unsigned char *index_data; @@ -598,6 +599,21 @@ static int config(uint32_t width, uint32 if (vdp_flip_queue == VDP_INVALID_HANDLE && win_x11_init_vdpau_flip_queue()) return -1; + vdp_chroma_type = VDP_CHROMA_TYPE_420; + switch (image_format) { + case IMGFMT_YV12: + case IMGFMT_I420: + case IMGFMT_IYUV: + vdp_pixel_format = VDP_YCBCR_FORMAT_YV12; + break; + case IMGFMT_YUY2: + vdp_pixel_format = VDP_YCBCR_FORMAT_YUYV; + vdp_chroma_type = VDP_CHROMA_TYPE_422; + break; + case IMGFMT_UYVY: + vdp_pixel_format = VDP_YCBCR_FORMAT_UYVY; + vdp_chroma_type = VDP_CHROMA_TYPE_422; + } if (create_vdp_mixer(vdp_chroma_type)) return -1; @@ -887,7 +903,7 @@ static uint32_t draw_image(mp_image_t *m deint_counter = (deint_counter + 1) % 3; vid_surface_num = rndr - surface_render; vdp_st = vdp_video_surface_put_bits_y_cb_cr(rndr->surface, - VDP_YCBCR_FORMAT_YV12, + vdp_pixel_format, (const void *const*)destdata, mpi->stride); // pitch CHECK_ST_ERROR("Error when calling vdp_video_surface_put_bits_y_cb_cr") @@ -932,6 +948,8 @@ static int query_format(uint32_t format) case IMGFMT_YV12: case IMGFMT_I420: case IMGFMT_IYUV: + case IMGFMT_YUY2: + case IMGFMT_UYVY: return default_flags | VOCAP_NOSLICES; case IMGFMT_VDPAU_MPEG1: case IMGFMT_VDPAU_MPEG2: From subversion at mplayerhq.hu Mon Mar 30 14:11:12 2009 From: subversion at mplayerhq.hu (reimar) Date: Mon, 30 Mar 2009 14:11:12 +0200 (CEST) Subject: [MPlayer-cvslog] r29106 - trunk/libvo/vo_vdpau.c Message-ID: <20090330121112.E3F533B65F@natsuki.mplayerhq.hu> Author: reimar Date: Mon Mar 30 14:11:12 2009 New Revision: 29106 Log: Make sure we do not accidentally use the vdp_get_error_string from the previous initialization. Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Sun Mar 29 21:43:52 2009 (r29105) +++ trunk/libvo/vo_vdpau.c Mon Mar 30 14:11:12 2009 (r29106) @@ -375,6 +375,7 @@ static int win_x11_init_vdpau_procs(void return -1; } + vdp_get_error_string = NULL; for (dsc = vdp_func; dsc->pointer; dsc++) { vdp_st = vdp_get_proc_address(vdp_device, dsc->id, dsc->pointer); if (vdp_st != VDP_STATUS_OK) { From subversion at mplayerhq.hu Mon Mar 30 19:05:40 2009 From: subversion at mplayerhq.hu (reimar) Date: Mon, 30 Mar 2009 19:05:40 +0200 (CEST) Subject: [MPlayer-cvslog] r29108 - in trunk: mencoder.c mplayer.c Message-ID: <20090330170540.8EE823B62D@natsuki.mplayerhq.hu> Author: reimar Date: Mon Mar 30 19:05:39 2009 New Revision: 29108 Log: Set the forced_subs_only value correctly whenever a new spudec is created. Modified: trunk/mencoder.c trunk/mplayer.c Modified: trunk/mencoder.c ============================================================================== --- trunk/mencoder.c Mon Mar 30 14:23:28 2009 (r29107) +++ trunk/mencoder.c Mon Mar 30 19:05:39 2009 (r29108) @@ -698,6 +698,8 @@ vo_spudec=spudec_new_scaled(stream->type sh_video->disp_w, sh_video->disp_h, NULL, 0); } #endif +if (vo_spudec) + spudec_set_forced_subs_only(vo_spudec, forced_subs_only); } ostream = open_output_stream(out_filename, 0); Modified: trunk/mplayer.c ============================================================================== --- trunk/mplayer.c Mon Mar 30 14:23:28 2009 (r29107) +++ trunk/mplayer.c Mon Mar 30 19:05:39 2009 (r29108) @@ -1125,8 +1125,10 @@ void init_vo_spudec(void) { spudec_set_font_factor(vo_spudec,font_factor); } - if (vo_spudec!=NULL) + if (vo_spudec!=NULL) { initialized_flags|=INITIALIZED_SPUDEC; + mp_property_do("sub_forced_only", M_PROPERTY_SET, &forced_subs_only, mpctx); + } } /* @@ -3066,6 +3068,7 @@ if (edl_output_filename) { if(vo_vobsub){ initialized_flags|=INITIALIZED_VOBSUB; vobsub_set_from_lang(vo_vobsub, dvdsub_lang); + mp_property_do("sub_forced_only", M_PROPERTY_SET, &forced_subs_only, mpctx); // setup global sub numbering mpctx->global_sub_indices[SUB_SOURCE_VOBSUB] = mpctx->global_sub_size; // the global # of the first vobsub. From subversion at mplayerhq.hu Mon Mar 30 23:17:42 2009 From: subversion at mplayerhq.hu (cehoyos) Date: Mon, 30 Mar 2009 23:17:42 +0200 (CEST) Subject: [MPlayer-cvslog] r29109 - trunk/libvo/vo_vdpau.c Message-ID: <20090330211742.6BBB250042@natsuki.mplayerhq.hu> Author: cehoyos Date: Mon Mar 30 23:17:42 2009 New Revision: 29109 Log: Support IMGFMT_NV12 for vo vdpau. Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Mon Mar 30 19:05:39 2009 (r29108) +++ trunk/libvo/vo_vdpau.c Mon Mar 30 23:17:42 2009 (r29109) @@ -607,6 +607,9 @@ static int config(uint32_t width, uint32 case IMGFMT_IYUV: vdp_pixel_format = VDP_YCBCR_FORMAT_YV12; break; + case IMGFMT_NV12: + vdp_pixel_format = VDP_YCBCR_FORMAT_NV12; + break; case IMGFMT_YUY2: vdp_pixel_format = VDP_YCBCR_FORMAT_YUYV; vdp_chroma_type = VDP_CHROMA_TYPE_422; @@ -903,6 +906,8 @@ static uint32_t draw_image(mp_image_t *m struct vdpau_render_state *rndr = get_surface(deint_counter); deint_counter = (deint_counter + 1) % 3; vid_surface_num = rndr - surface_render; + if (image_format == IMGFMT_NV12) + destdata[1] = destdata[2]; vdp_st = vdp_video_surface_put_bits_y_cb_cr(rndr->surface, vdp_pixel_format, (const void *const*)destdata, @@ -949,6 +954,7 @@ static int query_format(uint32_t format) case IMGFMT_YV12: case IMGFMT_I420: case IMGFMT_IYUV: + case IMGFMT_NV12: case IMGFMT_YUY2: case IMGFMT_UYVY: return default_flags | VOCAP_NOSLICES; From subversion at mplayerhq.hu Tue Mar 31 00:49:28 2009 From: subversion at mplayerhq.hu (bcoudurier) Date: Tue, 31 Mar 2009 00:49:28 +0200 (CEST) Subject: [MPlayer-cvslog] r29110 - trunk/libmpdemux/mp_taglists.c Message-ID: <20090330224928.D77453B582@natsuki.mplayerhq.hu> Author: bcoudurier Date: Tue Mar 31 00:49:28 2009 New Revision: 29110 Log: override lavf tag for pcm s24le, mov uses the same for s24be Modified: trunk/libmpdemux/mp_taglists.c Modified: trunk/libmpdemux/mp_taglists.c ============================================================================== --- trunk/libmpdemux/mp_taglists.c Mon Mar 30 23:17:42 2009 (r29109) +++ trunk/libmpdemux/mp_taglists.c Tue Mar 31 00:49:28 2009 (r29110) @@ -59,6 +59,7 @@ static const AVCodecTag mp_wav_override_ { CODEC_ID_PCM_S16BE, MKTAG('t', 'w', 'o', 's')}, { CODEC_ID_PCM_S16LE, 1}, { CODEC_ID_PCM_S24BE, MKTAG('i', 'n', '2', '4')}, + { CODEC_ID_PCM_S24LE, 1}, { 0, 0 }, }; From subversion at mplayerhq.hu Tue Mar 31 08:30:39 2009 From: subversion at mplayerhq.hu (zuxy) Date: Tue, 31 Mar 2009 08:30:39 +0200 (CEST) Subject: [MPlayer-cvslog] r29111 - trunk/cpuinfo.c Message-ID: <20090331063039.A7BAC3B41B@natsuki.mplayerhq.hu> Author: zuxy Date: Tue Mar 31 08:30:38 2009 New Revision: 29111 Log: More flags; sync with Linux kernel. Modified: trunk/cpuinfo.c Modified: trunk/cpuinfo.c ============================================================================== --- trunk/cpuinfo.c Tue Mar 31 00:49:28 2009 (r29110) +++ trunk/cpuinfo.c Tue Mar 31 08:30:38 2009 (r29111) @@ -186,6 +186,8 @@ main(void) char *desc; } cap2[] = { CPUID_FEATURE_DEF(0, "pni", "SSE3 Extensions"), + CPUID_FEATURE_DEF(1, "pclmulqdq", "Carryless Multiplication"), + CPUID_FEATURE_DEF(2, "dtes64", "64-bit Debug Store"), CPUID_FEATURE_DEF(3, "monitor", "MONITOR/MWAIT"), CPUID_FEATURE_DEF(4, "ds_cpl", "CPL Qualified Debug Store"), CPUID_FEATURE_DEF(5, "vmx", "Virtual Machine Extensions"), @@ -194,13 +196,20 @@ main(void) CPUID_FEATURE_DEF(8, "tm2", "Thermal Monitor 2"), CPUID_FEATURE_DEF(9, "ssse3", "Supplemental SSE3"), CPUID_FEATURE_DEF(10, "cid", "L1 Context ID"), + CPUID_FEATURE_DEF(12, "fma", "Fused Multiply Add"), CPUID_FEATURE_DEF(13, "cx16", "CMPXCHG16B Available"), CPUID_FEATURE_DEF(14, "xtpr", "xTPR Disable"), CPUID_FEATURE_DEF(15, "pdcm", "Perf/Debug Capability MSR"), CPUID_FEATURE_DEF(18, "dca", "Direct Cache Access"), CPUID_FEATURE_DEF(19, "sse4_1", "SSE4.1 Extensions"), CPUID_FEATURE_DEF(20, "sse4_2", "SSE4.2 Extensions"), + CPUID_FEATURE_DEF(21, "x2apic", "x2APIC Feature"), + CPUID_FEATURE_DEF(22, "movbe", "MOVBE Instruction"), CPUID_FEATURE_DEF(23, "popcnt", "Pop Count Instruction"), + CPUID_FEATURE_DEF(25, "aes", "AES Instruction"), + CPUID_FEATURE_DEF(26, "xsave", "XSAVE/XRSTOR Extensions"), + CPUID_FEATURE_DEF(27, "osxsave", "XSAVE/XRSTOR Enabled in the OS"), + CPUID_FEATURE_DEF(28, "avx", "Advanced Vector Extension"), { -1 } }; static struct { @@ -227,7 +236,7 @@ main(void) CPUID_FEATURE_DEF(1, "cmp_legacy", "Chip Multi-Core"), CPUID_FEATURE_DEF(2, "svm", "Secure Virtual Machine"), CPUID_FEATURE_DEF(3, "extapic", "Extended APIC Space"), - CPUID_FEATURE_DEF(4, "cr8legacy", "CR8 Available in Legacy Mode"), + CPUID_FEATURE_DEF(4, "cr8_legacy", "CR8 Available in Legacy Mode"), CPUID_FEATURE_DEF(5, "abm", "Advanced Bit Manipulation"), CPUID_FEATURE_DEF(6, "sse4a", "SSE4A Extensions"), CPUID_FEATURE_DEF(7, "misalignsse", "Misaligned SSE Mode"), From subversion at mplayerhq.hu Tue Mar 31 18:16:12 2009 From: subversion at mplayerhq.hu (reimar) Date: Tue, 31 Mar 2009 18:16:12 +0200 (CEST) Subject: [MPlayer-cvslog] r29112 - trunk/libvo/geometry.c Message-ID: <20090331161613.060763B6F2@natsuki.mplayerhq.hu> Author: reimar Date: Tue Mar 31 18:16:12 2009 New Revision: 29112 Log: Get rid of nonsensical limits on -geometry x, y,w and h values, they only cause confusion on multi-monitor setups. Modified: trunk/libvo/geometry.c Modified: trunk/libvo/geometry.c ============================================================================== --- trunk/libvo/geometry.c Tue Mar 31 08:30:38 2009 (r29111) +++ trunk/libvo/geometry.c Tue Mar 31 18:16:12 2009 (r29112) @@ -20,6 +20,7 @@ #include #include +#include #include "geometry.h" #include "mp_msg.h" @@ -38,7 +39,7 @@ int geometry(int *xpos, int *ypos, int * { int width, height, xoff, yoff, xper, yper; - width = height = xoff = yoff = xper = yper = -1; + width = height = xoff = yoff = xper = yper = INT_MIN; if(vo_geometry != NULL) { if(sscanf(vo_geometry, "%ix%i+%i+%i", &width, &height, &xoff, &yoff) != 4 ) @@ -90,22 +91,14 @@ int geometry(int *xpos, int *ypos, int * mp_msg(MSGT_VO, MSGL_V,"geometry window parameter: widw: %i," " widh: %i, scrw: %i, scrh: %i\n",*widw, *widh, scrw, scrh); - /* FIXME: better checking of bounds... */ - if( width != -1 && (width < 0 || width > scrw)) - width = (scrw < *widw) ? scrw : *widw; - if( height != -1 && (height < 0 || height > scrh)) - height = (scrh < *widh) ? scrh : *widh; - if(xoff != -1 && (xoff < 0 || xoff + width > scrw)) xoff = 0; - if(yoff != -1 && (yoff < 0 || yoff + height > scrh)) yoff = 0; - - if(xoff != -1 && xpos) *xpos = xoff; - if(yoff != -1 && ypos) *ypos = yoff; - if(width != -1 && widw) *widw = width; - if(height != -1 && widh) *widh = height; + if (xoff != INT_MIN && xpos) *xpos = xoff; + if (yoff != INT_MIN && ypos) *ypos = yoff; + if (width > 0 && widw) *widw = width; + if (height > 0 && widh) *widh = height; - if( width != -1 || height != -1) + if (width > 0 || height > 0) geometry_wh_changed = 1; - if( xoff != -1 || yoff != -1) + if (xoff != INT_MIN || yoff != INT_MIN) geometry_xy_changed = 1; } return 1; From subversion at mplayerhq.hu Tue Mar 31 20:49:04 2009 From: subversion at mplayerhq.hu (compn) Date: Tue, 31 Mar 2009 20:49:04 +0200 (CEST) Subject: [MPlayer-cvslog] r29116 - trunk/etc/codecs.conf Message-ID: <20090331184904.565103B6FB@natsuki.mplayerhq.hu> Author: compn Date: Tue Mar 31 20:49:04 2009 New Revision: 29116 Log: cdvh decodes with ffdv Modified: trunk/etc/codecs.conf Modified: trunk/etc/codecs.conf ============================================================================== --- trunk/etc/codecs.conf Tue Mar 31 19:11:04 2009 (r29115) +++ trunk/etc/codecs.conf Tue Mar 31 20:49:04 2009 (r29116) @@ -1524,6 +1524,7 @@ videocodec ffdv info "FFmpeg DV" status working fourcc CDVC,cdvc + fourcc CDVH,cdvh ; Canopus DVCPRO HD fourcc DVSD,dvsd ; PAL fourcc DVCS,dvcs ; NTSC ? fourcc "dvcp" ; PAL DV in .mov