MPlayer-cvslog
Threads by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
December 2001
- 31 participants
- 832 discussions
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv32253
Modified Files:
help_mp-no.h
Log Message:
updated by B. Johannessen <bob(a)well.com>
Index: help_mp-no.h
===================================================================
RCS file: /cvsroot/mplayer/main/help_mp-no.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- help_mp-no.h 25 Nov 2001 00:01:13 -0000 1.2
+++ help_mp-no.h 31 Dec 2001 03:52:00 -0000 1.3
@@ -1,4 +1,5 @@
// Transated by: Andreas Berntsen <andreasb(a)kvarteret.org>
+// Updated for 0.60 by: B. Johannessen <bob(a)well.com>
// ========================= MPlayer hjelp ===========================
@@ -30,6 +31,7 @@
#ifdef USE_FAKE_MONO
" -stereo <mode> velg MPEG1 stereo output (0:stereo 1:venstre 2:høyre)\n"
#endif
+" -channels <n> målnummer for lyd output kanaler\n"
" -fs -vm -zoom fullskjerm avspillings valg (fullscr,vidmode chg,softw.scale)\n"
" -x <x> -y <y> skaler bildet til <x> * <y> oppløsning [hvis -vo driver støtter det!]\n"
" -sub <fil> spesifiser hvilken subtitle fil som skal brukes (se også -subfps, -subdelay)\n"
@@ -38,10 +40,12 @@
" -pp <quality> slå på etterbehandlingsfilter (0-4 for DivX, 0-63 for mpeg)\n"
" -nobps bruk alternativ A-V sync metode for AVI filer (kan være nyttig!)\n"
" -framedrop slå på bilde-dropping (for trege maskiner)\n"
+" -wid <window id> bruk eksisterende vindu for video output (nytting med plugger!)\n"
"\n"
"Tastatur:\n"
-" <- eller -> søk bakover/framover 10 sekunder\n"
-" OPP eller NED søk bakover/framover 1 minutt\n"
+" <- eller -> søk bakover/fremover 10 sekunder\n"
+" opp eller ned søk bakover/fremover 1 minutt\n"
+" < or > søk bakover/fremover i playlisten\n"
" p eller MELLOMROM pause filmen (trykk en tast for å fortsette)\n"
" q eller ESC stopp avspilling og avslutt programmet\n"
" + eller - juster lyd-forsinkelse med +/- 0.1 sekund\n"
@@ -49,7 +53,7 @@
" * eller / øk eller mink volumet (trykk 'm' for å velge master/pcm)\n"
" z or x juster undertittelens forsinkelse med +/- 0.1 sekund\n"
"\n"
-" * * * SE PÅ MANPAGE FOR DETALJER, FLERE (AVANSERTE) VALG OG TASTER! * * *\n"
+" * * * SE PÅ MANSIDE FOR DETALJER, FLERE (AVANSERTE) VALG OG TASTER! * * *\n"
"\n";
#endif
@@ -76,7 +80,7 @@
#define MSGTR_DVDauthOk "DVD auth sekvense ser ut til å være OK.\n"
#define MSGTR_DumpSelectedSteramMissing "dump: FATALT: valgte stream mangler!\n"
#define MSGTR_CantOpenDumpfile "Kan ikke åpne dump fil!!!\n"
-#define MSGTR_CoreDumped "core dumpet:)\n"
+#define MSGTR_CoreDumped "core dumpet :)\n"
#define MSGTR_FPSnotspecified "FPS ikke spesifisert (eller ugyldig) i headeren! Bruk -fps valget!\n"
#define MSGTR_NoVideoStream "Sorry, ingen video stream... ikke spillbar for øyeblikket\n"
#define MSGTR_TryForceAudioFmt "Prøver å tvinge lyd-codec driver familie %d ...\n"
@@ -94,11 +98,24 @@
#define MSGTR_CannotInitVO "FATALT: Kan ikke initialisere video driver!\n"
#define MSGTR_CannotInitAO "kunne ikke åpne/initialisere lyd-enhet -> NOSOUND\n"
#define MSGTR_StartPlaying "Starter avspilling...\n"
-#define MSGTR_SystemTooSlow "\n******************************************************************************************"\
- "\n** Systemet ditt er for TREGT for å kunne spille dette! Prøv med -framedrop eller RTFM! **"\
- "\n******************************************************************************************\n"
-#define MSGTR_NoGui "MPlayer er kompilert iten GUI-støtte!\n"
+#define MSGTR_SystemTooSlow "\n\n"\
+" ************************************************************\n"\
+" **** Systemed ditt er for TREGT til å spille av dette! ****\n"\
+" ************************************************************\n"\
+"!!! Mulige årsaker, problemer, løsninger: \n"\
+"- Vanligste problem: ødelagte _lyd_ drivere, eller lyddrivere med feil. \n"\
+" Prøv: -ao sdl eller bruk ALSA 0.5/oss emuleringen i ALSA 0.9. Les også\n"\
+" DOCS/sound.html for flere tips!\n"\
+"- Treg video output. Prøv en annen -vo driver (for liste: -vo help) eller\n"\
+" prøv med -framedrop! Les DOCS/video.html for flere tips\n"\
+"- Treg CPU. ikke forsøk å spille av store dvd/divx filer på en treg CPU!\n"\
+" forsøk -hardframedrop\n"\
+"- Feil på filen. forsøk forskjellige kombinasjoner av disse:\n"\
+" -nobps -ni -mc 0 -forceidx\n"\
+"Dersom dette ikke hjelper, les DOCS/bugreports.html !\n\n"
+
+#define MSGTR_NoGui "MPlayer er kompilert uten GUI-støtte!\n"
#define MSGTR_GuiNeedsX "MPlayer GUI trenger X11!\n"
#define MSGTR_Playing "Spiller %s\n"
#define MSGTR_NoSound "Lyd: ingen lyd!!!\n"
@@ -139,7 +156,7 @@
#define MSGTR_DetectedQTMOVfile "Detekterte QuickTime/MOV filformat!\n"
#define MSGTR_MissingMpegVideo "Manglende MPEG video stream!? kontakt utvikleren, det kan være en feil :(\n"
#define MSGTR_InvalidMPEGES "Ugyldig MPEG-ES stream??? kontakt utvikleren, det kan være en feil :(\n"
-#define MSGTR_FormatNotRecognized "============= Sorry, dette filformatet er ikke gjenkjent/støttet ===============\n"\
+#define MSGTR_FormatNotRecognized "======== Beklager, dette filformatet er ikke gjenkjent/støttet ===============\n"\
"=== Hvis det er en AVI, ASF eller MPEG stream, kontakt utvikleren! ===\n"
#define MSGTR_MissingVideoStream "Ingen video stream funnet!\n"
#define MSGTR_MissingAudioStream "Ingen lyd stream funnet... ->nosound\n"
@@ -179,7 +196,7 @@
#define MSGTR_NoACMSupport "Win32/ACM lyd codec slått av eller ikke tilgjengelig på ikke-x86 CPU -> tvinger nosound :(\n"
#define MSGTR_NoDShowAudio "Kompilert uten DirectShow støtte -> tvinger nosound :(\n"
#define MSGTR_NoOggVorbis "OggVorbis lyd codec slått av -> tvinger nosound :(\n"
-
+#define MSGTR_NoXAnimSupport "MPlayer er kompilert uten XAnim støtte!\n"
#define MSGTR_MpegPPhint "ADVARSEL! Du ba om etterbehandling av bilde for en MPEG 1/2 video,\n" \
" men kompilerte MPlayer uten MPEG 1/2 etterbehandlingsstøtte!\n" \
" #define MPEG12_POSTPROC i config.h, og kompiler libmpeg2 på nytt!\n"
@@ -212,6 +229,8 @@
// --- labels ---
#define MSGTR_About "Om"
#define MSGTR_FileSelect "Åpne fil..."
+#define MSGTR_SubtitleSelect "Velg teksting ..."
+#define MSGTR_OtherSelect "Velg ..."
#define MSGTR_MessageBox "MessageBox"
#define MSGTR_PlayList "Spilleliste"
#define MSGTR_SkinBrowser "Velg skin"
@@ -223,9 +242,9 @@
#define MSGTR_Remove "Fjern"
// --- error messages ---
-#define MSGTR_NEMDB "Sorry, ikke nok minne til tegnebuffer."
-#define MSGTR_NEMFMR "Sorry, ikke nok minne til meny rendering."
-#define MSGTR_NEMFMM "Sorry, ikke nok minne til hovedvindu shape mask."
+#define MSGTR_NEMDB "Beklager, ikke nok minne til tegnebuffer."
+#define MSGTR_NEMFMR "Beklager, ikke nok minne til meny rendering."
+#define MSGTR_NEMFMM "Beklager, ikke nok minne til hovedvindu shape mask."
// --- skin loader error messages
#define MSGTR_SKIN_ERRORMESSAGE "[skin] feil i skin konfigurasjonsfil linje %d: %s"
@@ -247,5 +266,47 @@
#define MSGTR_SKIN_FONT_NonExistentFontID "ikke-ekstisterende skrifttype identifikasjon ( %s )\n"
#define MSGTR_SKIN_UnknownParameter "ukjent parameter ( %s )\n"
#define MSGTR_SKINBROWSER_NotEnoughMemory "[skinbrowser] ikke nok minne.\n"
+#define MSGTR_SKIN_SKINCFG_SkinNotFound "Skin ikke funnet ( %s ).\n"
+#define MSGTR_SKIN_SKINCFG_SkinCfgReadError "Skin konfigurasjonfil lesefeil ( %s ).\n"
+#define MSGTR_SKIN_LABEL "Skins:"
+
+
+// --- gtk menus
+#define MSGTR_MENU_AboutMPlayer "Om MPlayer"
+#define MSGTR_MENU_Open "Åpne ..."
+#define MSGTR_MENU_PlayFile "Spill file ..."
+#define MSGTR_MENU_PlayVCD "Spill VCD ..."
+#define MSGTR_MENU_PlayDVD "Spill DVD ..."
+#define MSGTR_MENU_PlayURL "Spill URL ..."
+#define MSGTR_MENU_LoadSubtitle "Last tekst ..."
+#define MSGTR_MENU_Playing "Spiller"
+#define MSGTR_MENU_Play "Spill"
+#define MSGTR_MENU_Pause "Pause"
+#define MSGTR_MENU_Stop "Stopp"
+#define MSGTR_MENU_NextStream "Neste stream"
+#define MSGTR_MENU_PrevStream "Forrige stream"
+#define MSGTR_MENU_Size "Størrelse"
+#define MSGTR_MENU_NormalSize "Normal størrelse"
+#define MSGTR_MENU_DoubleSize "Dobbel størrelse"
+#define MSGTR_MENU_FullScreen "Fullskjerm"
+#define MSGTR_MENU_DVD "DVD"
+#define MSGTR_MENU_PlayDisc "Spill Plate ..."
+#define MSGTR_MENU_ShowDVDMenu "Vis DVD meny"
+#define MSGTR_MENU_Titles "Titler"
+#define MSGTR_MENU_Title "Titel %2d"
+#define MSGTR_MENU_None "(ingen)"
+#define MSGTR_MENU_Chapters "Kapittel"
+#define MSGTR_MENU_Chapter "Kapittel %2d"
+#define MSGTR_MENU_AudioLanguages "Lyd språk"
+#define MSGTR_MENU_SubtitleLanguages "Tekst språk"
+#define MSGTR_MENU_PlayList "Spilleliste"
+#define MSGTR_MENU_SkinBrowser "Skin velger"
+#define MSGTR_MENU_Preferences "Preferanser"
+#define MSGTR_MENU_Exit "Avslutt ..."
+
+// --- messagebox
+#define MSGTR_MSGBOX_LABEL_FatalError "fatal feil ..."
+#define MSGTR_MSGBOX_LABEL_Error "fail ..."
+#define MSGTR_MSGBOX_LABEL_Warning "advarsel ..."
#endif
1
0
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv16168
Added Files:
help_mp-it.h
Log Message:
Italian tr. by Fabio Olimpieri <fabio.olimpieri(a)tin.it>
--- NEW FILE ---
// Translated by: Fabio Olimpieri <fabio.olimpieri(a)tin.it>
// Translated files should be uploaded to ftp://mplayerhq.hu/MPlayer/incoming
// and send a notify message to mplayer-dev-eng maillist.
// ========================= MPlayer help ===========================
#ifdef HELP_MP_DEFINE_STATIC
static char* banner_text=
"\n\n"
"MPlayer " VERSION "(C) 2000-2001 Arpad Gereoffy (vedi DOCS!)\n"
"\n";
static char help_text[]=
#ifdef HAVE_NEW_GUI
"Uso: mplayer [-gui] [opzioni] [percorso/]nome_file\n"
#else
"Uso: mplayer [opzioni] [percorso/]nome_file\n"
#endif
"\n"
"Opzioni:\n"
" -vo <drv[:dev]> seleziona il driver ed il dispositivo video di output ('-vo help' per la lista)\n"
" -ao <drv[:dev]> seleziona il driver ed il dispositivo audio di output ('-ao help' per la lista)\n"
" -vcd <trackno> riproduce la traccia VCD (video cd) dal dispositivo invece che dal file normale\n"
#ifdef HAVE_LIBCSS
" -dvdauth <dev> specifica il dispositivo DVD per l\'autenticazione (per dischi criptati)\n"
#endif
#ifdef USE_DVDREAD
" -dvd <titleno> riproduce il titolo/traccia del DVD dal dispositivo invece che dal file normale\n"
#endif
" -ss <timepos> cerca una determinata posizione (in secondi o in hh:mm:ss) \n"
" -nosound non riproduce l\'audio\n"
#ifdef USE_FAKE_MONO
" -stereo <mode> seleziona l\'uscita stereo MPEG1 (0:stereo 1:sinistra 2:destra)\n"
#endif
" -channels <n> numero desiderato di canali audio di uscita\n"
" -fs -vm -zoom opzioni di riproduzione a schermo intero (schermo int,cambia video,scalatura softw)\n"
" -x <x> -y <y> scala l\'immagine alla risoluzione <x> * <y> [se -vo driver lo supporta!]\n"
" -sub <file> specifica il file dei sottotitoli da usare (vedi anche -subfps, -subdelay)\n"
" -playlist <file> specifica il file della playlist\n"
" -vid x -aid y opzioni per selezionare il flusso video (x) ed audio (y) da riprodurre\n"
" -fps x -srate y opzioni per cambiare il rate del video (x fps) e dell\'audio (y Hz)\n"
" -pp <quality> abilita il filtro di postelaborazione (0-4 per DivX, 0-63 per mpegs)\n"
" -nobps usa il metodo di sincronizzazione A-V alternativo per i file AVI (può aiutare!)\n"
" -framedrop abilita lo scarto dei fotogrammi (per macchine lente)\n"
" -wid <window id> usa una finestra esistente per l\'uscita video (utile per plugger!)\n"
"\n"
"Tasti:\n"
" <- o -> va indietro/avanti di 10 secondi\n"
" su o giù va indietro/avanti di 1 minuto\n"
" < o > va indietro/avanti nella playlist\n"
" p o SPAZIO mette in pausa il filmato (premere un qualunque tasto per continuare)\n"
" q o ESC ferma la riproduzione ed esce dal programma\n"
" + o - regola il ritardo audio di +/- 0.1 secondi\n"
" o cambia tra le modalità OSD: niente / barra di ricerca / barra di ricerca + tempo\n"
" * o / incrementa o decrementa il volume (premere 'm' per selezionare master/pcm)\n"
" z o x regola il ritardo dei sottotitoli di +/- 0.1 secondi\n"
"\n"
" * * * VEDI LA PAGINA MAN PER DETTAGLI, ULTERIORI OPZIONI AVANZATE E TASTI ! * * *\n"
"\n";
#endif
// ========================= MPlayer messages ===========================
// mplayer.c:
#define MSGTR_Exiting "\nIn uscita... (%s)\n"
#define MSGTR_Exit_frames "Numero di fotogrammi riprodotti richiesti"
#define MSGTR_Exit_quit "Uscita"
#define MSGTR_Exit_eof "Fine del file"
#define MSGTR_Exit_error "Errore fatale"
#define MSGTR_IntBySignal "\nMPlayer interrotto dal segnale %d nel modulo: %s \n"
#define MSGTR_NoHomeDir "Impossibile trovare la HOME directory\n"
#define MSGTR_GetpathProblem "Problema in get_path(\"config\")\n"
#define MSGTR_CreatingCfgFile "Creo il file di configurazione: %s\n"
#define MSGTR_InvalidVOdriver "Nome del diver video di output non valido: %s\nUsa '-vo help' per avere una lista dei driver video disponibili.\n"
#define MSGTR_InvalidAOdriver "Nome del diver audio di output non valido: %s\nUsa '-ao help' per avere una lista dei driver audio disponibili.\n"
#define MSGTR_CopyCodecsConf "(copia/collega etc/codecs.conf (dall\'albero dei sorgenti di MPlayer) a ~/.mplayer/codecs.conf)\n"
#define MSGTR_CantLoadFont "Impossibile caricare i font: %s\n"
#define MSGTR_CantLoadSub "Impossibile caricare i sottotitoli: %s\n"
#define MSGTR_ErrorDVDkey "Errore di elaborazione della chiave del DVD.\n"
#define MSGTR_CmdlineDVDkey "La chiave del DVD richiesta nella riga di comando è immagazzinata per il descrambling.\n"
#define MSGTR_DVDauthOk "La sequenza di autorizzazione del DVD sembra essere corretta.\n"
#define MSGTR_DumpSelectedSteramMissing "dump: FATAL: manca il flusso selezionato!\n"
#define MSGTR_CantOpenDumpfile "Impossibile aprire il file di dump!!!\n"
#define MSGTR_CoreDumped "core dumped :)\n"
#define MSGTR_FPSnotspecified "FPS non specificato (o non valido) nell\'intestazione! Usa l\'opzione -fps !\n"
#define MSGTR_NoVideoStream "Mi dispiace, niente flusso video... Non si può ancora riprodurre\n"
#define MSGTR_TryForceAudioFmt "Cerco di forzare l\'uso della famiglia dei driver dei codec audio %d ...\n"
#define MSGTR_CantFindAfmtFallback "Impossibile trovare i codec audio per la famiglia dei driver richiesta, torno agli altri driver.\n"
#define MSGTR_CantFindAudioCodec "Impossibile trovare il codec per il formato audio 0x%X !\n"
#define MSGTR_TryUpgradeCodecsConfOrRTFM "*** Prova ad aggiornare %s da etc/codecs.conf\n*** Se non va ancora bene, allora leggi DOCS/codecs.html!\n"
#define MSGTR_CouldntInitAudioCodec "Impossibile inizializzare il codec audio! -> nessun suono\n"
#define MSGTR_TryForceVideoFmt "Cerco di forzare l\'uso della famiglia dei driver dei codec video %d ...\n"
#define MSGTR_CantFindVfmtFallback "Impossibile trovare i codec video per la famiglia dei driver richiesta, torno agli altri driver.\n"
#define MSGTR_CantFindVideoCodec "Impossibile trovare il codec per il formato video 0x%X !\n"
#define MSGTR_VOincompCodec "Mi dispiace, il dispositivo di video_out selezionato è incompatibile con questo codec.\n"
#define MSGTR_CouldntInitVideoCodec "FATAL: Impossibile inizializzare il codec video :(\n"
#define MSGTR_EncodeFileExists "Il file già esiste: %s (non sovrascrivere il tuo AVI preferito!)\n"
#define MSGTR_CantCreateEncodeFile "Impossibile creare il file per la codifica\n"
#define MSGTR_CannotInitVO "FATAL: Impossibile inizializzare il driver video!\n"
#define MSGTR_CannotInitAO "Impossibile aprire/inizializzare il dispositivo audio -> NESSUN SUONO\n"
#define MSGTR_StartPlaying "Inizio la riproduzione...\n"
#define MSGTR_SystemTooSlow "\n\n"\
" ***************************************************************\n"\
" **** Il tuo sistema è troppo lento per questa riproduzione! ***\n"\
" ***************************************************************\n"\
"!!! Possibili cause, problemi, soluzioni: \n"\
"- Nella maggior parte dei casi: driver audio corrotto/bacato. Soluzione: prova -ao sdl o usa\n"\
" ALSA 0.5 o l\'emulazione oss di ALSA 0.9. Leggi DOCS/sound.html per ulteriori suggerimenti!\n"\
"- Output video lento. Prova un differente -vo driver (per la lista completa: -vo help) o prova\n"\
" con -framedrop ! Leggi DOCS/video.html per suggerimenti sulla regolazione/accelerazione del video.\n"\
"- Cpu lenta. Non provare a riprodurre grossi dvd/divx su cpu lente! Prova -hardframedrop\n"\
"- File corrotto. Prova varie combinazioni di: -nobps -ni -mc 0 -forceidx\n"\
"Se il problema non è in nessuno di questi casi, allora leggi DOCS/bugreports.html !\n\n"
#define MSGTR_NoGui "MPlayer è stato compilato senza il supporto della GUI!\n"
#define MSGTR_GuiNeedsX "LA GUI di MPlayer richiede X11!\n"
#define MSGTR_Playing "In riproduzione %s\n"
#define MSGTR_NoSound "Audio: nessun suono!!!\n"
#define MSGTR_FPSforced "FPS forzato a %5.3f (ftime: %5.3f)\n"
// open.c, stream.c:
#define MSGTR_CdDevNotfound "Dispositivo CD-ROM '%s' non trovato!\n"
#define MSGTR_ErrTrackSelect "Errore nella selezione della traccia del VCD!"
#define MSGTR_ReadSTDIN "Leggo da stdin...\n"
#define MSGTR_UnableOpenURL "Impossibile aprire la URL: %s\n"
#define MSGTR_ConnToServer "Connesso al server: %s\n"
#define MSGTR_FileNotFound "File non trovato: '%s'\n"
#define MSGTR_CantOpenDVD "Impossibile aprire il dispositivo DVD: %s\n"
#define MSGTR_DVDwait "Leggo la struttura del disco, per favore aspetta...\n"
#define MSGTR_DVDnumTitles "Ci sono %d titoli su questo DVD.\n"
#define MSGTR_DVDinvalidTitle "Numero del titolo del DVD non valido: %d\n"
#define MSGTR_DVDnumChapters "Ci sono %d capitoli in questo titolo del DVD.\n"
#define MSGTR_DVDinvalidChapter "Numero del capitolo del DVD non valido: %d\n"
#define MSGTR_DVDnumAngles "Ci sono %d angolature in questo titolo del DVD.\n"
#define MSGTR_DVDinvalidAngle "Numero delle angolature del DVD non valido: %d\n"
#define MSGTR_DVDnoIFO "Impossibile aprire il file IFO per il titolo del DVD %d.\n"
#define MSGTR_DVDnoVOBs "Impossibile aprire il titolo VOBS (VTS_%02d_1.VOB).\n"
#define MSGTR_DVDopenOk "DVD aperto con successo!\n"
// demuxer.c, demux_*.c:
#define MSGTR_AudioStreamRedefined "Avvertimento! Intestazione del flusso audio %d ridefinito!\n"
#define MSGTR_VideoStreamRedefined "Avvertimento! Intestazione del flusso video %d ridefinito!\n"
#define MSGTR_TooManyAudioInBuffer "\nDEMUXER: Troppi (%d in %d byte) pacchetti audio nel buffer!\n"
#define MSGTR_TooManyVideoInBuffer "\nDEMUXER: Troppi (%d in %d byte) pacchetti video nel buffer!\n"
#define MSGTR_MaybeNI "(forse stai riproducendo un flusso/file non interlacciato o il codec non funziona)\n"
#define MSGTR_DetectedFLIfile "Rilevato formato file FLI !\n"
#define MSGTR_DetectedAVIfile "Rilevato formato file AVI !\n"
#define MSGTR_DetectedASFfile "Rilevato formato file ASF !\n"
#define MSGTR_DetectedMPEGPESfile "Rilevato formato file MPEG-PES !\n"
#define MSGTR_DetectedMPEGPSfile "Rilevato formato file MPEG-PS !\n"
#define MSGTR_DetectedMPEGESfile "Rilevato formato file MPEG-ES !\n"
#define MSGTR_DetectedQTMOVfile "Rilevato formato file QuickTime/MOV !\n"
#define MSGTR_MissingMpegVideo "Manca il flusso video MPEG!? Contatta l\'autore, può essere un baco :(\n"
#define MSGTR_InvalidMPEGES "Flusso MPEG-ES non valido??? Contatta l\'autore, può essere un baco :(\n"
#define MSGTR_FormatNotRecognized "===== Mi dispiace, questo formato file non è riconosciuto/supportato ======\n"\
"=== Se questo è un file AVI, ASF o MPEG, per favore contatta l\'autore! ===\n"
#define MSGTR_MissingVideoStream "Nessun flusso video trovato!\n"
#define MSGTR_MissingAudioStream "Nessun flusso audio trovato... ->nessun suono\n"
#define MSGTR_MissingVideoStreamBug "Manca il flusso video!? Contatta l\'autore, può essere un baco :(\n"
#define MSGTR_DoesntContainSelectedStream "demux: il file non contiene il flusso audio o video selezionato\n"
#define MSGTR_NI_Forced "Forzato"
#define MSGTR_NI_Detected "Rilevato"
#define MSGTR_NI_Message "%s formato file AVI NON-INTERLACCIATO!\n"
#define MSGTR_UsingNINI "Uso di formato file AVI NON-INTERLACCIATO corrotto!\n"
#define MSGTR_CouldntDetFNo "Impossibile determinare il numero di fotogrammi (per lo spostamento in valore assoluto) \n"
#define MSGTR_CantSeekRawAVI "Impossibile spostarsi nei flussi .AVI grezzi! (richiesto un indice, prova con l\'opzione -idx !) \n"
#define MSGTR_CantSeekFile "Impossibile spostarsi in questo file! \n"
#define MSGTR_EncryptedVOB "File VOB criptato (non compilato con il supporto delle libcss)! Leggi il file DOCS/cd-dvd.html\n"
#define MSGTR_EncryptedVOBauth "Flusso criptato di cui non è stata chiesta l\'autenticazione!\n"
#define MSGTR_MOVcomprhdr "MOV: Intestazioni compresse non (ancora) supportate!\n"
#define MSGTR_MOVvariableFourCC "MOV: Avvertimento! Rilevata variabile FOURCC !?\n"
#define MSGTR_MOVtooManyTrk "MOV: Avvertimento! troppe tracce!"
#define MSGTR_MOVnotyetsupp "\n****** Formato Quicktime MOV non ancora supportato!!!!!!! *******\n"
// dec_video.c & dec_audio.c:
#define MSGTR_CantOpenCodec "impossibile aprire il codec\n"
#define MSGTR_CantCloseCodec "impossibile chiudere il codec\n"
#define MSGTR_MissingDLLcodec "ERRORE: Impossibile aprire il codec DirectShow richiesto: %s\n"
#define MSGTR_ACMiniterror "Impossibile caricare/inizializzare il codec audio Win32/ACM (manca il file DLL ?)\n"
#define MSGTR_MissingLAVCcodec "Impossibile trovare il codec '%s' in libavcodec...\n"
#define MSGTR_NoDShowSupport "MPlayer è stato compilato SENZA il supporto per Directshow!\n"
#define MSGTR_NoWfvSupport "Supporto per i codec win32 disabilitato o non disponibile sulle piattaforme non-x86 !\n"
#define MSGTR_NoDivx4Support "MPlayer è stato compilato SENZA il supporto per DivX4Linux (libdivxdecore.so) !\n"
#define MSGTR_NoLAVCsupport "MPlayer è stato compilato SENZA il supporto per ffmpeg/libavcodec \n"
#define MSGTR_NoACMSupport "Audio codec Win32/ACM disabilitato o non disponibile sulle CPU non-x86 -> forzo a no audio :(\n"
#define MSGTR_NoDShowAudio "Compilato senza il supporto per DirectShow -> forzo a no audio :(\n"
#define MSGTR_NoOggVorbis "Audio codec OggVorbis disabilitato -> forzo a no audio :(\n"
#define MSGTR_NoXAnimSupport "MPlayer è stato compilato SENZA il supporto per XAnim !\n"
#define MSGTR_MpegPPhint "AVVERTIMENTO! Hai richiesto la postelaborazione dell\'immagine per un video MPEG 1/2, ma\n" \
" MPlayer è stato compilato senza il supporto per la postelaborazione MPEG 1/2 !\n" \
" #define MPEG12_POSTPROC in config.h, e ricompila libmpeg2!\n"
#define MSGTR_MpegNoSequHdr "MPEG: FATAL: EOF mentre cercavo la sequenza di intestazione\n"
#define MSGTR_CannotReadMpegSequHdr "FATAL: Impossibile leggere la sequenza di intestazione!\n"
#define MSGTR_CannotReadMpegSequHdrEx "FATAL: Impossibile leggere l\'estensione della sequenza di intestazione!\n"
#define MSGTR_BadMpegSequHdr "MPEG: Sequenza di intestazione non valida!\n"
#define MSGTR_BadMpegSequHdrEx "MPEG: Estensione della sequenza di intestazione non valida!\n"
#define MSGTR_ShMemAllocFail "Impossibile allocare la memoria condivisa\n"
#define MSGTR_CantAllocAudioBuf "Impossibile allocare il buffer di uscita dell\'audio\n"
#define MSGTR_NoMemForDecodedImage "memoria insufficiente per il buffer di decodifica dell\'immagine (%ld byte)\n"
#define MSGTR_AC3notvalid "Flusso AC3 non valido.\n"
#define MSGTR_AC3only48k "Supportati solo flussi a 48000 Hz.\n"
#define MSGTR_UnknownAudio "Formato audio sconosciuto/mancante, non uso l\'audio\n"
// LIRC:
#define MSGTR_SettingUpLIRC "Configurazione del supporto per lirc...\n"
#define MSGTR_LIRCdisabled "Non potrai usare il tuo telecomando\n"
#define MSGTR_LIRCopenfailed "Apertura del supporto per lirc fallita!\n"
#define MSGTR_LIRCsocketerr "C'è qualcosa che non va nel socket di lirc: %s\n"
#define MSGTR_LIRCcfgerr "Fallimento nella lettura del file di configurazione di LIRC %s !\n"
// ====================== GUI messages/buttons ========================
#ifdef HAVE_NEW_GUI
// --- labels ---
#define MSGTR_About "Informazioni su"
#define MSGTR_FileSelect "Seleziona il file ..."
#define MSGTR_SubtitleSelect "Seleziona il sottotitolo ..."
#define MSGTR_OtherSelect "Seleziona ..."
#define MSGTR_MessageBox "Finestra dei messaggi"
#define MSGTR_PlayList "PlayList"
#define MSGTR_SkinBrowser "Skin Browser"
// --- buttons ---
#define MSGTR_Ok "Ok"
#define MSGTR_Cancel "Annulla"
#define MSGTR_Add "Aggiungi"
#define MSGTR_Remove "Rimuovi"
// --- error messages ---
#define MSGTR_NEMDB "Mi dispiace, non c'è sufficiente memoria per il buffer di disegno."
#define MSGTR_NEMFMR "Mi dispiace, non c'è sufficiente memoria per visualizzare il menu."
#define MSGTR_NEMFMM "Mi dispiace, non c'è sufficiente memoria per la maschera della finestra principale."
// --- skin loader error messages
#define MSGTR_SKIN_ERRORMESSAGE "[skin] errore nel file di configurazione della skin nella riga %d: %s"
#define MSGTR_SKIN_WARNING1 "[skin] avvertimento nel file di configurazione della skin nella riga %d: widget trovato ma non trovato prima di \"section\" ( %s )"
#define MSGTR_SKIN_WARNING2 "[skin] avvertimento nel file di configurazione della skin nella riga %d: widget trovato ma non trovato prima di \"subsection\" (%s)"
#define MSGTR_SKIN_BITMAP_16bit "bitmap con profondità di 16 bit o inferiore non supportata ( %s ).\n"
#define MSGTR_SKIN_BITMAP_FileNotFound "file non trovato ( %s )\n"
#define MSGTR_SKIN_BITMAP_BMPReadError "bmp, errore di lettura ( %s )\n"
#define MSGTR_SKIN_BITMAP_TGAReadError "tga, errore di lettura ( %s )\n"
#define MSGTR_SKIN_BITMAP_PNGReadError "png, errore di lettura ( %s )\n"
#define MSGTR_SKIN_BITMAP_RLENotSupported "RLE packed tga non supportato ( %s )\n"
#define MSGTR_SKIN_BITMAP_UnknownFileType "tipo di file sconosciuto ( %s )\n"
#define MSGTR_SKIN_BITMAP_ConvertError "errore nella conversione da 24 bit a 32 bit ( %s )\n"
#define MSGTR_SKIN_BITMAP_UnknownMessage "messaggio sconosciuto: %s\n"
#define MSGTR_SKIN_FONT_NotEnoughtMemory "memoria insufficiente\n"
#define MSGTR_SKIN_FONT_TooManyFontsDeclared "dichiarati troppi font\n"
#define MSGTR_SKIN_FONT_FontFileNotFound "file dei font non trovato\n"
#define MSGTR_SKIN_FONT_FontImageNotFound "file delle immagini dei font non trovato\n"
#define MSGTR_SKIN_FONT_NonExistentFontID "identificatore del font inesistente ( %s )\n"
#define MSGTR_SKIN_UnknownParameter "parametro sconosciuto ( %s )\n"
#define MSGTR_SKINBROWSER_NotEnoughMemory "[skinbrowser] memoria insufficiente.\n"
#define MSGTR_SKIN_SKINCFG_SkinNotFound "Skin non trovata ( %s ).\n"
#define MSGTR_SKIN_SKINCFG_SkinCfgReadError "Errore nella lettura del file di configurazione della skin ( %s ).\n"
#define MSGTR_SKIN_LABEL "Skins:"
// --- gtk menus
#define MSGTR_MENU_AboutMPlayer "Informazione su MPlayer"
#define MSGTR_MENU_Open "Apri ..."
#define MSGTR_MENU_PlayFile "Riproduci il file ..."
#define MSGTR_MENU_PlayVCD "Riproduci il VCD ..."
#define MSGTR_MENU_PlayDVD "Riproduci il DVD ..."
#define MSGTR_MENU_PlayURL "Riproduci la URL ..."
#define MSGTR_MENU_LoadSubtitle "Carica i sottotitoli ..."
#define MSGTR_MENU_Playing "Riproduzione"
#define MSGTR_MENU_Play "Riproduci"
#define MSGTR_MENU_Pause "Pausa"
#define MSGTR_MENU_Stop "Interrompi"
#define MSGTR_MENU_NextStream "Stream successivo"
#define MSGTR_MENU_PrevStream "Stream precedente"
#define MSGTR_MENU_Size "Dimensione"
#define MSGTR_MENU_NormalSize "Dimensione normale"
#define MSGTR_MENU_DoubleSize "Dimensione doppia"
#define MSGTR_MENU_FullScreen "Schermo intero"
#define MSGTR_MENU_DVD "DVD"
#define MSGTR_MENU_PlayDisc "Disco in riproduzione..."
#define MSGTR_MENU_ShowDVDMenu "Mostra il menu del DVD"
#define MSGTR_MENU_Titles "Titoli"
#define MSGTR_MENU_Title "Titolo %2d"
#define MSGTR_MENU_None "(niente)"
#define MSGTR_MENU_Chapters "Capitoli"
#define MSGTR_MENU_Chapter "Capitolo %2d"
#define MSGTR_MENU_AudioLanguages "Lingua dell\'audio"
#define MSGTR_MENU_SubtitleLanguages "Lingua dei sottotitoli"
#define MSGTR_MENU_PlayList "Playlist"
#define MSGTR_MENU_SkinBrowser "Skin browser"
#define MSGTR_MENU_Preferences "Preferenze"
#define MSGTR_MENU_Exit "Uscita ..."
// --- messagebox
#define MSGTR_MSGBOX_LABEL_FatalError "errore fatale ..."
#define MSGTR_MSGBOX_LABEL_Error "errore ..."
#define MSGTR_MSGBOX_LABEL_Warning "avvertimento ..."
#endif
1
0
CVS: main/DOCS documentation.html,1.157,1.158 encoding.html,1.19,1.20 mplayer.1,1.123,1.124
by Winner of tha face compo 31 Dec '01
by Winner of tha face compo 31 Dec '01
31 Dec '01
Update of /cvsroot/mplayer/main/DOCS
In directory mplayer:/var/tmp.root/cvs-serv2979
Modified Files:
documentation.html encoding.html mplayer.1
Log Message:
stuff.
Index: documentation.html
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/documentation.html,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -r1.157 -r1.158
--- documentation.html 30 Dec 2001 16:43:08 -0000 1.157
+++ documentation.html 31 Dec 2001 01:12:54 -0000 1.158
@@ -494,6 +494,11 @@
make
make install</PRE>
+<P>At this point, <B>MPlayer</B> is ready to use. The directory
+<CODE>/usr/local/share/mplayer</CODE> contains the <CODE>codecs.conf</CODE>
+file, which is used to tell the program all the codecs and their capabilities.
+This file should always be kept uptodate together with the main binary !</P>
+
<P><B>Debian users</B> can build a .deb package for themselves, it's very
simple. Just exec <CODE>fakeroot debian/rules binary</CODE> in <B>MPlayer</B>'s
root dir. Detailed instructions can be found <A HREF="documentation.html#6.1">here</A>.</P>
@@ -511,11 +516,6 @@
cd ~/.mplayer/font
unzip mp-arial-iso-8859-1.zip</PRE>
-<P>Only one thing remains: copy the <B>codecs.conf</B> file from the <CODE>etc</CODE>
-directory (relative to the <B>MPlayer</B> tree) to <CODE>$HOME/.mplayer/codecs.conf</CODE> .
-You should also check the manpage and <CODE>example.conf</CODE> for available options, and insert them
-into your config file, <CODE>$HOME/.mplayer/config</CODE> .</P>
-
<P><B><A NAME=1.4>1.4. What about the GUI?</A></B></P>
@@ -530,6 +530,9 @@
and call <CODE>gmplayer</CODE> instead.
</UL>
</P>
+
+<P>HINT: use the middle button (on 2 button mice press left and right
+simultaneously) for a popup GTK menu, with DVD playing option!</P>
<P>As <B>MPlayer</B> doesn't have a skin included, you have to download them
if you want to use the GUI. See the <A HREF="http://www.mplayerhq.hu/homepage/dload.html">download page</A>.
Index: encoding.html
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/encoding.html,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- encoding.html 28 Dec 2001 22:14:06 -0000 1.19
+++ encoding.html 31 Dec 2001 01:12:54 -0000 1.20
@@ -101,7 +101,7 @@
AVI (DivX) files, you have be aware that AVI headers don't store this
value. Thus, the only solution is rescaling.</P>
-<P><B>MEncoder can scale input images if they come in YV12 format (for example:
+<P><B>MEncoder</B> can scale input images if they come in YV12 format (for example:
ffdivx, odivx drivers, or mpeg1/2). The output size is specified with the
<CODE>-x</CODE>, and <CODE>-y</CODE> options. Furthermore, there are 3
rescaling filters in <B>MEncoder</B>, <I>0
@@ -141,9 +141,9 @@
<P><B><A NAME=2.4.3.5>2.4.3.5. Encoding with the <I>libavcodec</I> codec family</B></P>
-<P>libavcodec provides simple encoding to a lot of interesting video and audio
-formats (currently its audio codecs are unsupported). You can encode to the
-following codecs :</P>
+<P><A HREF="codecs.html#2.2.1.2">libavcodec</A> also provides simple encoding
+to a lot of interesting video and audio formats (currently its audio codecs are
+unsupported by us). Currently you can encode to the following codecs :</P>
<P>
<UL>
@@ -159,6 +159,9 @@
<P>The first column contains the codec names that should be passed after the
<CODE>vcodec</CODE> config, like : <CODE>-lavcopts vcodec=msmpeg4</CODE></P>
+
+<P>An example, with MJPEG compression :<BR>
+ <CODE> mencoder -dvd 2 -o title2.avi -ovc lavc -lavcopts vcodec=mjpeg -ffourcc mjpg</CODE></P>
<P><B><A NAME=2.4.4>2.4.4. Syntax</B></P>
Index: mplayer.1
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/mplayer.1,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -r1.123 -r1.124
--- mplayer.1 28 Dec 2001 21:23:44 -0000 1.123
+++ mplayer.1 31 Dec 2001 01:12:54 -0000 1.124
@@ -101,6 +101,7 @@
.RB [ \-tv\ suboptions ]
.RB [ \-dapsync ]
.RB [ \-softsleep ]
+.RB [ \-rootwin ]
.I < - | file | URL | device >
.PP
.SH DESCRIPTION
@@ -312,6 +313,10 @@
.B \-tv\ suboptions
this option enables the TV grabbing feature of MPlayer. For complete
documentation, please see documentation.html chapter 2.5
+.TP
+.B \-rootwin
+play movie in the root window (desktop background) instead of opening
+a new one. Works only with the xv and xmga drivers.
.IP
.SH "ADVANCED OPTIONS"
.TP
1
0
CVS: main/DOCS/Hungarian documentation.html,1.90,1.91 encoding.html,1.10,1.11 mplayer.1,1.23,1.24
by Winner of tha face compo 31 Dec '01
by Winner of tha face compo 31 Dec '01
31 Dec '01
Update of /cvsroot/mplayer/main/DOCS/Hungarian
In directory mplayer:/var/tmp.root/cvs-serv2979/Hungarian
Modified Files:
documentation.html encoding.html mplayer.1
Log Message:
stuff.
Index: documentation.html
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/Hungarian/documentation.html,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -r1.90 -r1.91
--- documentation.html 30 Dec 2001 16:43:09 -0000 1.90
+++ documentation.html 31 Dec 2001 01:12:55 -0000 1.91
@@ -514,6 +514,12 @@
make
make install</PRE>
+<P>Innentõl használatra kész állapotban van az <B>MPlayer</B>. Az
+<CODE>/usr/local/share/mplayer</CODE> könyvtár tartalmazza a
+<CODE>codecs.conf</CODE> file-t, ami megmondja a programnak a használható
+codec-eket és azok tulajdonságait. Ezt a file-t mindig az <B>MPlayer</B>-rel
+együtt kell frissíteni !</P>
+
<P><B>Debian felhasználók</B> egyszerûen készíthetnek .deb csomagot maguknak,
csak a <CODE>fakeroot debian/rules binary</CODE> parancsot kell beírniuk az
<B>MPlayer</B> forrás gyökérkönyvtárában. Részletes információ <A
@@ -551,6 +557,10 @@
<LI><CODE>ln -s /usr/local/bin/mplayer /usr/local/bin/gmplayer</CODE> ,
és a <CODE>gmplayer</CODE> file-t indítsd.
</UL>
+
+<P>TIPP: az egér középsõ gombjának megnyomása (2 gombos egereken a bal és
+jobb gombok együttes megnyomása) egy GTK-s menût hoz elõ, amiben megtalálható
+a DVD lejátszás is.</P>
<P>Mivel az <B>MPlayer</B> alapban nem tartalmaz skineket, ezeket külön kell
letöltened. Lásd <A HREF="http://www.mplayerhq.hu/homepage/dload.html">itt</A>.
Index: encoding.html
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/Hungarian/encoding.html,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- encoding.html 28 Dec 2001 22:14:18 -0000 1.10
+++ encoding.html 31 Dec 2001 01:12:55 -0000 1.11
@@ -152,9 +152,9 @@
<P><B><A NAME=2.4.3.5>2.4.3.5. Enkódolás a <I>libavcodec</I> codec-ekkel</B></P>
-<P>A libavcodec-kel egyszerûen lehet kódolni jónéhány érdekes video és
-audio formátumba (jelenleg az audio codec-ek nem támogatottak). A következõ
-codec-ekkel lehet enkódolni :</P>
+<P>A <A HREF="codecs.html#2.2.1.2">libavcodec</A>-kel egyszerûen lehet kódolni
+jónéhány érdekes video és audio formátumba (jelenleg az audio codec-ek nem
+támogatottak). A következõ codec-ekkel lehet enkódolni :</P>
<P>
<UL>
Index: mplayer.1
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/Hungarian/mplayer.1,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- mplayer.1 28 Dec 2001 21:23:45 -0000 1.23
+++ mplayer.1 31 Dec 2001 01:12:55 -0000 1.24
@@ -90,6 +90,7 @@
.RB [ \-mixer\ <eszköz> ]
.RB [ \-master\ igen/nem ]
.RB [ \-tv\ alopciók ]
+.RB [ \-rootwin ]
.I - vagy file vagy eszköz
.PP
.SH LEÍRÁS
@@ -301,6 +302,10 @@
.B \-tv\ alopciók
Ez az opció TV-nézõ üzemmódba kapcsolja az MPlayer-t. A további dokumentáció
a documentation.html file 2.5-ös fejezetében található.
+.TP
+.B \-rootwin
+külön ablak helyett a root ablakban (a háttérben) fog zajlani a lejátszás.
+Csak xv és xmga meghajtókkal mûködik.
.IP
.SH "HALADÓSZINTÛ OPCIÓK"
.TP
1
0
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv26063
Modified Files:
dec_audio.c
Log Message:
a52 resampler init moved to init
Index: dec_audio.c
===================================================================
RCS file: /cvsroot/mplayer/main/dec_audio.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- dec_audio.c 30 Dec 2001 20:42:49 -0000 1.72
+++ dec_audio.c 30 Dec 2001 21:55:58 -0000 1.73
@@ -37,6 +37,7 @@
static sample_t * a52_samples;
static a52_state_t a52_state;
static uint32_t a52_accel=0;
+static uint32_t a52_flags=0;
#ifdef USE_G72X
#include "g72x/g72x.h"
@@ -537,6 +538,8 @@
break;
}
case AFM_A52: {
+ sample_t level=1, bias=384;
+ int flags=0;
// Dolby AC3 audio:
if(gCpuCaps.hasSSE) a52_accel|=MM_ACCEL_X86_SSE;
if(gCpuCaps.hasMMX) a52_accel|=MM_ACCEL_X86_MMX;
@@ -558,7 +561,30 @@
sh_audio->channels=a52_printinfo(sh_audio);
if(audio_output_channels<sh_audio->channels)
sh_audio->channels=audio_output_channels;
-
+ // channels setup:
+ switch(sh_audio->channels){
+ case 1: a52_flags=A52_MONO; break;
+// case 2: a52_flags=A52_STEREO; break;
+ case 2: a52_flags=A52_DOLBY; break;
+// case 3: a52_flags=A52_3F; break;
+ case 3: a52_flags=A52_2F1R; break;
+ case 4: a52_flags=A52_2F2R; break; // 2+2
+ case 5: a52_flags=A52_3F2R; break;
+ case 6: a52_flags=A52_3F2R|A52_LFE; break; // 5.1
+ }
+ // test:
+ flags=a52_flags|A52_ADJUST_LEVEL;
+ mp_msg(MSGT_DECAUDIO,MSGL_V,"A52 flags before a52_frame: 0x%X\n",flags);
+ if (a52_frame (&a52_state, sh_audio->a_in_buffer, &flags, &level, bias)){
+ mp_msg(MSGT_DECAUDIO,MSGL_ERR,"a52: error decoding frame -> nosound\n");
+ driver=0;break;
+ }
+ mp_msg(MSGT_DECAUDIO,MSGL_V,"A52 flags after a52_frame: 0x%X\n",flags);
+ // frame decoded, let's init resampler:
+ if(!a52_resample_init(a52_accel,flags,sh_audio->channels)){
+ mp_msg(MSGT_DECAUDIO,MSGL_ERR,"a52: no resampler. try different channel setup!\n");
+ driver=0;break;
+ }
break;
}
case AFM_HWAC3: {
@@ -1119,23 +1145,11 @@
break;
#endif
case AFM_A52: { // AC3 decoder
- int flags=0;
- int i;
sample_t level=1, bias=384;
+ int flags=a52_flags|A52_ADJUST_LEVEL;
+ int i;
if(!sh_audio->a_in_buffer_len)
if(a52_fillbuff(sh_audio)<0) break; // EOF
-
- switch(sh_audio->channels){
- case 1: flags=A52_MONO; break;
-// case 2: flags=A52_STEREO; break;
- case 2: flags=A52_DOLBY; break;
-// case 3: flags=A52_3F; break;
- case 3: flags=A52_2F1R; break;
- case 4: flags=A52_2F2R; break; // 2+2
- case 5: flags=A52_3F2R; break;
- case 6: flags=A52_3F2R|A52_LFE; break; // 5.1
- }
- flags|=A52_ADJUST_LEVEL;
sh_audio->a_in_buffer_len=0;
if (a52_frame (&a52_state, sh_audio->a_in_buffer, &flags, &level, bias)){
mp_msg(MSGT_DECAUDIO,MSGL_WARN,"a52: error decoding frame\n");
@@ -1144,7 +1158,7 @@
// a52_dynrng (&state, NULL, NULL); // disable dynamic range compensation
// frame decoded, let's resample:
- a52_resample_init(a52_accel,flags,sh_audio->channels);
+ //a52_resample_init(a52_accel,flags,sh_audio->channels);
len=0;
for (i = 0; i < 6; i++) {
if (a52_block (&a52_state, a52_samples)){
1
0
CVS: main/liba52 downmix.c,1.12,1.13 parse.c,1.1,1.2 a52_internal.h,1.2,1.3
by Michael Niedermayer 30 Dec '01
by Michael Niedermayer 30 Dec '01
30 Dec '01
Update of /cvsroot/mplayer/main/liba52
In directory mplayer:/var/tmp.root/cvs-serv25366
Modified Files:
downmix.c parse.c a52_internal.h
Log Message:
runtime cpudetect the liba52 way part 2 (downmix.c)
Index: downmix.c
===================================================================
RCS file: /cvsroot/mplayer/main/liba52/downmix.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- downmix.c 30 Dec 2001 19:57:14 -0000 1.12
+++ downmix.c 30 Dec 2001 21:53:56 -0000 1.13
@@ -24,18 +24,16 @@
*/
#include "config.h"
-#include "../cpudetect.h"
#include <string.h>
#include <inttypes.h>
#include "a52.h"
#include "a52_internal.h"
+#include "mm_accel.h"
#define CONVERT(acmod,output) (((output) << 3) + (acmod))
-//#undef HAVE_SSE
-//#undef HAVE_MMX
void (*downmix)(sample_t * samples, int acmod, int output, sample_t bias,
sample_t clev, sample_t slev)= NULL;
@@ -47,7 +45,17 @@
sample_t clev, sample_t slev);
static void upmix_MMX (sample_t * samples, int acmod, int output);
static void upmix_C (sample_t * samples, int acmod, int output);
-
+
+void downmix_accel_init(uint32_t mm_accel)
+{
+ upmix= upmix_C;
+ downmix= downmix_C;
+#ifdef ARCH_X86
+ if(mm_accel & MM_ACCEL_X86_MMX) upmix= upmix_MMX;
+ if(mm_accel & MM_ACCEL_X86_SSE) downmix= downmix_SSE;
+#endif
+}
+
int downmix_init (int input, int flags, sample_t * level,
sample_t clev, sample_t slev)
{
@@ -76,13 +84,6 @@
A52_DOLBY, A52_DOLBY, A52_DOLBY, A52_DOLBY}
};
int output;
-
- upmix= upmix_C;
- downmix= downmix_C;
-#ifdef ARCH_X86
- if(gCpuCaps.hasMMX) upmix= upmix_MMX;
- if(gCpuCaps.hasSSE) downmix= downmix_SSE;
-#endif
output = flags & A52_CHANNEL_MASK;
if (output > A52_DOLBY)
Index: parse.c
===================================================================
RCS file: /cvsroot/mplayer/main/liba52/parse.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- parse.c 9 Dec 2001 15:28:44 -0000 1.1
+++ parse.c 30 Dec 2001 21:53:56 -0000 1.2
@@ -57,6 +57,7 @@
int i;
imdct_init (mm_accel);
+ downmix_accel_init(mm_accel);
samples = memalign (16, 256 * 12 * sizeof (sample_t));
if (samples == NULL)
Index: a52_internal.h
===================================================================
RCS file: /cvsroot/mplayer/main/liba52/a52_internal.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- a52_internal.h 30 Dec 2001 19:57:14 -0000 1.2
+++ a52_internal.h 30 Dec 2001 21:53:56 -0000 1.3
@@ -43,6 +43,7 @@
int downmix_init (int input, int flags, sample_t * level,
sample_t clev, sample_t slev);
+void downmix_accel_init(uint32_t mm_accel);
int downmix_coeff (sample_t * coeff, int acmod, int output, sample_t level,
sample_t clev, sample_t slev);
extern void (*downmix) (sample_t * samples, int acmod, int output, sample_t bias,
1
0
CVS: main/liba52 resample.c,1.13,1.14 resample_c.c,1.13,1.14 resample_mmx.c,1.13,1.14 a52.h,1.4,1.5
by Arpi of Ize 30 Dec '01
by Arpi of Ize 30 Dec '01
30 Dec '01
Update of /cvsroot/mplayer/main/liba52
In directory mplayer:/var/tmp.root/cvs-serv23636
Modified Files:
resample.c resample_c.c resample_mmx.c a52.h
Log Message:
c, mmx versions separated. a52 style runtime stuff
Index: resample.c
===================================================================
RCS file: /cvsroot/mplayer/main/liba52/resample.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- resample.c 30 Dec 2001 21:38:53 -0000 1.13
+++ resample.c 30 Dec 2001 21:44:10 -0000 1.14
@@ -1,20 +1,9 @@
-// this code come from a52dec/libao/audio_out_oss.c
-
-// FIXME FIXME FIXME
// a52_resample_init should find the requested converter (from type flags ->
// given number of channels) and set up some function pointers...
// a52_resample() should do the conversion.
-// MMX optimizations from Michael Niedermayer (michaelni(a)gmx.at) (under GPL)
-
-/* optimization TODO / NOTES
- movntq is slightly faster (0.5% with the current test.c benchmark)
- (but thats just test.c so that needs to be testd in reallity)
- and it would mean (C / MMX2 / MMX / 3DNOW) versions
-*/
-
#include <inttypes.h>
#include <stdio.h>
#include "a52.h"
@@ -23,584 +12,33 @@
int (* a52_resample) (float * _f, int16_t * s16)=NULL;
+#include "resample_c.c"
+
#ifdef ARCH_X86
-static uint64_t __attribute__((aligned(8))) magicF2W= 0x43c0000043c00000LL;
-static uint64_t __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000LL;
-static uint64_t __attribute__((aligned(8))) wm0101= 0x0000FFFF0000FFFFLL;
-static uint64_t __attribute__((aligned(8))) wm1100= 0xFFFFFFFF00000000LL;
+#include "resample_mmx.c"
#endif
-static inline int16_t convert (int32_t i)
-{
- if (i > 0x43c07fff)
- return 32767;
- else if (i < 0x43bf8000)
- return -32768;
- else
- return i - 0x43c00000;
-}
-
-static int chans=2;
-static int flags=0;
-
-int a52_resample_C(float * _f, int16_t * s16)
-{
- int i;
- int32_t * f = (int32_t *) _f;
-
- switch (flags) {
- case A52_MONO:
- for (i = 0; i < 256; i++) {
- s16[5*i] = s16[5*i+1] = s16[5*i+2] = s16[5*i+3] = 0;
- s16[5*i+4] = convert (f[i]);
- }
- break;
- case A52_CHANNEL:
- case A52_STEREO:
- case A52_DOLBY:
- for (i = 0; i < 256; i++) {
- s16[2*i] = convert (f[i]);
- s16[2*i+1] = convert (f[i+256]);
- }
- break;
- case A52_3F:
- for (i = 0; i < 256; i++) {
- s16[5*i] = convert (f[i]);
- s16[5*i+1] = convert (f[i+512]);
- s16[5*i+2] = s16[5*i+3] = 0;
- s16[5*i+4] = convert (f[i+256]);
- }
- break;
- case A52_2F2R:
- for (i = 0; i < 256; i++) {
- s16[4*i] = convert (f[i]);
- s16[4*i+1] = convert (f[i+256]);
- s16[4*i+2] = convert (f[i+512]);
- s16[4*i+3] = convert (f[i+768]);
- }
- break;
- case A52_3F2R:
- for (i = 0; i < 256; i++) {
- s16[5*i] = convert (f[i]);
- s16[5*i+1] = convert (f[i+512]);
- s16[5*i+2] = convert (f[i+768]);
- s16[5*i+3] = convert (f[i+1024]);
- s16[5*i+4] = convert (f[i+256]);
- }
- break;
- case A52_MONO | A52_LFE:
- for (i = 0; i < 256; i++) {
- s16[6*i] = s16[6*i+1] = s16[6*i+2] = s16[6*i+3] = 0;
- s16[6*i+4] = convert (f[i+256]);
- s16[6*i+5] = convert (f[i]);
- }
- break;
- case A52_CHANNEL | A52_LFE:
- case A52_STEREO | A52_LFE:
- case A52_DOLBY | A52_LFE:
- for (i = 0; i < 256; i++) {
- s16[6*i] = convert (f[i+256]);
- s16[6*i+1] = convert (f[i+512]);
- s16[6*i+2] = s16[6*i+3] = s16[6*i+4] = 0;
- s16[6*i+5] = convert (f[i]);
- }
- break;
- case A52_3F | A52_LFE:
- for (i = 0; i < 256; i++) {
- s16[6*i] = convert (f[i+256]);
- s16[6*i+1] = convert (f[i+768]);
- s16[6*i+2] = s16[6*i+3] = 0;
- s16[6*i+4] = convert (f[i+512]);
- s16[6*i+5] = convert (f[i]);
- }
- break;
- case A52_2F2R | A52_LFE:
- for (i = 0; i < 256; i++) {
- s16[6*i] = convert (f[i+256]);
- s16[6*i+1] = convert (f[i+512]);
- s16[6*i+2] = convert (f[i+768]);
- s16[6*i+3] = convert (f[i+1024]);
- s16[6*i+4] = 0;
- s16[6*i+5] = convert (f[i]);
- }
- break;
- case A52_3F2R | A52_LFE:
- for (i = 0; i < 256; i++) {
- s16[6*i] = convert (f[i+256]);
- s16[6*i+1] = convert (f[i+768]);
- s16[6*i+2] = convert (f[i+1024]);
- s16[6*i+3] = convert (f[i+1280]);
- s16[6*i+4] = convert (f[i+512]);
- s16[6*i+5] = convert (f[i]);
- }
- break;
- }
- return chans*256;
-}
+void* a52_resample_init(uint32_t mm_accel,int flags,int chans){
+void* tmp;
#ifdef ARCH_X86
-int a52_resample_MMX(float * _f, int16_t * s16)
-{
- int i;
- int32_t * f = (int32_t *) _f;
-
- switch (flags) {
- case A52_MONO:
- asm volatile(
- "movl $-512, %%esi \n\t"
- "movq magicF2W, %%mm7 \n\t"
- "movq wm1100, %%mm3 \n\t"
- "movq wm0101, %%mm4 \n\t"
- "movq wm1010, %%mm5 \n\t"
- "pxor %%mm6, %%mm6 \n\t"
- "1: \n\t"
- "movq (%1, %%esi, 2), %%mm0 \n\t"
- "movq 8(%1, %%esi, 2), %%mm1 \n\t"
- "leal (%%esi, %%esi, 4), %%edi \n\t"
- "psubd %%mm7, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "packssdw %%mm1, %%mm0 \n\t"
- "movq %%mm0, %%mm1 \n\t"
- "pand %%mm4, %%mm0 \n\t"
- "pand %%mm5, %%mm1 \n\t"
- "movq %%mm6, (%0, %%edi) \n\t" // 0 0 0 0
- "movd %%mm0, 8(%0, %%edi) \n\t" // A 0
- "pand %%mm3, %%mm0 \n\t"
- "movd %%mm6, 12(%0, %%edi) \n\t" // 0 0
- "movd %%mm1, 16(%0, %%edi) \n\t" // 0 B
- "pand %%mm3, %%mm1 \n\t"
- "movd %%mm6, 20(%0, %%edi) \n\t" // 0 0
- "movq %%mm0, 24(%0, %%edi) \n\t" // 0 0 C 0
- "movq %%mm1, 32(%0, %%edi) \n\t" // 0 0 0 B
- "addl $8, %%esi \n\t"
- " jnz 1b \n\t"
- "emms \n\t"
- :: "r" (s16+1280), "r" (f+256)
- :"%esi", "%edi", "memory"
- );
- break;
- case A52_CHANNEL:
- case A52_STEREO:
- case A52_DOLBY:
-/* benchmark scores are 0.3% better with SSE but we would need to set bias=0 and premultiply it
-#ifdef HAVE_SSE
- asm volatile(
- "movl $-1024, %%esi \n\t"
- "1: \n\t"
- "cvtps2pi (%1, %%esi), %%mm0 \n\t"
- "cvtps2pi 1024(%1, %%esi), %%mm2\n\t"
- "movq %%mm0, %%mm1 \n\t"
- "punpcklwd %%mm2, %%mm0 \n\t"
- "punpckhwd %%mm2, %%mm1 \n\t"
- "movq %%mm0, (%0, %%esi) \n\t"
- "movq %%mm1, 8(%0, %%esi) \n\t"
- "addl $16, %%esi \n\t"
- " jnz 1b \n\t"
- "emms \n\t"
- :: "r" (s16+512), "r" (f+256)
- :"%esi", "memory"
- );*/
- asm volatile(
- "movl $-1024, %%esi \n\t"
- "movq magicF2W, %%mm7 \n\t"
- "1: \n\t"
- "movq (%1, %%esi), %%mm0 \n\t"
- "movq 8(%1, %%esi), %%mm1 \n\t"
- "movq 1024(%1, %%esi), %%mm2 \n\t"
- "movq 1032(%1, %%esi), %%mm3 \n\t"
- "psubd %%mm7, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "psubd %%mm7, %%mm2 \n\t"
- "psubd %%mm7, %%mm3 \n\t"
- "packssdw %%mm1, %%mm0 \n\t"
- "packssdw %%mm3, %%mm2 \n\t"
- "movq %%mm0, %%mm1 \n\t"
- "punpcklwd %%mm2, %%mm0 \n\t"
- "punpckhwd %%mm2, %%mm1 \n\t"
- "movq %%mm0, (%0, %%esi) \n\t"
- "movq %%mm1, 8(%0, %%esi) \n\t"
- "addl $16, %%esi \n\t"
- " jnz 1b \n\t"
- "emms \n\t"
- :: "r" (s16+512), "r" (f+256)
- :"%esi", "memory"
- );
- break;
- case A52_3F:
- asm volatile(
- "movl $-1024, %%esi \n\t"
- "movq magicF2W, %%mm7 \n\t"
- "pxor %%mm6, %%mm6 \n\t"
- "movq %%mm7, %%mm5 \n\t"
- "punpckldq %%mm6, %%mm5 \n\t"
- "1: \n\t"
- "movd (%1, %%esi), %%mm0 \n\t"
- "punpckldq 2048(%1, %%esi), %%mm0\n\t"
- "movd 1024(%1, %%esi), %%mm1 \n\t"
- "punpckldq 4(%1, %%esi), %%mm1 \n\t"
- "movd 2052(%1, %%esi), %%mm2 \n\t"
- "movq %%mm7, %%mm3 \n\t"
- "punpckldq 1028(%1, %%esi), %%mm3\n\t"
- "movd 8(%1, %%esi), %%mm4 \n\t"
- "punpckldq 2056(%1, %%esi), %%mm4\n\t"
- "leal (%%esi, %%esi, 4), %%edi \n\t"
- "sarl $1, %%edi \n\t"
- "psubd %%mm7, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "psubd %%mm5, %%mm2 \n\t"
- "psubd %%mm7, %%mm3 \n\t"
- "psubd %%mm7, %%mm4 \n\t"
- "packssdw %%mm6, %%mm0 \n\t"
- "packssdw %%mm2, %%mm1 \n\t"
- "packssdw %%mm4, %%mm3 \n\t"
- "movq %%mm0, (%0, %%edi) \n\t"
- "movq %%mm1, 8(%0, %%edi) \n\t"
- "movq %%mm3, 16(%0, %%edi) \n\t"
-
- "movd 1032(%1, %%esi), %%mm1 \n\t"
- "punpckldq 12(%1, %%esi), %%mm1\n\t"
- "movd 2060(%1, %%esi), %%mm2 \n\t"
- "movq %%mm7, %%mm3 \n\t"
- "punpckldq 1036(%1, %%esi), %%mm3\n\t"
- "pxor %%mm0, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "psubd %%mm5, %%mm2 \n\t"
- "psubd %%mm7, %%mm3 \n\t"
- "packssdw %%mm1, %%mm0 \n\t"
- "packssdw %%mm3, %%mm2 \n\t"
- "movq %%mm0, 24(%0, %%edi) \n\t"
- "movq %%mm2, 32(%0, %%edi) \n\t"
-
- "addl $16, %%esi \n\t"
- " jnz 1b \n\t"
- "emms \n\t"
- :: "r" (s16+1280), "r" (f+256)
- :"%esi", "%edi", "memory"
- );
- break;
- case A52_2F2R:
- asm volatile(
- "movl $-1024, %%esi \n\t"
- "movq magicF2W, %%mm7 \n\t"
- "1: \n\t"
- "movq (%1, %%esi), %%mm0 \n\t"
- "movq 8(%1, %%esi), %%mm1 \n\t"
- "movq 1024(%1, %%esi), %%mm2 \n\t"
- "movq 1032(%1, %%esi), %%mm3 \n\t"
- "psubd %%mm7, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "psubd %%mm7, %%mm2 \n\t"
- "psubd %%mm7, %%mm3 \n\t"
- "packssdw %%mm1, %%mm0 \n\t"
- "packssdw %%mm3, %%mm2 \n\t"
- "movq 2048(%1, %%esi), %%mm3 \n\t"
- "movq 2056(%1, %%esi), %%mm4 \n\t"
- "movq 3072(%1, %%esi), %%mm5 \n\t"
- "movq 3080(%1, %%esi), %%mm6 \n\t"
- "psubd %%mm7, %%mm3 \n\t"
- "psubd %%mm7, %%mm4 \n\t"
- "psubd %%mm7, %%mm5 \n\t"
- "psubd %%mm7, %%mm6 \n\t"
- "packssdw %%mm4, %%mm3 \n\t"
- "packssdw %%mm6, %%mm5 \n\t"
- "movq %%mm0, %%mm1 \n\t"
- "movq %%mm3, %%mm4 \n\t"
- "punpcklwd %%mm2, %%mm0 \n\t"
- "punpckhwd %%mm2, %%mm1 \n\t"
- "punpcklwd %%mm5, %%mm3 \n\t"
- "punpckhwd %%mm5, %%mm4 \n\t"
- "movq %%mm0, %%mm2 \n\t"
- "movq %%mm1, %%mm5 \n\t"
- "punpckldq %%mm3, %%mm0 \n\t"
- "punpckhdq %%mm3, %%mm2 \n\t"
- "punpckldq %%mm4, %%mm1 \n\t"
- "punpckhdq %%mm4, %%mm5 \n\t"
- "movq %%mm0, (%0, %%esi,2) \n\t"
- "movq %%mm2, 8(%0, %%esi,2) \n\t"
- "movq %%mm1, 16(%0, %%esi,2) \n\t"
- "movq %%mm5, 24(%0, %%esi,2) \n\t"
- "addl $16, %%esi \n\t"
- " jnz 1b \n\t"
- "emms \n\t"
- :: "r" (s16+1024), "r" (f+256)
- :"%esi", "memory"
- );
- break;
- case A52_3F2R:
- asm volatile(
- "movl $-1024, %%esi \n\t"
- "movq magicF2W, %%mm7 \n\t"
- "1: \n\t"
- "movd (%1, %%esi), %%mm0 \n\t"
- "punpckldq 2048(%1, %%esi), %%mm0\n\t"
- "movd 3072(%1, %%esi), %%mm1 \n\t"
- "punpckldq 4096(%1, %%esi), %%mm1\n\t"
- "movd 1024(%1, %%esi), %%mm2 \n\t"
- "punpckldq 4(%1, %%esi), %%mm2 \n\t"
- "movd 2052(%1, %%esi), %%mm3 \n\t"
- "punpckldq 3076(%1, %%esi), %%mm3\n\t"
- "movd 4100(%1, %%esi), %%mm4 \n\t"
- "punpckldq 1028(%1, %%esi), %%mm4\n\t"
- "movd 8(%1, %%esi), %%mm5 \n\t"
- "punpckldq 2056(%1, %%esi), %%mm5\n\t"
- "leal (%%esi, %%esi, 4), %%edi \n\t"
- "sarl $1, %%edi \n\t"
- "psubd %%mm7, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "psubd %%mm7, %%mm2 \n\t"
- "psubd %%mm7, %%mm3 \n\t"
- "psubd %%mm7, %%mm4 \n\t"
- "psubd %%mm7, %%mm5 \n\t"
- "packssdw %%mm1, %%mm0 \n\t"
- "packssdw %%mm3, %%mm2 \n\t"
- "packssdw %%mm5, %%mm4 \n\t"
- "movq %%mm0, (%0, %%edi) \n\t"
- "movq %%mm2, 8(%0, %%edi) \n\t"
- "movq %%mm4, 16(%0, %%edi) \n\t"
-
- "movd 3080(%1, %%esi), %%mm0 \n\t"
- "punpckldq 4104(%1, %%esi), %%mm0\n\t"
- "movd 1032(%1, %%esi), %%mm1 \n\t"
- "punpckldq 12(%1, %%esi), %%mm1\n\t"
- "movd 2060(%1, %%esi), %%mm2 \n\t"
- "punpckldq 3084(%1, %%esi), %%mm2\n\t"
- "movd 4108(%1, %%esi), %%mm3 \n\t"
- "punpckldq 1036(%1, %%esi), %%mm3\n\t"
- "psubd %%mm7, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "psubd %%mm7, %%mm2 \n\t"
- "psubd %%mm7, %%mm3 \n\t"
- "packssdw %%mm1, %%mm0 \n\t"
- "packssdw %%mm3, %%mm2 \n\t"
- "movq %%mm0, 24(%0, %%edi) \n\t"
- "movq %%mm2, 32(%0, %%edi) \n\t"
-
- "addl $16, %%esi \n\t"
- " jnz 1b \n\t"
- "emms \n\t"
- :: "r" (s16+1280), "r" (f+256)
- :"%esi", "%edi", "memory"
- );
- break;
- case A52_MONO | A52_LFE:
- asm volatile(
- "movl $-1024, %%esi \n\t"
- "movq magicF2W, %%mm7 \n\t"
- "pxor %%mm6, %%mm6 \n\t"
- "1: \n\t"
- "movq 1024(%1, %%esi), %%mm0 \n\t"
- "movq 1032(%1, %%esi), %%mm1 \n\t"
- "movq (%1, %%esi), %%mm2 \n\t"
- "movq 8(%1, %%esi), %%mm3 \n\t"
- "psubd %%mm7, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "psubd %%mm7, %%mm2 \n\t"
- "psubd %%mm7, %%mm3 \n\t"
- "packssdw %%mm1, %%mm0 \n\t"
- "packssdw %%mm3, %%mm2 \n\t"
- "movq %%mm0, %%mm1 \n\t"
- "punpcklwd %%mm2, %%mm0 \n\t"
- "punpckhwd %%mm2, %%mm1 \n\t"
- "leal (%%esi, %%esi, 2), %%edi \n\t"
- "movq %%mm6, (%0, %%edi) \n\t"
- "movd %%mm0, 8(%0, %%edi) \n\t"
- "punpckhdq %%mm0, %%mm0 \n\t"
- "movq %%mm6, 12(%0, %%edi) \n\t"
- "movd %%mm0, 20(%0, %%edi) \n\t"
- "movq %%mm6, 24(%0, %%edi) \n\t"
- "movd %%mm1, 32(%0, %%edi) \n\t"
- "punpckhdq %%mm1, %%mm1 \n\t"
- "movq %%mm6, 36(%0, %%edi) \n\t"
- "movd %%mm1, 44(%0, %%edi) \n\t"
- "addl $16, %%esi \n\t"
- " jnz 1b \n\t"
- "emms \n\t"
- :: "r" (s16+1536), "r" (f+256)
- :"%esi", "%edi", "memory"
- );
- break;
- case A52_CHANNEL | A52_LFE:
- case A52_STEREO | A52_LFE:
- case A52_DOLBY | A52_LFE:
- asm volatile(
- "movl $-1024, %%esi \n\t"
- "movq magicF2W, %%mm7 \n\t"
- "pxor %%mm6, %%mm6 \n\t"
- "1: \n\t"
- "movq 1024(%1, %%esi), %%mm0 \n\t"
- "movq 2048(%1, %%esi), %%mm1 \n\t"
- "movq (%1, %%esi), %%mm5 \n\t"
- "psubd %%mm7, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "psubd %%mm7, %%mm5 \n\t"
- "leal (%%esi, %%esi, 2), %%edi \n\t"
-
- "pxor %%mm4, %%mm4 \n\t"
- "packssdw %%mm5, %%mm0 \n\t" // FfAa
- "packssdw %%mm4, %%mm1 \n\t" // 00Bb
- "punpckhwd %%mm0, %%mm4 \n\t" // F0f0
- "punpcklwd %%mm1, %%mm0 \n\t" // BAba
- "movq %%mm0, %%mm1 \n\t" // BAba
- "punpckldq %%mm4, %%mm3 \n\t" // f0XX
- "punpckldq %%mm6, %%mm0 \n\t" // 00ba
- "punpckhdq %%mm1, %%mm3 \n\t" // BAf0
-
- "movq %%mm0, (%0, %%edi) \n\t" // 00ba
- "punpckhdq %%mm4, %%mm0 \n\t" // F000
- "movq %%mm3, 8(%0, %%edi) \n\t" // BAf0
- "movq %%mm0, 16(%0, %%edi) \n\t" // F000
- "addl $8, %%esi \n\t"
- " jnz 1b \n\t"
- "emms \n\t"
- :: "r" (s16+1536), "r" (f+256)
- :"%esi", "%edi", "memory"
- );
- break;
- case A52_3F | A52_LFE:
- asm volatile(
- "movl $-1024, %%esi \n\t"
- "movq magicF2W, %%mm7 \n\t"
- "pxor %%mm6, %%mm6 \n\t"
- "1: \n\t"
- "movq 1024(%1, %%esi), %%mm0 \n\t"
- "movq 3072(%1, %%esi), %%mm1 \n\t"
- "movq 2048(%1, %%esi), %%mm4 \n\t"
- "movq (%1, %%esi), %%mm5 \n\t"
- "psubd %%mm7, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "psubd %%mm7, %%mm4 \n\t"
- "psubd %%mm7, %%mm5 \n\t"
- "leal (%%esi, %%esi, 2), %%edi \n\t"
-
- "packssdw %%mm4, %%mm0 \n\t" // EeAa
- "packssdw %%mm5, %%mm1 \n\t" // FfBb
- "movq %%mm0, %%mm2 \n\t" // EeAa
- "punpcklwd %%mm1, %%mm0 \n\t" // BAba
- "punpckhwd %%mm1, %%mm2 \n\t" // FEfe
- "movq %%mm0, %%mm1 \n\t" // BAba
- "punpckldq %%mm6, %%mm0 \n\t" // 00ba
- "punpckhdq %%mm1, %%mm1 \n\t" // BABA
-
- "movq %%mm0, (%0, %%edi) \n\t"
- "punpckhdq %%mm2, %%mm0 \n\t" // FE00
- "punpckldq %%mm1, %%mm2 \n\t" // BAfe
- "movq %%mm2, 8(%0, %%edi) \n\t"
- "movq %%mm0, 16(%0, %%edi) \n\t"
- "addl $8, %%esi \n\t"
- " jnz 1b \n\t"
- "emms \n\t"
- :: "r" (s16+1536), "r" (f+256)
- :"%esi", "%edi", "memory"
- );
- break;
- case A52_2F2R | A52_LFE:
- asm volatile(
- "movl $-1024, %%esi \n\t"
- "movq magicF2W, %%mm7 \n\t"
-// "pxor %%mm6, %%mm6 \n\t"
- "1: \n\t"
- "movq 1024(%1, %%esi), %%mm0 \n\t"
- "movq 2048(%1, %%esi), %%mm1 \n\t"
- "movq 3072(%1, %%esi), %%mm2 \n\t"
- "movq 4096(%1, %%esi), %%mm3 \n\t"
- "movq (%1, %%esi), %%mm5 \n\t"
- "psubd %%mm7, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "psubd %%mm7, %%mm2 \n\t"
- "psubd %%mm7, %%mm3 \n\t"
- "psubd %%mm7, %%mm5 \n\t"
- "leal (%%esi, %%esi, 2), %%edi \n\t"
-
- "packssdw %%mm2, %%mm0 \n\t" // CcAa
- "packssdw %%mm3, %%mm1 \n\t" // DdBb
- "packssdw %%mm5, %%mm5 \n\t" // FfFf
- "movq %%mm0, %%mm2 \n\t" // CcAa
- "punpcklwd %%mm1, %%mm0 \n\t" // BAba
- "punpckhwd %%mm1, %%mm2 \n\t" // DCdc
- "pxor %%mm4, %%mm4 \n\t" // 0000
- "punpcklwd %%mm5, %%mm4 \n\t" // F0f0
- "movq %%mm0, %%mm1 \n\t" // BAba
- "movq %%mm4, %%mm3 \n\t" // F0f0
- "punpckldq %%mm2, %%mm0 \n\t" // dcba
- "punpckhdq %%mm1, %%mm1 \n\t" // BABA
- "punpckldq %%mm1, %%mm4 \n\t" // BAf0
- "punpckhdq %%mm3, %%mm2 \n\t" // F0DC
-
- "movq %%mm0, (%0, %%edi) \n\t"
- "movq %%mm4, 8(%0, %%edi) \n\t"
- "movq %%mm2, 16(%0, %%edi) \n\t"
- "addl $8, %%esi \n\t"
- " jnz 1b \n\t"
- "emms \n\t"
- :: "r" (s16+1536), "r" (f+256)
- :"%esi", "%edi", "memory"
- );
- break;
- case A52_3F2R | A52_LFE:
- asm volatile(
- "movl $-1024, %%esi \n\t"
- "movq magicF2W, %%mm7 \n\t"
-// "pxor %%mm6, %%mm6 \n\t"
- "1: \n\t"
- "movq 1024(%1, %%esi), %%mm0 \n\t"
- "movq 3072(%1, %%esi), %%mm1 \n\t"
- "movq 4096(%1, %%esi), %%mm2 \n\t"
- "movq 5120(%1, %%esi), %%mm3 \n\t"
- "movq 2048(%1, %%esi), %%mm4 \n\t"
- "movq (%1, %%esi), %%mm5 \n\t"
- "psubd %%mm7, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "psubd %%mm7, %%mm2 \n\t"
- "psubd %%mm7, %%mm3 \n\t"
- "psubd %%mm7, %%mm4 \n\t"
- "psubd %%mm7, %%mm5 \n\t"
- "leal (%%esi, %%esi, 2), %%edi \n\t"
-
- "packssdw %%mm2, %%mm0 \n\t" // CcAa
- "packssdw %%mm3, %%mm1 \n\t" // DdBb
- "packssdw %%mm4, %%mm4 \n\t" // EeEe
- "packssdw %%mm5, %%mm5 \n\t" // FfFf
- "movq %%mm0, %%mm2 \n\t" // CcAa
- "punpcklwd %%mm1, %%mm0 \n\t" // BAba
- "punpckhwd %%mm1, %%mm2 \n\t" // DCdc
- "punpcklwd %%mm5, %%mm4 \n\t" // FEfe
- "movq %%mm0, %%mm1 \n\t" // BAba
- "movq %%mm4, %%mm3 \n\t" // FEfe
- "punpckldq %%mm2, %%mm0 \n\t" // dcba
- "punpckhdq %%mm1, %%mm1 \n\t" // BABA
- "punpckldq %%mm1, %%mm4 \n\t" // BAfe
- "punpckhdq %%mm3, %%mm2 \n\t" // FEDC
-
- "movq %%mm0, (%0, %%edi) \n\t"
- "movq %%mm4, 8(%0, %%edi) \n\t"
- "movq %%mm2, 16(%0, %%edi) \n\t"
- "addl $8, %%esi \n\t"
- " jnz 1b \n\t"
- "emms \n\t"
- :: "r" (s16+1536), "r" (f+256)
- :"%esi", "%edi", "memory"
- );
- break;
+ if(mm_accel&MM_ACCEL_X86_MMX){
+ tmp=a52_resample_MMX(flags,chans);
+ if(tmp){
+ if(a52_resample==NULL) fprintf(stderr, "Using MMX optimized resampler\n");
+ a52_resample=tmp;
+ return tmp;
+ }
}
- return chans*256;
-}
-#endif //arch_x86
-
-void a52_resample_init(uint32_t mm_accel,int _flags,int _chans){
- chans=_chans;
- flags=_flags;
+#endif
- if(a52_resample==NULL) // only once please ;)
- {
- if(mm_accel & MM_ACCEL_X86_MMX) fprintf(stderr, "Using MMX optimized resampler\n");
- else fprintf(stderr, "No accelerated resampler found\n");
+ tmp=a52_resample_C(flags,chans);
+ if(tmp){
+ if(a52_resample==NULL) fprintf(stderr, "No accelerated resampler found\n");
+ a52_resample=tmp;
+ return tmp;
}
-#ifdef ARCH_X86
- if(mm_accel & MM_ACCEL_X86_MMX) a52_resample= a52_resample_MMX;
-#else
- if(0);
-#endif
- else a52_resample= a52_resample_C;
+ fprintf(stderr, "Unimplemented resampler for mode 0x%X -> %d channels conversion - Contact MPlayer developers!\n", flags, chans);
+ return NULL;
}
-
Index: resample_c.c
===================================================================
RCS file: /cvsroot/mplayer/main/liba52/resample_c.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- resample_c.c 30 Dec 2001 21:38:53 -0000 1.13
+++ resample_c.c 30 Dec 2001 21:44:10 -0000 1.14
@@ -1,34 +1,4 @@
-// this code come from a52dec/libao/audio_out_oss.c
-
-// FIXME FIXME FIXME
-
-// a52_resample_init should find the requested converter (from type flags ->
-// given number of channels) and set up some function pointers...
-
-// a52_resample() should do the conversion.
-
-// MMX optimizations from Michael Niedermayer (michaelni(a)gmx.at) (under GPL)
-
-/* optimization TODO / NOTES
- movntq is slightly faster (0.5% with the current test.c benchmark)
- (but thats just test.c so that needs to be testd in reallity)
- and it would mean (C / MMX2 / MMX / 3DNOW) versions
-*/
-
-#include <inttypes.h>
-#include <stdio.h>
-#include "a52.h"
-#include "mm_accel.h"
-#include "../config.h"
-
-int (* a52_resample) (float * _f, int16_t * s16)=NULL;
-
-#ifdef ARCH_X86
-static uint64_t __attribute__((aligned(8))) magicF2W= 0x43c0000043c00000LL;
-static uint64_t __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000LL;
-static uint64_t __attribute__((aligned(8))) wm0101= 0x0000FFFF0000FFFFLL;
-static uint64_t __attribute__((aligned(8))) wm1100= 0xFFFFFFFF00000000LL;
-#endif
+// this code is based on a52dec/libao/audio_out_oss.c
static inline int16_t convert (int32_t i)
{
@@ -40,46 +10,53 @@
return i - 0x43c00000;
}
-static int chans=2;
-static int flags=0;
-
-int a52_resample_C(float * _f, int16_t * s16)
-{
+static int a52_resample_MONO_to_5_C(float * _f, int16_t * s16){
int i;
int32_t * f = (int32_t *) _f;
-
- switch (flags) {
- case A52_MONO:
for (i = 0; i < 256; i++) {
s16[5*i] = s16[5*i+1] = s16[5*i+2] = s16[5*i+3] = 0;
s16[5*i+4] = convert (f[i]);
}
- break;
- case A52_CHANNEL:
- case A52_STEREO:
- case A52_DOLBY:
+ return 5*256;
+}
+
+static int a52_resample_STEREO_to_2_C(float * _f, int16_t * s16){
+ int i;
+ int32_t * f = (int32_t *) _f;
for (i = 0; i < 256; i++) {
s16[2*i] = convert (f[i]);
s16[2*i+1] = convert (f[i+256]);
}
- break;
- case A52_3F:
+ return 2*256;
+}
+
+static int a52_resample_3F_to_5_C(float * _f, int16_t * s16){
+ int i;
+ int32_t * f = (int32_t *) _f;
for (i = 0; i < 256; i++) {
s16[5*i] = convert (f[i]);
s16[5*i+1] = convert (f[i+512]);
s16[5*i+2] = s16[5*i+3] = 0;
s16[5*i+4] = convert (f[i+256]);
}
- break;
- case A52_2F2R:
+ return 5*256;
+}
+
+static int a52_resample_2F_2R_to_4_C(float * _f, int16_t * s16){
+ int i;
+ int32_t * f = (int32_t *) _f;
for (i = 0; i < 256; i++) {
s16[4*i] = convert (f[i]);
s16[4*i+1] = convert (f[i+256]);
s16[4*i+2] = convert (f[i+512]);
s16[4*i+3] = convert (f[i+768]);
}
- break;
- case A52_3F2R:
+ return 4*256;
+}
+
+static int a52_resample_3F_2R_to_5_C(float * _f, int16_t * s16){
+ int i;
+ int32_t * f = (int32_t *) _f;
for (i = 0; i < 256; i++) {
s16[5*i] = convert (f[i]);
s16[5*i+1] = convert (f[i+512]);
@@ -87,25 +64,35 @@
s16[5*i+3] = convert (f[i+1024]);
s16[5*i+4] = convert (f[i+256]);
}
- break;
- case A52_MONO | A52_LFE:
+ return 5*256;
+}
+
+static int a52_resample_MONO_LFE_to_6_C(float * _f, int16_t * s16){
+ int i;
+ int32_t * f = (int32_t *) _f;
for (i = 0; i < 256; i++) {
s16[6*i] = s16[6*i+1] = s16[6*i+2] = s16[6*i+3] = 0;
s16[6*i+4] = convert (f[i+256]);
s16[6*i+5] = convert (f[i]);
}
- break;
- case A52_CHANNEL | A52_LFE:
- case A52_STEREO | A52_LFE:
- case A52_DOLBY | A52_LFE:
+ return 6*256;
+}
+
+static int a52_resample_STEREO_LFE_to_6_C(float * _f, int16_t * s16){
+ int i;
+ int32_t * f = (int32_t *) _f;
for (i = 0; i < 256; i++) {
s16[6*i] = convert (f[i+256]);
s16[6*i+1] = convert (f[i+512]);
s16[6*i+2] = s16[6*i+3] = s16[6*i+4] = 0;
s16[6*i+5] = convert (f[i]);
}
- break;
- case A52_3F | A52_LFE:
+ return 6*256;
+}
+
+static int a52_resample_3F_LFE_to_6_C(float * _f, int16_t * s16){
+ int i;
+ int32_t * f = (int32_t *) _f;
for (i = 0; i < 256; i++) {
s16[6*i] = convert (f[i+256]);
s16[6*i+1] = convert (f[i+768]);
@@ -113,8 +100,12 @@
s16[6*i+4] = convert (f[i+512]);
s16[6*i+5] = convert (f[i]);
}
- break;
- case A52_2F2R | A52_LFE:
+ return 6*256;
+}
+
+static int a52_resample_2F_2R_LFE_to_6_C(float * _f, int16_t * s16){
+ int i;
+ int32_t * f = (int32_t *) _f;
for (i = 0; i < 256; i++) {
s16[6*i] = convert (f[i+256]);
s16[6*i+1] = convert (f[i+512]);
@@ -123,8 +114,12 @@
s16[6*i+4] = 0;
s16[6*i+5] = convert (f[i]);
}
- break;
- case A52_3F2R | A52_LFE:
+ return 6*256;
+}
+
+static int a52_resample_3F_2R_LFE_to_6_C(float * _f, int16_t * s16){
+ int i;
+ int32_t * f = (int32_t *) _f;
for (i = 0; i < 256; i++) {
s16[6*i] = convert (f[i+256]);
s16[6*i+1] = convert (f[i+768]);
@@ -133,474 +128,46 @@
s16[6*i+4] = convert (f[i+512]);
s16[6*i+5] = convert (f[i]);
}
- break;
- }
- return chans*256;
+ return 6*256;
}
-#ifdef ARCH_X86
-int a52_resample_MMX(float * _f, int16_t * s16)
-{
- int i;
- int32_t * f = (int32_t *) _f;
+static void* a52_resample_C(int flags, int ch){
switch (flags) {
case A52_MONO:
- asm volatile(
- "movl $-512, %%esi \n\t"
- "movq magicF2W, %%mm7 \n\t"
- "movq wm1100, %%mm3 \n\t"
- "movq wm0101, %%mm4 \n\t"
- "movq wm1010, %%mm5 \n\t"
- "pxor %%mm6, %%mm6 \n\t"
- "1: \n\t"
- "movq (%1, %%esi, 2), %%mm0 \n\t"
- "movq 8(%1, %%esi, 2), %%mm1 \n\t"
- "leal (%%esi, %%esi, 4), %%edi \n\t"
- "psubd %%mm7, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "packssdw %%mm1, %%mm0 \n\t"
- "movq %%mm0, %%mm1 \n\t"
- "pand %%mm4, %%mm0 \n\t"
- "pand %%mm5, %%mm1 \n\t"
- "movq %%mm6, (%0, %%edi) \n\t" // 0 0 0 0
- "movd %%mm0, 8(%0, %%edi) \n\t" // A 0
- "pand %%mm3, %%mm0 \n\t"
- "movd %%mm6, 12(%0, %%edi) \n\t" // 0 0
- "movd %%mm1, 16(%0, %%edi) \n\t" // 0 B
- "pand %%mm3, %%mm1 \n\t"
- "movd %%mm6, 20(%0, %%edi) \n\t" // 0 0
- "movq %%mm0, 24(%0, %%edi) \n\t" // 0 0 C 0
- "movq %%mm1, 32(%0, %%edi) \n\t" // 0 0 0 B
- "addl $8, %%esi \n\t"
- " jnz 1b \n\t"
- "emms \n\t"
- :: "r" (s16+1280), "r" (f+256)
- :"%esi", "%edi", "memory"
- );
+ if(ch==5) return a52_resample_MONO_to_5_C;
break;
case A52_CHANNEL:
case A52_STEREO:
case A52_DOLBY:
-/* benchmark scores are 0.3% better with SSE but we would need to set bias=0 and premultiply it
-#ifdef HAVE_SSE
- asm volatile(
- "movl $-1024, %%esi \n\t"
- "1: \n\t"
- "cvtps2pi (%1, %%esi), %%mm0 \n\t"
- "cvtps2pi 1024(%1, %%esi), %%mm2\n\t"
- "movq %%mm0, %%mm1 \n\t"
- "punpcklwd %%mm2, %%mm0 \n\t"
- "punpckhwd %%mm2, %%mm1 \n\t"
- "movq %%mm0, (%0, %%esi) \n\t"
- "movq %%mm1, 8(%0, %%esi) \n\t"
- "addl $16, %%esi \n\t"
- " jnz 1b \n\t"
- "emms \n\t"
- :: "r" (s16+512), "r" (f+256)
- :"%esi", "memory"
- );*/
- asm volatile(
- "movl $-1024, %%esi \n\t"
- "movq magicF2W, %%mm7 \n\t"
- "1: \n\t"
- "movq (%1, %%esi), %%mm0 \n\t"
- "movq 8(%1, %%esi), %%mm1 \n\t"
- "movq 1024(%1, %%esi), %%mm2 \n\t"
- "movq 1032(%1, %%esi), %%mm3 \n\t"
- "psubd %%mm7, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "psubd %%mm7, %%mm2 \n\t"
- "psubd %%mm7, %%mm3 \n\t"
- "packssdw %%mm1, %%mm0 \n\t"
- "packssdw %%mm3, %%mm2 \n\t"
- "movq %%mm0, %%mm1 \n\t"
- "punpcklwd %%mm2, %%mm0 \n\t"
- "punpckhwd %%mm2, %%mm1 \n\t"
- "movq %%mm0, (%0, %%esi) \n\t"
- "movq %%mm1, 8(%0, %%esi) \n\t"
- "addl $16, %%esi \n\t"
- " jnz 1b \n\t"
- "emms \n\t"
- :: "r" (s16+512), "r" (f+256)
- :"%esi", "memory"
- );
+ if(ch==2) return a52_resample_STEREO_to_2_C;
break;
- case A52_3F:
- asm volatile(
- "movl $-1024, %%esi \n\t"
- "movq magicF2W, %%mm7 \n\t"
- "pxor %%mm6, %%mm6 \n\t"
- "movq %%mm7, %%mm5 \n\t"
- "punpckldq %%mm6, %%mm5 \n\t"
- "1: \n\t"
- "movd (%1, %%esi), %%mm0 \n\t"
- "punpckldq 2048(%1, %%esi), %%mm0\n\t"
- "movd 1024(%1, %%esi), %%mm1 \n\t"
- "punpckldq 4(%1, %%esi), %%mm1 \n\t"
- "movd 2052(%1, %%esi), %%mm2 \n\t"
- "movq %%mm7, %%mm3 \n\t"
- "punpckldq 1028(%1, %%esi), %%mm3\n\t"
- "movd 8(%1, %%esi), %%mm4 \n\t"
- "punpckldq 2056(%1, %%esi), %%mm4\n\t"
- "leal (%%esi, %%esi, 4), %%edi \n\t"
- "sarl $1, %%edi \n\t"
- "psubd %%mm7, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "psubd %%mm5, %%mm2 \n\t"
- "psubd %%mm7, %%mm3 \n\t"
- "psubd %%mm7, %%mm4 \n\t"
- "packssdw %%mm6, %%mm0 \n\t"
- "packssdw %%mm2, %%mm1 \n\t"
- "packssdw %%mm4, %%mm3 \n\t"
- "movq %%mm0, (%0, %%edi) \n\t"
- "movq %%mm1, 8(%0, %%edi) \n\t"
- "movq %%mm3, 16(%0, %%edi) \n\t"
-
- "movd 1032(%1, %%esi), %%mm1 \n\t"
- "punpckldq 12(%1, %%esi), %%mm1\n\t"
- "movd 2060(%1, %%esi), %%mm2 \n\t"
- "movq %%mm7, %%mm3 \n\t"
- "punpckldq 1036(%1, %%esi), %%mm3\n\t"
- "pxor %%mm0, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "psubd %%mm5, %%mm2 \n\t"
- "psubd %%mm7, %%mm3 \n\t"
- "packssdw %%mm1, %%mm0 \n\t"
- "packssdw %%mm3, %%mm2 \n\t"
- "movq %%mm0, 24(%0, %%edi) \n\t"
- "movq %%mm2, 32(%0, %%edi) \n\t"
-
- "addl $16, %%esi \n\t"
- " jnz 1b \n\t"
- "emms \n\t"
- :: "r" (s16+1280), "r" (f+256)
- :"%esi", "%edi", "memory"
- );
+ case A52_3F:
+ if(ch==5) return a52_resample_3F_to_5_C;
break;
case A52_2F2R:
- asm volatile(
- "movl $-1024, %%esi \n\t"
- "movq magicF2W, %%mm7 \n\t"
- "1: \n\t"
- "movq (%1, %%esi), %%mm0 \n\t"
- "movq 8(%1, %%esi), %%mm1 \n\t"
- "movq 1024(%1, %%esi), %%mm2 \n\t"
- "movq 1032(%1, %%esi), %%mm3 \n\t"
- "psubd %%mm7, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "psubd %%mm7, %%mm2 \n\t"
- "psubd %%mm7, %%mm3 \n\t"
- "packssdw %%mm1, %%mm0 \n\t"
- "packssdw %%mm3, %%mm2 \n\t"
- "movq 2048(%1, %%esi), %%mm3 \n\t"
- "movq 2056(%1, %%esi), %%mm4 \n\t"
- "movq 3072(%1, %%esi), %%mm5 \n\t"
- "movq 3080(%1, %%esi), %%mm6 \n\t"
- "psubd %%mm7, %%mm3 \n\t"
- "psubd %%mm7, %%mm4 \n\t"
- "psubd %%mm7, %%mm5 \n\t"
- "psubd %%mm7, %%mm6 \n\t"
- "packssdw %%mm4, %%mm3 \n\t"
- "packssdw %%mm6, %%mm5 \n\t"
- "movq %%mm0, %%mm1 \n\t"
- "movq %%mm3, %%mm4 \n\t"
- "punpcklwd %%mm2, %%mm0 \n\t"
- "punpckhwd %%mm2, %%mm1 \n\t"
- "punpcklwd %%mm5, %%mm3 \n\t"
- "punpckhwd %%mm5, %%mm4 \n\t"
- "movq %%mm0, %%mm2 \n\t"
- "movq %%mm1, %%mm5 \n\t"
- "punpckldq %%mm3, %%mm0 \n\t"
- "punpckhdq %%mm3, %%mm2 \n\t"
- "punpckldq %%mm4, %%mm1 \n\t"
- "punpckhdq %%mm4, %%mm5 \n\t"
- "movq %%mm0, (%0, %%esi,2) \n\t"
- "movq %%mm2, 8(%0, %%esi,2) \n\t"
- "movq %%mm1, 16(%0, %%esi,2) \n\t"
- "movq %%mm5, 24(%0, %%esi,2) \n\t"
- "addl $16, %%esi \n\t"
- " jnz 1b \n\t"
- "emms \n\t"
- :: "r" (s16+1024), "r" (f+256)
- :"%esi", "memory"
- );
+ if(ch==4) return a52_resample_2F_2R_to_4_C;
break;
- case A52_3F2R:
- asm volatile(
- "movl $-1024, %%esi \n\t"
- "movq magicF2W, %%mm7 \n\t"
- "1: \n\t"
- "movd (%1, %%esi), %%mm0 \n\t"
- "punpckldq 2048(%1, %%esi), %%mm0\n\t"
- "movd 3072(%1, %%esi), %%mm1 \n\t"
- "punpckldq 4096(%1, %%esi), %%mm1\n\t"
- "movd 1024(%1, %%esi), %%mm2 \n\t"
- "punpckldq 4(%1, %%esi), %%mm2 \n\t"
- "movd 2052(%1, %%esi), %%mm3 \n\t"
- "punpckldq 3076(%1, %%esi), %%mm3\n\t"
- "movd 4100(%1, %%esi), %%mm4 \n\t"
- "punpckldq 1028(%1, %%esi), %%mm4\n\t"
- "movd 8(%1, %%esi), %%mm5 \n\t"
- "punpckldq 2056(%1, %%esi), %%mm5\n\t"
- "leal (%%esi, %%esi, 4), %%edi \n\t"
- "sarl $1, %%edi \n\t"
- "psubd %%mm7, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "psubd %%mm7, %%mm2 \n\t"
- "psubd %%mm7, %%mm3 \n\t"
- "psubd %%mm7, %%mm4 \n\t"
- "psubd %%mm7, %%mm5 \n\t"
- "packssdw %%mm1, %%mm0 \n\t"
- "packssdw %%mm3, %%mm2 \n\t"
- "packssdw %%mm5, %%mm4 \n\t"
- "movq %%mm0, (%0, %%edi) \n\t"
- "movq %%mm2, 8(%0, %%edi) \n\t"
- "movq %%mm4, 16(%0, %%edi) \n\t"
-
- "movd 3080(%1, %%esi), %%mm0 \n\t"
- "punpckldq 4104(%1, %%esi), %%mm0\n\t"
- "movd 1032(%1, %%esi), %%mm1 \n\t"
- "punpckldq 12(%1, %%esi), %%mm1\n\t"
- "movd 2060(%1, %%esi), %%mm2 \n\t"
- "punpckldq 3084(%1, %%esi), %%mm2\n\t"
- "movd 4108(%1, %%esi), %%mm3 \n\t"
- "punpckldq 1036(%1, %%esi), %%mm3\n\t"
- "psubd %%mm7, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "psubd %%mm7, %%mm2 \n\t"
- "psubd %%mm7, %%mm3 \n\t"
- "packssdw %%mm1, %%mm0 \n\t"
- "packssdw %%mm3, %%mm2 \n\t"
- "movq %%mm0, 24(%0, %%edi) \n\t"
- "movq %%mm2, 32(%0, %%edi) \n\t"
-
- "addl $16, %%esi \n\t"
- " jnz 1b \n\t"
- "emms \n\t"
- :: "r" (s16+1280), "r" (f+256)
- :"%esi", "%edi", "memory"
- );
+ case A52_3F2R:
+ if(ch==5) return a52_resample_3F_2R_to_5_C;
break;
case A52_MONO | A52_LFE:
- asm volatile(
- "movl $-1024, %%esi \n\t"
- "movq magicF2W, %%mm7 \n\t"
- "pxor %%mm6, %%mm6 \n\t"
- "1: \n\t"
- "movq 1024(%1, %%esi), %%mm0 \n\t"
- "movq 1032(%1, %%esi), %%mm1 \n\t"
- "movq (%1, %%esi), %%mm2 \n\t"
- "movq 8(%1, %%esi), %%mm3 \n\t"
- "psubd %%mm7, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "psubd %%mm7, %%mm2 \n\t"
- "psubd %%mm7, %%mm3 \n\t"
- "packssdw %%mm1, %%mm0 \n\t"
- "packssdw %%mm3, %%mm2 \n\t"
- "movq %%mm0, %%mm1 \n\t"
- "punpcklwd %%mm2, %%mm0 \n\t"
- "punpckhwd %%mm2, %%mm1 \n\t"
- "leal (%%esi, %%esi, 2), %%edi \n\t"
- "movq %%mm6, (%0, %%edi) \n\t"
- "movd %%mm0, 8(%0, %%edi) \n\t"
- "punpckhdq %%mm0, %%mm0 \n\t"
- "movq %%mm6, 12(%0, %%edi) \n\t"
- "movd %%mm0, 20(%0, %%edi) \n\t"
- "movq %%mm6, 24(%0, %%edi) \n\t"
- "movd %%mm1, 32(%0, %%edi) \n\t"
- "punpckhdq %%mm1, %%mm1 \n\t"
- "movq %%mm6, 36(%0, %%edi) \n\t"
- "movd %%mm1, 44(%0, %%edi) \n\t"
- "addl $16, %%esi \n\t"
- " jnz 1b \n\t"
- "emms \n\t"
- :: "r" (s16+1536), "r" (f+256)
- :"%esi", "%edi", "memory"
- );
+ if(ch==6) return a52_resample_MONO_LFE_to_6_C;
break;
case A52_CHANNEL | A52_LFE:
case A52_STEREO | A52_LFE:
case A52_DOLBY | A52_LFE:
- asm volatile(
- "movl $-1024, %%esi \n\t"
- "movq magicF2W, %%mm7 \n\t"
- "pxor %%mm6, %%mm6 \n\t"
- "1: \n\t"
- "movq 1024(%1, %%esi), %%mm0 \n\t"
- "movq 2048(%1, %%esi), %%mm1 \n\t"
- "movq (%1, %%esi), %%mm5 \n\t"
- "psubd %%mm7, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "psubd %%mm7, %%mm5 \n\t"
- "leal (%%esi, %%esi, 2), %%edi \n\t"
-
- "pxor %%mm4, %%mm4 \n\t"
- "packssdw %%mm5, %%mm0 \n\t" // FfAa
- "packssdw %%mm4, %%mm1 \n\t" // 00Bb
- "punpckhwd %%mm0, %%mm4 \n\t" // F0f0
- "punpcklwd %%mm1, %%mm0 \n\t" // BAba
- "movq %%mm0, %%mm1 \n\t" // BAba
- "punpckldq %%mm4, %%mm3 \n\t" // f0XX
- "punpckldq %%mm6, %%mm0 \n\t" // 00ba
- "punpckhdq %%mm1, %%mm3 \n\t" // BAf0
-
- "movq %%mm0, (%0, %%edi) \n\t" // 00ba
- "punpckhdq %%mm4, %%mm0 \n\t" // F000
- "movq %%mm3, 8(%0, %%edi) \n\t" // BAf0
- "movq %%mm0, 16(%0, %%edi) \n\t" // F000
- "addl $8, %%esi \n\t"
- " jnz 1b \n\t"
- "emms \n\t"
- :: "r" (s16+1536), "r" (f+256)
- :"%esi", "%edi", "memory"
- );
+ if(ch==6) return a52_resample_STEREO_LFE_to_6_C;
break;
case A52_3F | A52_LFE:
- asm volatile(
- "movl $-1024, %%esi \n\t"
- "movq magicF2W, %%mm7 \n\t"
- "pxor %%mm6, %%mm6 \n\t"
- "1: \n\t"
- "movq 1024(%1, %%esi), %%mm0 \n\t"
- "movq 3072(%1, %%esi), %%mm1 \n\t"
- "movq 2048(%1, %%esi), %%mm4 \n\t"
- "movq (%1, %%esi), %%mm5 \n\t"
- "psubd %%mm7, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "psubd %%mm7, %%mm4 \n\t"
- "psubd %%mm7, %%mm5 \n\t"
- "leal (%%esi, %%esi, 2), %%edi \n\t"
-
- "packssdw %%mm4, %%mm0 \n\t" // EeAa
- "packssdw %%mm5, %%mm1 \n\t" // FfBb
- "movq %%mm0, %%mm2 \n\t" // EeAa
- "punpcklwd %%mm1, %%mm0 \n\t" // BAba
- "punpckhwd %%mm1, %%mm2 \n\t" // FEfe
- "movq %%mm0, %%mm1 \n\t" // BAba
- "punpckldq %%mm6, %%mm0 \n\t" // 00ba
- "punpckhdq %%mm1, %%mm1 \n\t" // BABA
-
- "movq %%mm0, (%0, %%edi) \n\t"
- "punpckhdq %%mm2, %%mm0 \n\t" // FE00
- "punpckldq %%mm1, %%mm2 \n\t" // BAfe
- "movq %%mm2, 8(%0, %%edi) \n\t"
- "movq %%mm0, 16(%0, %%edi) \n\t"
- "addl $8, %%esi \n\t"
- " jnz 1b \n\t"
- "emms \n\t"
- :: "r" (s16+1536), "r" (f+256)
- :"%esi", "%edi", "memory"
- );
+ if(ch==6) return a52_resample_3F_LFE_to_6_C;
break;
case A52_2F2R | A52_LFE:
- asm volatile(
- "movl $-1024, %%esi \n\t"
- "movq magicF2W, %%mm7 \n\t"
-// "pxor %%mm6, %%mm6 \n\t"
- "1: \n\t"
- "movq 1024(%1, %%esi), %%mm0 \n\t"
- "movq 2048(%1, %%esi), %%mm1 \n\t"
- "movq 3072(%1, %%esi), %%mm2 \n\t"
- "movq 4096(%1, %%esi), %%mm3 \n\t"
- "movq (%1, %%esi), %%mm5 \n\t"
- "psubd %%mm7, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "psubd %%mm7, %%mm2 \n\t"
- "psubd %%mm7, %%mm3 \n\t"
- "psubd %%mm7, %%mm5 \n\t"
- "leal (%%esi, %%esi, 2), %%edi \n\t"
-
- "packssdw %%mm2, %%mm0 \n\t" // CcAa
- "packssdw %%mm3, %%mm1 \n\t" // DdBb
- "packssdw %%mm5, %%mm5 \n\t" // FfFf
- "movq %%mm0, %%mm2 \n\t" // CcAa
- "punpcklwd %%mm1, %%mm0 \n\t" // BAba
- "punpckhwd %%mm1, %%mm2 \n\t" // DCdc
- "pxor %%mm4, %%mm4 \n\t" // 0000
- "punpcklwd %%mm5, %%mm4 \n\t" // F0f0
- "movq %%mm0, %%mm1 \n\t" // BAba
- "movq %%mm4, %%mm3 \n\t" // F0f0
- "punpckldq %%mm2, %%mm0 \n\t" // dcba
- "punpckhdq %%mm1, %%mm1 \n\t" // BABA
- "punpckldq %%mm1, %%mm4 \n\t" // BAf0
- "punpckhdq %%mm3, %%mm2 \n\t" // F0DC
-
- "movq %%mm0, (%0, %%edi) \n\t"
- "movq %%mm4, 8(%0, %%edi) \n\t"
- "movq %%mm2, 16(%0, %%edi) \n\t"
- "addl $8, %%esi \n\t"
- " jnz 1b \n\t"
- "emms \n\t"
- :: "r" (s16+1536), "r" (f+256)
- :"%esi", "%edi", "memory"
- );
+ if(ch==6) return a52_resample_2F_2R_LFE_to_6_C;
break;
case A52_3F2R | A52_LFE:
- asm volatile(
- "movl $-1024, %%esi \n\t"
- "movq magicF2W, %%mm7 \n\t"
-// "pxor %%mm6, %%mm6 \n\t"
- "1: \n\t"
- "movq 1024(%1, %%esi), %%mm0 \n\t"
- "movq 3072(%1, %%esi), %%mm1 \n\t"
- "movq 4096(%1, %%esi), %%mm2 \n\t"
- "movq 5120(%1, %%esi), %%mm3 \n\t"
- "movq 2048(%1, %%esi), %%mm4 \n\t"
- "movq (%1, %%esi), %%mm5 \n\t"
- "psubd %%mm7, %%mm0 \n\t"
- "psubd %%mm7, %%mm1 \n\t"
- "psubd %%mm7, %%mm2 \n\t"
- "psubd %%mm7, %%mm3 \n\t"
- "psubd %%mm7, %%mm4 \n\t"
- "psubd %%mm7, %%mm5 \n\t"
- "leal (%%esi, %%esi, 2), %%edi \n\t"
-
- "packssdw %%mm2, %%mm0 \n\t" // CcAa
- "packssdw %%mm3, %%mm1 \n\t" // DdBb
- "packssdw %%mm4, %%mm4 \n\t" // EeEe
- "packssdw %%mm5, %%mm5 \n\t" // FfFf
- "movq %%mm0, %%mm2 \n\t" // CcAa
- "punpcklwd %%mm1, %%mm0 \n\t" // BAba
- "punpckhwd %%mm1, %%mm2 \n\t" // DCdc
- "punpcklwd %%mm5, %%mm4 \n\t" // FEfe
- "movq %%mm0, %%mm1 \n\t" // BAba
- "movq %%mm4, %%mm3 \n\t" // FEfe
- "punpckldq %%mm2, %%mm0 \n\t" // dcba
- "punpckhdq %%mm1, %%mm1 \n\t" // BABA
- "punpckldq %%mm1, %%mm4 \n\t" // BAfe
- "punpckhdq %%mm3, %%mm2 \n\t" // FEDC
-
- "movq %%mm0, (%0, %%edi) \n\t"
- "movq %%mm4, 8(%0, %%edi) \n\t"
- "movq %%mm2, 16(%0, %%edi) \n\t"
- "addl $8, %%esi \n\t"
- " jnz 1b \n\t"
- "emms \n\t"
- :: "r" (s16+1536), "r" (f+256)
- :"%esi", "%edi", "memory"
- );
+ if(ch==6) return a52_resample_3F_2R_LFE_to_6_C;
break;
}
- return chans*256;
+ return NULL;
}
-#endif //arch_x86
-
-void a52_resample_init(uint32_t mm_accel,int _flags,int _chans){
- chans=_chans;
- flags=_flags;
-
- if(a52_resample==NULL) // only once please ;)
- {
- if(mm_accel & MM_ACCEL_X86_MMX) fprintf(stderr, "Using MMX optimized resampler\n");
- else fprintf(stderr, "No accelerated resampler found\n");
- }
-
-#ifdef ARCH_X86
- if(mm_accel & MM_ACCEL_X86_MMX) a52_resample= a52_resample_MMX;
-#else
- if(0);
-#endif
- else a52_resample= a52_resample_C;
-}
-
Index: resample_mmx.c
===================================================================
RCS file: /cvsroot/mplayer/main/liba52/resample_mmx.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- resample_mmx.c 30 Dec 2001 21:38:53 -0000 1.13
+++ resample_mmx.c 30 Dec 2001 21:44:10 -0000 1.14
@@ -1,11 +1,3 @@
-// this code come from a52dec/libao/audio_out_oss.c
-
-// FIXME FIXME FIXME
-
-// a52_resample_init should find the requested converter (from type flags ->
-// given number of channels) and set up some function pointers...
-
-// a52_resample() should do the conversion.
// MMX optimizations from Michael Niedermayer (michaelni(a)gmx.at) (under GPL)
@@ -15,137 +7,14 @@
and it would mean (C / MMX2 / MMX / 3DNOW) versions
*/
-#include <inttypes.h>
-#include <stdio.h>
-#include "a52.h"
-#include "mm_accel.h"
-#include "../config.h"
-
-int (* a52_resample) (float * _f, int16_t * s16)=NULL;
-
-#ifdef ARCH_X86
static uint64_t __attribute__((aligned(8))) magicF2W= 0x43c0000043c00000LL;
static uint64_t __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000LL;
static uint64_t __attribute__((aligned(8))) wm0101= 0x0000FFFF0000FFFFLL;
static uint64_t __attribute__((aligned(8))) wm1100= 0xFFFFFFFF00000000LL;
-#endif
-
-static inline int16_t convert (int32_t i)
-{
- if (i > 0x43c07fff)
- return 32767;
- else if (i < 0x43bf8000)
- return -32768;
- else
- return i - 0x43c00000;
-}
-
-static int chans=2;
-static int flags=0;
-
-int a52_resample_C(float * _f, int16_t * s16)
-{
- int i;
- int32_t * f = (int32_t *) _f;
-
- switch (flags) {
- case A52_MONO:
- for (i = 0; i < 256; i++) {
- s16[5*i] = s16[5*i+1] = s16[5*i+2] = s16[5*i+3] = 0;
- s16[5*i+4] = convert (f[i]);
- }
- break;
- case A52_CHANNEL:
- case A52_STEREO:
- case A52_DOLBY:
- for (i = 0; i < 256; i++) {
- s16[2*i] = convert (f[i]);
- s16[2*i+1] = convert (f[i+256]);
- }
- break;
- case A52_3F:
- for (i = 0; i < 256; i++) {
- s16[5*i] = convert (f[i]);
- s16[5*i+1] = convert (f[i+512]);
- s16[5*i+2] = s16[5*i+3] = 0;
- s16[5*i+4] = convert (f[i+256]);
- }
- break;
- case A52_2F2R:
- for (i = 0; i < 256; i++) {
- s16[4*i] = convert (f[i]);
- s16[4*i+1] = convert (f[i+256]);
- s16[4*i+2] = convert (f[i+512]);
- s16[4*i+3] = convert (f[i+768]);
- }
- break;
- case A52_3F2R:
- for (i = 0; i < 256; i++) {
- s16[5*i] = convert (f[i]);
- s16[5*i+1] = convert (f[i+512]);
- s16[5*i+2] = convert (f[i+768]);
- s16[5*i+3] = convert (f[i+1024]);
- s16[5*i+4] = convert (f[i+256]);
- }
- break;
- case A52_MONO | A52_LFE:
- for (i = 0; i < 256; i++) {
- s16[6*i] = s16[6*i+1] = s16[6*i+2] = s16[6*i+3] = 0;
- s16[6*i+4] = convert (f[i+256]);
- s16[6*i+5] = convert (f[i]);
- }
- break;
- case A52_CHANNEL | A52_LFE:
- case A52_STEREO | A52_LFE:
- case A52_DOLBY | A52_LFE:
- for (i = 0; i < 256; i++) {
- s16[6*i] = convert (f[i+256]);
- s16[6*i+1] = convert (f[i+512]);
- s16[6*i+2] = s16[6*i+3] = s16[6*i+4] = 0;
- s16[6*i+5] = convert (f[i]);
- }
- break;
- case A52_3F | A52_LFE:
- for (i = 0; i < 256; i++) {
- s16[6*i] = convert (f[i+256]);
- s16[6*i+1] = convert (f[i+768]);
- s16[6*i+2] = s16[6*i+3] = 0;
- s16[6*i+4] = convert (f[i+512]);
- s16[6*i+5] = convert (f[i]);
- }
- break;
- case A52_2F2R | A52_LFE:
- for (i = 0; i < 256; i++) {
- s16[6*i] = convert (f[i+256]);
- s16[6*i+1] = convert (f[i+512]);
- s16[6*i+2] = convert (f[i+768]);
- s16[6*i+3] = convert (f[i+1024]);
- s16[6*i+4] = 0;
- s16[6*i+5] = convert (f[i]);
- }
- break;
- case A52_3F2R | A52_LFE:
- for (i = 0; i < 256; i++) {
- s16[6*i] = convert (f[i+256]);
- s16[6*i+1] = convert (f[i+768]);
- s16[6*i+2] = convert (f[i+1024]);
- s16[6*i+3] = convert (f[i+1280]);
- s16[6*i+4] = convert (f[i+512]);
- s16[6*i+5] = convert (f[i]);
- }
- break;
- }
- return chans*256;
-}
-#ifdef ARCH_X86
-int a52_resample_MMX(float * _f, int16_t * s16)
-{
+static int a52_resample_MONO_to_5_MMX(float * _f, int16_t * s16){
int i;
int32_t * f = (int32_t *) _f;
-
- switch (flags) {
- case A52_MONO:
asm volatile(
"movl $-512, %%esi \n\t"
"movq magicF2W, %%mm7 \n\t"
@@ -178,10 +47,12 @@
:: "r" (s16+1280), "r" (f+256)
:"%esi", "%edi", "memory"
);
- break;
- case A52_CHANNEL:
- case A52_STEREO:
- case A52_DOLBY:
+ return 5*256;
+}
+
+static int a52_resample_STEREO_to_2_MMX(float * _f, int16_t * s16){
+ int i;
+ int32_t * f = (int32_t *) _f;
/* benchmark scores are 0.3% better with SSE but we would need to set bias=0 and premultiply it
#ifdef HAVE_SSE
asm volatile(
@@ -225,8 +96,12 @@
:: "r" (s16+512), "r" (f+256)
:"%esi", "memory"
);
- break;
- case A52_3F:
+ return 2*256;
+}
+
+static int a52_resample_3F_to_5_MMX(float * _f, int16_t * s16){
+ int i;
+ int32_t * f = (int32_t *) _f;
asm volatile(
"movl $-1024, %%esi \n\t"
"movq magicF2W, %%mm7 \n\t"
@@ -277,8 +152,12 @@
:: "r" (s16+1280), "r" (f+256)
:"%esi", "%edi", "memory"
);
- break;
- case A52_2F2R:
+ return 5*256;
+}
+
+static int a52_resample_2F_2R_to_4_MMX(float * _f, int16_t * s16){
+ int i;
+ int32_t * f = (int32_t *) _f;
asm volatile(
"movl $-1024, %%esi \n\t"
"movq magicF2W, %%mm7 \n\t"
@@ -325,8 +204,12 @@
:: "r" (s16+1024), "r" (f+256)
:"%esi", "memory"
);
- break;
- case A52_3F2R:
+ return 4*256;
+}
+
+static int a52_resample_3F_2R_to_5_MMX(float * _f, int16_t * s16){
+ int i;
+ int32_t * f = (int32_t *) _f;
asm volatile(
"movl $-1024, %%esi \n\t"
"movq magicF2W, %%mm7 \n\t"
@@ -381,8 +264,12 @@
:: "r" (s16+1280), "r" (f+256)
:"%esi", "%edi", "memory"
);
- break;
- case A52_MONO | A52_LFE:
+ return 5*256;
+}
+
+static int a52_resample_MONO_LFE_to_6_MMX(float * _f, int16_t * s16){
+ int i;
+ int32_t * f = (int32_t *) _f;
asm volatile(
"movl $-1024, %%esi \n\t"
"movq magicF2W, %%mm7 \n\t"
@@ -418,10 +305,12 @@
:: "r" (s16+1536), "r" (f+256)
:"%esi", "%edi", "memory"
);
- break;
- case A52_CHANNEL | A52_LFE:
- case A52_STEREO | A52_LFE:
- case A52_DOLBY | A52_LFE:
+ return 6*256;
+}
+
+static int a52_resample_STEREO_LFE_to_6_MMX(float * _f, int16_t * s16){
+ int i;
+ int32_t * f = (int32_t *) _f;
asm volatile(
"movl $-1024, %%esi \n\t"
"movq magicF2W, %%mm7 \n\t"
@@ -455,8 +344,12 @@
:: "r" (s16+1536), "r" (f+256)
:"%esi", "%edi", "memory"
);
- break;
- case A52_3F | A52_LFE:
+ return 6*256;
+}
+
+static int a52_resample_3F_LFE_to_6_MMX(float * _f, int16_t * s16){
+ int i;
+ int32_t * f = (int32_t *) _f;
asm volatile(
"movl $-1024, %%esi \n\t"
"movq magicF2W, %%mm7 \n\t"
@@ -492,8 +385,12 @@
:: "r" (s16+1536), "r" (f+256)
:"%esi", "%edi", "memory"
);
- break;
- case A52_2F2R | A52_LFE:
+ return 6*256;
+}
+
+static int a52_resample_2F_2R_LFE_to_6_MMX(float * _f, int16_t * s16){
+ int i;
+ int32_t * f = (int32_t *) _f;
asm volatile(
"movl $-1024, %%esi \n\t"
"movq magicF2W, %%mm7 \n\t"
@@ -535,8 +432,12 @@
:: "r" (s16+1536), "r" (f+256)
:"%esi", "%edi", "memory"
);
- break;
- case A52_3F2R | A52_LFE:
+ return 6*256;
+}
+
+static int a52_resample_3F_2R_LFE_to_6_MMX(float * _f, int16_t * s16){
+ int i;
+ int32_t * f = (int32_t *) _f;
asm volatile(
"movl $-1024, %%esi \n\t"
"movq magicF2W, %%mm7 \n\t"
@@ -580,27 +481,48 @@
:: "r" (s16+1536), "r" (f+256)
:"%esi", "%edi", "memory"
);
- break;
- }
- return chans*256;
+ return 6*256;
}
-#endif //arch_x86
-void a52_resample_init(uint32_t mm_accel,int _flags,int _chans){
- chans=_chans;
- flags=_flags;
-
- if(a52_resample==NULL) // only once please ;)
- {
- if(mm_accel & MM_ACCEL_X86_MMX) fprintf(stderr, "Using MMX optimized resampler\n");
- else fprintf(stderr, "No accelerated resampler found\n");
+
+static void* a52_resample_MMX(int flags, int ch){
+ switch (flags) {
+ case A52_MONO:
+ if(ch==5) return a52_resample_MONO_to_5_MMX;
+ break;
+ case A52_CHANNEL:
+ case A52_STEREO:
+ case A52_DOLBY:
+ if(ch==2) return a52_resample_STEREO_to_2_MMX;
+ break;
+ case A52_3F:
+ if(ch==5) return a52_resample_3F_to_5_MMX;
+ break;
+ case A52_2F2R:
+ if(ch==4) return a52_resample_2F_2R_to_4_MMX;
+ break;
+ case A52_3F2R:
+ if(ch==5) return a52_resample_3F_2R_to_5_MMX;
+ break;
+ case A52_MONO | A52_LFE:
+ if(ch==6) return a52_resample_MONO_LFE_to_6_MMX;
+ break;
+ case A52_CHANNEL | A52_LFE:
+ case A52_STEREO | A52_LFE:
+ case A52_DOLBY | A52_LFE:
+ if(ch==6) return a52_resample_STEREO_LFE_to_6_MMX;
+ break;
+ case A52_3F | A52_LFE:
+ if(ch==6) return a52_resample_3F_LFE_to_6_MMX;
+ break;
+ case A52_2F2R | A52_LFE:
+ if(ch==6) return a52_resample_2F_2R_LFE_to_6_MMX;
+ break;
+ case A52_3F2R | A52_LFE:
+ if(ch==6) return a52_resample_3F_2R_LFE_to_6_MMX;
+ break;
}
-
-#ifdef ARCH_X86
- if(mm_accel & MM_ACCEL_X86_MMX) a52_resample= a52_resample_MMX;
-#else
- if(0);
-#endif
- else a52_resample= a52_resample_C;
+ return NULL;
}
+
Index: a52.h
===================================================================
RCS file: /cvsroot/mplayer/main/liba52/a52.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- a52.h 30 Dec 2001 20:42:40 -0000 1.4
+++ a52.h 30 Dec 2001 21:44:10 -0000 1.5
@@ -119,7 +119,7 @@
sample_t (* call) (sample_t, void *), void * data);
int a52_block (a52_state_t * state, sample_t * samples);
-void a52_resample_init(uint32_t mm_accel,int _flags,int _chans);
+void* a52_resample_init(uint32_t mm_accel,int flags,int chans);
extern int (* a52_resample) (float * _f, int16_t * s16);
uint16_t crc16_block(uint8_t *data,uint32_t num_bytes);
1
0
CVS: main/liba52 imdct.c,1.17,1.18 test.c,1.5,1.6 resample.c,1.12,1.13
by Michael Niedermayer 30 Dec '01
by Michael Niedermayer 30 Dec '01
30 Dec '01
Update of /cvsroot/mplayer/main/liba52
In directory mplayer:/var/tmp.root/cvs-serv21913
Modified Files:
imdct.c test.c resample.c
Log Message:
runtime cpudetect in liba52 way
Index: imdct.c
===================================================================
RCS file: /cvsroot/mplayer/main/liba52/imdct.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- imdct.c 30 Dec 2001 01:47:27 -0000 1.17
+++ imdct.c 30 Dec 2001 21:38:53 -0000 1.18
@@ -26,7 +26,6 @@
*/
#include "config.h"
-#include "../cpudetect.h"
#include <math.h>
#include <stdio.h>
@@ -1107,9 +1106,9 @@
{
int i, j, k;
- if(gCpuCaps.hasSSE) fprintf (stderr, "Using SSE optimized IMDCT transform\n");
- else if(gCpuCaps.has3DNow) fprintf (stderr, "Using experimental 3DNow optimized IMDCT transform\n");
- else fprintf (stderr, "No accelerated IMDCT transform found\n");
+ if(mm_accel & MM_ACCEL_X86_SSE) fprintf (stderr, "Using SSE optimized IMDCT transform\n");
+ else if(mm_accel & MM_ACCEL_X86_3DNOW) fprintf (stderr, "Using 3DNow optimized IMDCT transform\n");
+ else fprintf (stderr, "No accelerated IMDCT transform found\n");
/* Twiddle factors to turn IFFT into IMDCT */
for (i = 0; i < 128; i++) {
@@ -1185,8 +1184,8 @@
imdct_512 = imdct_do_512;
#ifdef ARCH_X86
- if(gCpuCaps.hasSSE) imdct_512 = imdct_do_512_sse;
- else if(gCpuCaps.has3DNow) imdct_512 = imdct_do_512_3dnow;
+ if(mm_accel & MM_ACCEL_X86_SSE) imdct_512 = imdct_do_512_sse;
+ else if(mm_accel & MM_ACCEL_X86_3DNOW) imdct_512 = imdct_do_512_3dnow;
#endif // arch_x86
imdct_256 = imdct_do_256;
}
Index: test.c
===================================================================
RCS file: /cvsroot/mplayer/main/liba52/test.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- test.c 18 Dec 2001 04:00:29 -0000 1.5
+++ test.c 30 Dec 2001 21:38:53 -0000 1.6
@@ -11,6 +11,7 @@
#include <inttypes.h>
#include "a52.h"
+#include "mm_accel.h"
#include "../cpudetect.h"
static sample_t * samples;
@@ -51,6 +52,13 @@
stdout= stderr; //EVIL HACK FIXME
GetCpuCaps(&gCpuCaps);
stdout= temp;
+// gCpuCaps.hasMMX=0;
+// gCpuCaps.hasSSE=0;
+ if(gCpuCaps.hasMMX) accel |= MM_ACCEL_X86_MMX;
+ if(gCpuCaps.hasMMX2) accel |= MM_ACCEL_X86_MMXEXT;
+ if(gCpuCaps.hasSSE) accel |= MM_ACCEL_X86_SSE;
+ if(gCpuCaps.has3DNow) accel |= MM_ACCEL_X86_3DNOW;
+// if(gCpuCaps.has3DNowExt) accel |= MM_ACCEL_X86_3DNOWEXT;
samples = a52_init (accel);
if (samples == NULL) {
@@ -87,7 +95,7 @@
buf_size=0;
// decode:
- flags=A52_STEREO; //A52_STEREO; // A52_DOLBY // A52_2F2R // A52_3F2R | A52_LFE
+ flags=A52_STEREO; //A52_STEREO; //A52_DOLBY; //A52_STEREO; // A52_DOLBY // A52_2F2R // A52_3F2R | A52_LFE
channels=2;
flags |= A52_ADJUST_LEVEL;
@@ -99,7 +107,7 @@
// a52_dynrng (&state, NULL, NULL); // disable dynamic range compensation
STARTTIMING
- a52_resample_init(flags,channels);
+ a52_resample_init(accel,flags,channels);
s16 = out_buf;
for (i = 0; i < 6; i++) {
if (a52_block (&state, samples))
@@ -112,7 +120,7 @@
if(sum<min) min=sum;
sum=0;
#endif
- fwrite(out_buf,6*256*2*2,1,stdout);
+ fwrite(out_buf,6*256*2*channels,1,stdout);
}
Index: resample.c
===================================================================
RCS file: /cvsroot/mplayer/main/liba52/resample.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- resample.c 30 Dec 2001 20:42:40 -0000 1.12
+++ resample.c 30 Dec 2001 21:38:53 -0000 1.13
@@ -18,8 +18,8 @@
#include <inttypes.h>
#include <stdio.h>
#include "a52.h"
+#include "mm_accel.h"
#include "../config.h"
-#include "../cpudetect.h"
int (* a52_resample) (float * _f, int16_t * s16)=NULL;
@@ -592,12 +592,12 @@
if(a52_resample==NULL) // only once please ;)
{
- if(gCpuCaps.hasMMX) fprintf(stderr, "Using MMX optimized resampler\n");
- else fprintf(stderr, "No accelerated resampler found\n");
+ if(mm_accel & MM_ACCEL_X86_MMX) fprintf(stderr, "Using MMX optimized resampler\n");
+ else fprintf(stderr, "No accelerated resampler found\n");
}
#ifdef ARCH_X86
- if(gCpuCaps.hasMMX) a52_resample= a52_resample_MMX;
+ if(mm_accel & MM_ACCEL_X86_MMX) a52_resample= a52_resample_MMX;
#else
if(0);
#endif
1
0
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv9421
Modified Files:
dec_audio.c
Log Message:
pass accel flags to a52_resample_init
Index: dec_audio.c
===================================================================
RCS file: /cvsroot/mplayer/main/dec_audio.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -r1.71 -r1.72
--- dec_audio.c 30 Dec 2001 20:32:57 -0000 1.71
+++ dec_audio.c 30 Dec 2001 20:42:49 -0000 1.72
@@ -33,8 +33,10 @@
#endif
#include "liba52/a52.h"
+#include "liba52/mm_accel.h"
static sample_t * a52_samples;
static a52_state_t a52_state;
+static uint32_t a52_accel=0;
#ifdef USE_G72X
#include "g72x/g72x.h"
@@ -536,12 +538,11 @@
}
case AFM_A52: {
// Dolby AC3 audio:
- int accel=0; // should contain mmx/sse/etc flags
- if(gCpuCaps.hasSSE) accel|=MM_ACCEL_X86_SSE;
- if(gCpuCaps.hasMMX) accel|=MM_ACCEL_X86_MMX;
- if(gCpuCaps.hasMMX2) accel|=MM_ACCEL_X86_MMXEXT;
- if(gCpuCaps.has3DNow) accel|=MM_ACCEL_X86_3DNOW;
- a52_samples=a52_init (accel);
+ if(gCpuCaps.hasSSE) a52_accel|=MM_ACCEL_X86_SSE;
+ if(gCpuCaps.hasMMX) a52_accel|=MM_ACCEL_X86_MMX;
+ if(gCpuCaps.hasMMX2) a52_accel|=MM_ACCEL_X86_MMXEXT;
+ if(gCpuCaps.has3DNow) a52_accel|=MM_ACCEL_X86_3DNOW;
+ a52_samples=a52_init (a52_accel);
if (a52_samples == NULL) {
mp_msg(MSGT_DECAUDIO,MSGL_ERR,"A52 init failed\n");
driver=0;break;
@@ -562,8 +563,7 @@
}
case AFM_HWAC3: {
// Dolby AC3 passthrough:
- int accel=0; // should contain mmx/sse/etc flags
- a52_samples=a52_init (accel);
+ a52_samples=a52_init (a52_accel);
if (a52_samples == NULL) {
mp_msg(MSGT_DECAUDIO,MSGL_ERR,"A52 init failed\n");
driver=0;break;
@@ -1144,7 +1144,7 @@
// a52_dynrng (&state, NULL, NULL); // disable dynamic range compensation
// frame decoded, let's resample:
- a52_resample_init(flags,sh_audio->channels);
+ a52_resample_init(a52_accel,flags,sh_audio->channels);
len=0;
for (i = 0; i < 6; i++) {
if (a52_block (&a52_state, a52_samples)){
1
0
Update of /cvsroot/mplayer/main/liba52
In directory mplayer:/var/tmp.root/cvs-serv9387
Modified Files:
a52.h resample.c
Log Message:
pass accel flags to a52_resample_init
Index: a52.h
===================================================================
RCS file: /cvsroot/mplayer/main/liba52/a52.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- a52.h 30 Dec 2001 04:42:42 -0000 1.3
+++ a52.h 30 Dec 2001 20:42:40 -0000 1.4
@@ -119,7 +119,7 @@
sample_t (* call) (sample_t, void *), void * data);
int a52_block (a52_state_t * state, sample_t * samples);
-void a52_resample_init(int _flags,int _chans);
+void a52_resample_init(uint32_t mm_accel,int _flags,int _chans);
extern int (* a52_resample) (float * _f, int16_t * s16);
uint16_t crc16_block(uint8_t *data,uint32_t num_bytes);
Index: resample.c
===================================================================
RCS file: /cvsroot/mplayer/main/liba52/resample.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- resample.c 22 Dec 2001 00:55:58 -0000 1.11
+++ resample.c 30 Dec 2001 20:42:40 -0000 1.12
@@ -586,7 +586,7 @@
}
#endif //arch_x86
-void a52_resample_init(int _flags,int _chans){
+void a52_resample_init(uint32_t mm_accel,int _flags,int _chans){
chans=_chans;
flags=_flags;
1
0