Merge svn changes up to r28103

This commit is contained in:
Uoti Urpala 2008-12-06 02:16:51 +02:00
commit cb3dc68691
12 changed files with 250 additions and 55 deletions

View File

@ -3624,7 +3624,7 @@ but also makes use of newer extensions, which allow support for more
colorspaces and direct rendering.
For optimal speed try something similar to
.br
\-vo gl:yuv=2:force\-pbo:ati\-hack \-dr \-noslices
\-vo gl:yuv=2:rectangle=2:force\-pbo:ati\-hack \-dr \-noslices
.br
The code performs very few checks, so if a feature does not work, this
might be because it is not supported by your card/OpenGL implementation
@ -3714,6 +3714,9 @@ Provides brightness, contrast, saturation, hue and gamma control.
Gamma can also be set independently for red, green and blue.
Speed depends more on GPU memory bandwidth than other methods.
.RE
.IPs ycbcr
Use the GL_MESA_ycbcr_texture extension to convert YUV to RGB.
In most cases this is probably slower than doing software conversion to RGB.
.IPs lscale=<n>
Select the scaling function to use for luminance scaling.
Only valid for yuv modes 2, 3, 4 and 6.
@ -3730,13 +3733,15 @@ Works on a few more cards than method 1.
3: Same as 1 but does not use a lookup texture.
Might be faster on some cards.
.br
4: Use experimental unsharp masking with 3x3 support and a strength of 0.5.
4: Use experimental unsharp masking with 3x3 support and a default strength of 0.5 (see filter-strength).
.br
5: Use experimental unsharp masking with 5x5 support and a strength of 0.5.
5: Use experimental unsharp masking with 5x5 support and a default strength of 0.5 (see filter-strength).
.RE
.IPs cscale=<n>
Select the scaling function to use for chrominance scaling.
For details see lscale.
.IPs filter-strength=<value>
Set the effect strength for the lscale/cscale filters that support it.
.IPs customprog=<filename>
Load a custom fragment program from <filename>.
See TOOLS/edgedect.fp for an example.

View File

@ -1,4 +1,4 @@
.\" synced with r28056
.\" synced with r28096
.\" Encoding: iso-8859-1
.\" MPlayer (C) 2000-2008 MPlayer Team
.\" The English man page was/is done by Gabucino, Diego Biurrun, Jonas Jermann
@ -3803,11 +3803,11 @@ d'un texture permise par votre impl
Faite pour fonctionner même avec l'implémentation la plus simple
l'OpenGL, mais utilise des extensions récentes, permettant de gérer
plus d'espaces de couleur et de direct rendering.
Pour une rapidité optimale, essayez quelquechose qui ressemble à
Pour une rapidité optimale, essayez quelquechose comme\ :
.br
\-vo gl:yuv=2:force\-pbo:ati\-hack \-dr \-noslices
\-vo gl:yuv=2:rectangle=2:force\-pbo:ati\-hack \-dr \-noslices
.br
Le code vérifie très peu de choses, donc si une fonction ne marche
Le code ne vérifiant que très peu de choses, si une fonction ne marche
pas, c'est peut-être parceque votre carte ou votre implémentation de
OpenGL ne la gère pas, même si aucun message d'erreur s'affiche.
Utilisez glxinfo ou un outil similaire pour afficher les extensions
@ -3911,6 +3911,10 @@ Le gamma du rouge, vert et bleu peut aussi
La vitesse de ce type de conversion dépend plus de la bande passante
de la carte vidéo que les autres méthodes.
.RE
.IPs ycbcr
Utilise l'extension GL_MESA_ycbcr_texture pour la conversion YUV vers RGB.
Dans la plupart des cas, cela est probablement plus lent que de réaliser
la conversion RGB par logiciel.
.IPs lscale=<n>
Sélection de la fonction de mise à l'échelle à utiliser pour la luminance.
Valide uniquement pour les modes yuv 2, 3, 4 et 6.
@ -3929,13 +3933,17 @@ Fonctionne avec un peu plus de cartes que la m
3: Comme 1 sauf qu'elle n'effecture pas de consultation de table de texture.
Peut être plus rapide sur certaines cartes.
.br
4: Utilise un masquage flou expérimental de taille 3x3 et d'une force de 0.5.
4: Utilise un masquage flou expérimental de taille 3x3 et d'une force de 0.5
par défaut (voir filter-strength).
.br
5: Utilise un masquage flou expérimental de taille 5x5 et d'une force de 0.5.
5: Utilise un masquage flou expérimental de taille 5x5 et d'une force de 0.5
par défaut (voir filter-strength).
.RE
.IPs cscale=<n>
Sélection de la fonction de mise à l'échelle à utiliser pour la chrominance.
Pour plus de détails, voir lscale.
.IPs filter-strength=<valeur>
Défini la force des filtres lscale/cscale.
.
.IPs customprog=<nom_fichier>
Charge un programme fragment personnalisé depuis <nom_fichier>.

View File

@ -1,4 +1,4 @@
.\" Synced with r27906
.\" Synced with r28056
.\" MPlayer (C) 2000-2008 MPlayer Team
.\" Ezt a man oldalt Gabucino, Diego Biurrun és Jonas Jermann készíti/készítette
.\" Karbantartó: Gabrov
@ -33,7 +33,7 @@
.\" Név
.\" --------------------------------------------------------------------------
.
.TH MPlayer 1 "2008. 11. 16." "MPlayer Project" "A film lejátszó"
.TH MPlayer 1 "2008. 12. 05." "MPlayer Project" "A film lejátszó"
.
.SH NÉV
mplayer \- film lejátszó
@ -3268,8 +3268,9 @@ A kezdeti poz
relatívan.
Általában a "\-fstype \-fullscreen" vagy "\-fstype none" opciókkal együtt
működik.
Ez az opció nem alkalmas csak a kezdő képernyő beállítására (sem a teljes
képernyőére), jelenleg a \-geometry a legalkalmasabb erre a célra.
Ez az opció nem alkalmas csak a kezdő képernyő beállítására (mert
a megadott képernyőn mindig teljes képernyősen jelenik meg), jelenleg
a \-geometry a legalkalmasabb erre a célra.
A gl, gl2, x11 és az xv videó kimeneti vezérlő támogatja.
.
.TP
@ -3457,11 +3458,15 @@ A vide
játsza le. Idejétmúltnak lett minősítve.
.
.TP
.B sdl (csak SDL)
.B sdl (csak SDL, hibás/idejétmúlt)
Platform független SDL (Simple Directmedia Layer) függvénykönyvtár
videó kimeneti vezérlője.
Mivel az SDL csak a saját X11 rétegét használja, az MPlayer X11
opcióinak nincs hatásuk az SDL-re.
Emlékezz rá, hogy számos kisebb hibája van (\-vm/\-novm opciót a
legtöbbször figyelmen kívül hagyja, a \-fs úgy működik, ahogy a
\-novm opciónak kellene, az ablak a bal felső sarokba kerül, ha
kikapcsolod a teljes képernyős megjelenítést, a panscan nem támogatott, ...)
.PD 0
.RSs
.IPs driver=<vezérlő>
@ -3520,6 +3525,10 @@ Ugyan az, mint a vidix-n
.PD 1
.
.TP
.B direct3d (csak Windows) (BÉTA KÓD!)
Kimeneti videó vezérlő, amely Direct3D interfészt használ (hasznos Vista-hoz).
.
.TP
.B directx (csak Windows)
Kimeneti videó vezérlő, ami a DirectX interfészét használja.
.PD 0

View File

@ -800,7 +800,7 @@ videocodec ffodivx
fourcc FVFW,fvfw
fourcc FFDS
fourcc DCOD,MVXM,EM4A,PM4V
fourcc M4T3
fourcc M4T3,DMK2
driver ffmpeg
dll mpeg4 ;opendivx
out YV12,I420,IYUV
@ -850,7 +850,7 @@ videocodec xvid
fourcc VIDM ; vidm 4.01 codec
fourcc FFDS
fourcc DCOD,MVXM,EM4A,PM4V
fourcc M4T3
fourcc M4T3,DMK2
format 0x10000004 ; mpeg 4 es
driver xvid
out YV12
@ -1014,6 +1014,15 @@ videocodec wmsdmod
guid 0x7bafb3b1, 0xd8f4, 0x4279, 0x92, 0x53, 0x27, 0xda, 0x42, 0x31, 0x08, 0xde
out BGR32,BGR24,BGR16
videocodec gotomeeting
info "GoToMeeting codec"
status working
fourcc G2M2,G2M3
driver dmo
dll "G2M.dll"
guid 0x23F891A4, 0x572B, 0x474A, 0x86, 0xDA, 0x66, 0xCD, 0xD3, 0xD1, 0xAC, 0x2E
out BGR24,RGB24 flip
videocodec ubmp4
info "UB Video MPEG-4"
comment "black&white"
@ -1247,6 +1256,7 @@ videocodec ffh263
fourcc D263 ; DEC H263
fourcc L263 ; Lead H263
fourcc ILVR ; ITU H263+
fourcc VX1K ; Agora Labs VX1000S H263
driver ffmpeg
dll h263
out YV12,I420,IYUV
@ -1860,14 +1870,13 @@ videocodec tm20
guid 0x4cb63e61, 0xc611, 0x11D0, 0x83, 0xaa, 0x00, 0x00, 0x92, 0x90, 0x01, 0x84
out BGR32,BGR24,BGR16 flip
videocodec sif1
videocodec sif1vfw
info "sif1 alpha4"
status working
fourcc SIF1
driver dshow
dll "Sif1Dec.ax"
guid 0x31666973, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71
out BGR32
driver vfw
dll "Sif1_vfw.dll"
out YV12,YUY2
videocodec ffamv
info "Modified MJPEG, used in AMV files"
@ -1893,6 +1902,15 @@ videocodec sp5x
dll "sp5x_32.dll"
out BGR24,BGR15 flip
videocodec sp4x
info "SP4x codec - used by Aiptek MegaCam"
status working
fourcc SP40,SP41,SP42,SP43,SP44,SP45
fourcc SP46,SP47
driver vfw
dll "SP4X_32.DLL"
out BGR24,BGR15 flip
videocodec bt411
info "Brooktree 411 codec"
status working
@ -1901,6 +1919,78 @@ videocodec bt411
dll "btvvc32.drv"
out BGR24
videocodec bwmpeg
info "Broadway MPEG Capture Codec"
status working
fourcc BW10
driver vfwex
dll "bw10.dll" ;requires vtaccess.dll
out YV12,YUY2,I420
videocodec zdsoft
info "zdsoft screen recorder"
status working
fourcc ZDSV
driver vfwex
dll "scrvid.dll"
out BGR32
videocodec webtrain
info "WebTrain Communication lossless screen recorder"
status working
fourcc WTVC
driver vfw
dll "wtvc.dll"
out BGR16 flip
videocodec xfire
info "xfire video"
status working
fourcc XFR1
driver vfw
dll "xfcodec.dll"
out YV12,YUY2
videocodec vfapi
info "VFAPI rgb transcode codec"
status untested
fourcc vifp
driver vfwex
dll "VFCodec.dll"
out BGR24 flip
videocodec eyecon
info "nokia eti camcorder eyecon"
status working
fourcc NUB0,NUB1,NUB2
driver vfw
dll "nub2.dll"
out YV12,YUY2
videocodec foxmotion
info "fox motion video"
status working
fourcc FMVC
driver vfw
dll "fmcodec.dll"
out BGR32,BGR24,BGR15 flip
videocodec acdsee
info "ACDSee video codec"
status working
fourcc ACDV
driver vfw
dll "ACDV.dll"
out BGR32,BGR24,BGR15 flip
videocodec tridvfw
status untested
fourcc ty2c,TY2C,ty0n
fourcc TY2N,TY0N,T565
driver vfw
dll "TRICDC32.DRV"
out BGR24 flip
videocodec vivd2
info "SoftMedia ViVD V2 codec VfW"
status working
@ -2117,6 +2207,16 @@ videocodec qtsvq1
dll "QuickTime.qts"
out YVU9
videocodec qtcine
info "cinewave uncompressed 10-bit codec"
status working
; fourcc 2yuv,R210,r210,2Vu1,R10g,R10k,r11k ;untested
fourcc v210
driver qtvideo
dll "CineWave.qtx"
out BGR32,BGR24,BGR8,Y800,RGB32,RGB24,RGB8
out YV12,YUY2
; VSS codecs (http://vsofts.com/solutions.html):
videocodec vsslight
@ -2176,10 +2276,7 @@ videocodec mszh
videocodec alaris
info "Alaris VideoGramPiX"
; http://www.alaris.com/movies/toocool.vgm
; Martin Schuster <schuster@ap.univie.ac.at>
status crashing
comment "only produces strange patterns"
status working
fourcc VGPX,VTLP VGPX
driver vfwex
dll "vgpix32d.dll"
@ -2695,6 +2792,13 @@ audiocodec qdmc
driver qtaudio
dll "QuickTime.qts"
audiocodec ffqclp
info "FFmpeg QCLP audio decoder"
status buggy
format 0x706C6351 ; "Qclp"
driver ffmpeg
dll "qcelp"
audiocodec qclp
info "QuickTime QCLP audio decoder"
status working

View File

@ -3,7 +3,7 @@
//... Okay enough of the hw, now send the other two!
//
// Updated by: Gabrov <gabrov@freemail.hu>
// Sync'ed with help_mp-en.h r27402 (2008. 08. 06.)
// Sync'ed with help_mp-en.h r27967 (2008. 12. 05.)
// ========================= MPlayer help ===========================
@ -52,7 +52,7 @@ static char help_text[]=
// ========================= MPlayer messages ===========================
// mplayer.c:
// mplayer.c
#define MSGTR_Exiting "\nKilépés...\n"
#define MSGTR_ExitingHow "\nKilépés... (%s)\n"
#define MSGTR_Exit_quit "Kilépés"
@ -183,6 +183,7 @@ static char help_text[]=
#define MSGTR_DvdnavNavSeekDone "DVDNAV esemény: Nav keresés kész\n"
#define MSGTR_MenuCall "Menü hívás\n"
// --- edit decision lists
#define MSGTR_EdlOutOfMem "Nem lehet elegendő memóriát foglalni az EDL adatoknak.\n"
#define MSGTR_EdlRecordsNo "%d EDL akciók olvasása.\n"
#define MSGTR_EdlQueueEmpty "Nincs olyan EDL akció, amivel foglalkozni kellene.\n"
@ -252,7 +253,7 @@ static char help_text[]=
#define MSGTR_SubVisibleStatus "Feliratok: %s"
#define MSGTR_SubForcedOnlyStatus "Csak kényszerített felirat: %s"
// mencoder.c:
// mencoder.c
#define MSGTR_UsingPass3ControlFile "Pass3 vezérlő fájl használata: %s\n"
#define MSGTR_MissingFilename "\nHiányzó fájlnév!\n\n"
#define MSGTR_CannotOpenFile_Device "Fájl/eszköz megnyitása sikertelen.\n"
@ -417,7 +418,7 @@ static char help_text[]=
#define MSGTR_CouldntOpenCodec "A(z) %s codec nem nyitható meg, br=%d.\n"
#define MSGTR_CantCopyAudioFormat "A(z) 0x%x audió formátum nem kompatibilis a '-oac copy'-val, kérlek próbáld meg a '-oac pcm' helyette vagy használd a '-fafmttag'-ot a felülbírálásához.\n"
// cfg-mencoder.h:
// cfg-mencoder.h
#define MSGTR_MEncoderMP3LameHelp "\n\n"\
" vbr=<0-4> a változó bitrátájú kódolás módja\n"\
" 0: cbr (konstans bitráta)\n"\
@ -466,7 +467,7 @@ static char help_text[]=
" (320 kbps bitráta)\n"\
" <8-320>: ABR kódolás átlagban a megadott bitrátával.\n\n"
//codec-cfg.c:
// codec-cfg.c
#define MSGTR_DuplicateFourcc "dupla FourCC"
#define MSGTR_TooManyFourccs "túl sok FourCCs/formátum..."
#define MSGTR_ParseError "értelmezési hiba"
@ -677,7 +678,6 @@ static char help_text[]=
#define MSGTR_PREFERENCES_Codecs "Kodekek és demuxerek"
// Megjegyzés: Ha megváltoztatod az MSGTR_PREFERENCES_Misc-et, nézd meg, hogy megfelel-e az MSGTR_PREFERENCES_FRAME_Misc-nek is!
#define MSGTR_PREFERENCES_Misc "Egyéb"
#define MSGTR_PREFERENCES_None "Egyik sem"
#define MSGTR_PREFERENCES_DriverDefault "alapértelmezett vezérlő"
#define MSGTR_PREFERENCES_AvailableDrivers "Driverek:"
@ -778,6 +778,7 @@ static char help_text[]=
#define MSGTR_PREFERENCES_ArtsBroken "Az újabb aRts verziók inkompatibilisek "\
"a GTK 1.x-szel és összeomlasztják a GMPlayert!"
// -- aboutbox
#define MSGTR_ABOUT_UHU "GUI fejlesztést az UHU Linux támogatta\n"
#define MSGTR_ABOUT_Contributors "Kód és dokumentáció közreműködői\n"
#define MSGTR_ABOUT_Codecs_libs_contributions "Codec-ek és third party könyvtárak\n"
@ -822,7 +823,6 @@ static char help_text[]=
#define MSGTR_WS_NotAFile "Úgy tűnik, hogy ez nem fájl...\n"
#define MSGTR_WS_DDNothing "D&D: Semmi sem jött vissza!\n"
// ======================= video output drivers ========================
#define MSGTR_VOincompCodec "A kiválasztott video_out eszköz nem kompatibilis ezzel a codec-kel.\n"\
@ -1375,7 +1375,7 @@ static char help_text[]=
#define MSGTR_INPUT_INPUT_ErrCantOpenFile "Nem nyitható meg %s: %s\n"
#define MSGTR_INPUT_INPUT_ErrCantInitAppleRemote "Apple Remote inicializálása nem sikerült.\n"
// lirc.c:
// lirc.c
#define MSGTR_SettingUpLIRC "LIRC támogatás indítása...\n"
#define MSGTR_LIRCopenfailed "Nem tudtam megnyitni a lirc támogatást. Nem fogod tudni használni a távirányítót.\n"
#define MSGTR_LIRCcfgerr "Nem tudom olvasni a LIRC konfigurációs fájlt: %s \n"
@ -1383,7 +1383,7 @@ static char help_text[]=
// ========================== LIBMPDEMUX ===================================
// muxer.c, muxer_*.c:
// muxer.c, muxer_*.c
#define MSGTR_TooManyStreams "Túl sok stream!"
#define MSGTR_RawMuxerOnlyOneStream "A rawaudio muxer csak egy audió folyamot támogat!\n"
#define MSGTR_IgnoringVideoStream "Videó folyam figyelmen kívül hagyva!\n"
@ -1395,7 +1395,7 @@ static char help_text[]=
#define MSGTR_WritingHeader "Fejléc írása...\n"
#define MSGTR_WritingTrailer "Index írása...\n"
// demuxer.c, demux_*.c:
// demuxer.c, demux_*.c
#define MSGTR_AudioStreamRedefined "Vigyázat! Többszörösen definiált Audio-folyam: %d (Hibás fájl?)\n"
#define MSGTR_VideoStreamRedefined "Vigyázat! Többszörösen definiált Video-folyam: %d (Hibás fájl?)\n"
#define MSGTR_TooManyAudioInBuffer "\nDEMUXER: Túl sok (%d db, %d bájt) audio-csomag a pufferben!\n"

View File

@ -209,7 +209,7 @@ typedef int (*mp_cmd_func_t)(int fd,char* dest,int size);
typedef void (*mp_close_func_t)(int fd);
// Set this to grab all incoming key codes
int (*mp_input_key_cb)(int code);
extern int (*mp_input_key_cb)(int code);
// Should return 1 if the command was processed
typedef int (*mp_input_cmd_filter)(mp_cmd_t* cmd, int paused, void* ctx);

View File

@ -20,7 +20,7 @@ typedef struct af_hrtf_s {
int dlbuflen, hrflen, basslen;
/* L, C, R, Ls, Rs channels */
float *lf, *rf, *lr, *rr, *cf, *cr;
float *cf_ir, *af_ir, *of_ir, *ar_ir, *or_ir, *cr_ir;
const float *cf_ir, *af_ir, *of_ir, *ar_ir, *or_ir, *cr_ir;
int cf_o, af_o, of_o, ar_o, or_o, cr_o;
/* Bass */
float *ba_l, *ba_r;
@ -59,7 +59,7 @@ typedef struct af_hrtf_s {
* sk: convolution kernel
* offset: offset on the ring buffer, can be
*/
static float conv(const int nx, const int nk, float *sx, float *sk,
static float conv(const int nx, const int nk, const float *sx, const float *sk,
const int offset)
{
/* k = reminder of offset / nx */
@ -73,7 +73,7 @@ static float conv(const int nx, const int nk, float *sx, float *sk,
}
/* Detect when the impulse response starts (significantly) */
static int pulse_detect(float *sx)
static int pulse_detect(const float *sx)
{
/* nmax must be the reference impulse response length (128) minus
s->hrflen */

View File

@ -78,6 +78,8 @@ void (APIENTRY *ProgramEnvParameter4f)(GLenum, GLuint, GLfloat, GLfloat,
int (APIENTRY *SwapInterval)(int);
void (APIENTRY *TexImage3D)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei,
GLint, GLenum, GLenum, const GLvoid *);
void* (APIENTRY *AllocateMemoryMESA)(void *, int, size_t, float, float, float);
void (APIENTRY *FreeMemoryMESA)(void *, int, void *);
/** \} */ // end of glextfunctions group
//! \defgroup glgeneral OpenGL general helper functions
@ -213,6 +215,13 @@ int glFindFormat(uint32_t fmt, int *bpp, GLint *gl_texfmt,
*gl_format = GL_LUMINANCE;
*gl_type = GL_UNSIGNED_BYTE;
break;
case IMGFMT_UYVY:
case IMGFMT_YUY2:
*gl_texfmt = GL_YCBCR_MESA;
*bpp = 16;
*gl_format = GL_YCBCR_MESA;
*gl_type = fmt == IMGFMT_UYVY ? GL_UNSIGNED_SHORT_8_8 : GL_UNSIGNED_SHORT_8_8_REV;
break;
#if 0
// we do not support palettized formats, although the format the
// swscale produces works
@ -306,6 +315,8 @@ static const extfunc_desc_t extfuncs[] = {
{&ProgramEnvParameter4f, "_program", {"glProgramEnvParameter4fARB", NULL}},
{&SwapInterval, "_swap_control", {"glXSwapInterval", "glXSwapIntervalEXT", "glXSwapIntervalSGI", "wglSwapInterval", "wglSwapIntervalEXT", "wglSwapIntervalSGI", NULL}},
{&TexImage3D, NULL, {"glTexImage3D", NULL}},
{&AllocateMemoryMESA, "GLX_MESA_allocate_memory", {"glXAllocateMemoryMESA", NULL}},
{&FreeMemoryMESA, "GLX_MESA_allocate_memory", {"glXFreeMemoryMESA", NULL}},
{NULL}
};
@ -485,6 +496,8 @@ int glFmt2bpp(GLenum format, GLenum type) {
case GL_LUMINANCE:
case GL_ALPHA:
return component_size;
case GL_YCBCR_MESA:
return 2;
case GL_RGB:
case GL_BGR:
return 3 * component_size;

View File

@ -210,6 +210,15 @@
#ifndef GL_UNSIGNED_SHORT_1_5_5_5_REV
#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
#endif
#ifndef GL_UNSIGNED_SHORT_8_8
#define GL_UNSIGNED_SHORT_8_8 0x85BA
#endif
#ifndef GL_UNSIGNED_SHORT_8_8_REV
#define GL_UNSIGNED_SHORT_8_8_REV 0x85BB
#endif
#ifndef GL_YCBCR_MESA
#define GL_YCBCR_MESA 0x8757
#endif
#ifndef GL_RGB32F
#define GL_RGB32F 0x8815
#endif
@ -375,5 +384,7 @@ extern void (APIENTRY *ProgramEnvParameter4f)(GLenum, GLuint, GLfloat, GLfloat,
extern int (APIENTRY *SwapInterval)(int);
extern void (APIENTRY *TexImage3D)(GLenum, GLint, GLenum, GLsizei, GLsizei,
GLsizei, GLint, GLenum, GLenum, const GLvoid *);
extern void* (APIENTRY *AllocateMemoryMESA)(void *, int, size_t, float, float, float);
extern void (APIENTRY *FreeMemoryMESA)(void *, int, void *);
#endif /* MPLAYER_GL_COMMON_H */

View File

@ -71,6 +71,7 @@ static int eosdtexCnt;
static int osd_color;
static int use_aspect;
static int use_ycbcr;
static int use_yuv;
static int lscale;
static int cscale;
@ -84,6 +85,7 @@ static uint32_t image_format;
static int many_fmts;
static int ati_hack;
static int force_pbo;
static int mesa_buffer;
static int use_glFinish;
static int swap_interval;
static GLenum gl_target;
@ -96,6 +98,8 @@ static int gl_buffersize;
static int gl_buffersize_uv;
static void *gl_bufferptr;
static void *gl_bufferptr_uv[2];
static int mesa_buffersize;
static void *mesa_bufferptr;
static GLuint fragprog;
static GLuint default_texs[22];
static char *custom_prog;
@ -388,6 +392,11 @@ static void uninitGl(void) {
DeleteBuffers(2, gl_buffer_uv);
gl_buffer_uv[0] = gl_buffer_uv[1] = 0; gl_buffersize_uv = 0;
gl_bufferptr_uv[0] = gl_bufferptr_uv[1] = 0;
#ifndef GL_WIN32
if (mesa_bufferptr)
FreeMemoryMESA(mDisplay, mScreen, mesa_bufferptr);
#endif
mesa_bufferptr = NULL;
err_shown = 0;
}
@ -680,6 +689,7 @@ static int draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y)
}
static uint32_t get_image(mp_image_t *mpi) {
int needed_size;
if (!GenBuffers || !BindBuffer || !BufferData || !MapBuffer) {
if (!err_shown)
mp_msg(MSGT_VO, MSGL_ERR, "[gl] extensions missing for dr\n"
@ -692,19 +702,33 @@ static uint32_t get_image(mp_image_t *mpi) {
mpi->width = texture_width;
mpi->height = texture_height;
}
if (!gl_buffer)
GenBuffers(1, &gl_buffer);
BindBuffer(GL_PIXEL_UNPACK_BUFFER, gl_buffer);
mpi->stride[0] = mpi->width * mpi->bpp / 8;
if (mpi->stride[0] * mpi->height > gl_buffersize) {
BufferData(GL_PIXEL_UNPACK_BUFFER, mpi->stride[0] * mpi->height,
NULL, GL_DYNAMIC_DRAW);
gl_buffersize = mpi->stride[0] * mpi->height;
needed_size = mpi->stride[0] * mpi->height;
if (mesa_buffer) {
#ifndef GL_WIN32
if (mesa_bufferptr && needed_size > mesa_buffersize) {
FreeMemoryMESA(mDisplay, mScreen, mesa_bufferptr);
mesa_bufferptr = NULL;
}
if (!mesa_bufferptr)
mesa_bufferptr = AllocateMemoryMESA(mDisplay, mScreen, needed_size, 0, 0, 0);
mesa_buffersize = needed_size;
#endif
mpi->planes[0] = mesa_bufferptr;
} else {
if (!gl_buffer)
GenBuffers(1, &gl_buffer);
BindBuffer(GL_PIXEL_UNPACK_BUFFER, gl_buffer);
if (needed_size > gl_buffersize) {
gl_buffersize = needed_size;
BufferData(GL_PIXEL_UNPACK_BUFFER, gl_buffersize,
NULL, GL_DYNAMIC_DRAW);
}
if (!gl_bufferptr)
gl_bufferptr = MapBuffer(GL_PIXEL_UNPACK_BUFFER, GL_WRITE_ONLY);
mpi->planes[0] = gl_bufferptr;
BindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
}
if (!gl_bufferptr)
gl_bufferptr = MapBuffer(GL_PIXEL_UNPACK_BUFFER, GL_WRITE_ONLY);
mpi->planes[0] = gl_bufferptr;
BindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
if (!mpi->planes[0]) {
if (!err_shown)
mp_msg(MSGT_VO, MSGL_ERR, "[gl] could not acquire buffer for dr\n"
@ -769,7 +793,7 @@ static uint32_t draw_image(mp_image_t *mpi) {
stride[0] = mpi->stride[0]; stride[1] = mpi->stride[1]; stride[2] = mpi->stride[2];
planes[0] = mpi->planes[0]; planes[1] = mpi->planes[1]; planes[2] = mpi->planes[2];
mpi_flipped = stride[0] < 0;
if (mpi->flags & MP_IMGFLAG_DIRECT) {
if (!mesa_buffer && mpi->flags & MP_IMGFLAG_DIRECT) {
intptr_t base = (intptr_t)planes[0];
if (mpi_flipped)
base += (mpi->h - 1) * stride[0];
@ -779,10 +803,11 @@ static uint32_t draw_image(mp_image_t *mpi) {
BindBuffer(GL_PIXEL_UNPACK_BUFFER, gl_buffer);
UnmapBuffer(GL_PIXEL_UNPACK_BUFFER);
gl_bufferptr = NULL;
slice = 0; // always "upload" full texture
if (!(mpi->flags & MP_IMGFLAG_COMMON_PLANE))
planes[0] = planes[1] = planes[2] = NULL;
}
if (mpi->flags & MP_IMGFLAG_DIRECT)
slice = 0; // always "upload" full texture
glUploadTex(gl_target, gl_format, gl_type, planes[0], stride[0],
mpi->x, mpi->y, w, h, slice);
if (mpi->imgfmt == IMGFMT_YV12) {
@ -804,7 +829,7 @@ static uint32_t draw_image(mp_image_t *mpi) {
mpi->x / 2, mpi->y / 2, w / 2, h / 2, slice);
ActiveTexture(GL_TEXTURE0);
}
if (mpi->flags & MP_IMGFLAG_DIRECT)
if (!mesa_buffer && mpi->flags & MP_IMGFLAG_DIRECT)
BindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
skip_upload:
if (vo_doublebuffering) do_render();
@ -833,6 +858,8 @@ query_format(uint32_t format)
// ideally MPlayer should be fixed instead not to use Y800 when it has the choice
if (!use_yuv && (format == IMGFMT_Y8 || format == IMGFMT_Y800))
return 0;
if (!use_ycbcr && (format == IMGFMT_UYVY || format == IMGFMT_YUY2))
return 0;
if (many_fmts &&
glFindFormat(format, NULL, NULL, NULL, NULL))
return caps;
@ -858,6 +885,7 @@ static opt_t subopts[] = {
{"osd", OPT_ARG_BOOL, &use_osd, NULL},
{"scaled-osd", OPT_ARG_BOOL, &scaled_osd, NULL},
{"aspect", OPT_ARG_BOOL, &use_aspect, NULL},
{"ycbcr", OPT_ARG_BOOL, &use_ycbcr, NULL},
{"slice-height", OPT_ARG_INT, &slice_height, (opt_test_f)int_non_neg},
{"rectangle", OPT_ARG_INT, &use_rectangle,(opt_test_f)int_non_neg},
{"yuv", OPT_ARG_INT, &use_yuv, (opt_test_f)int_non_neg},
@ -866,6 +894,7 @@ static opt_t subopts[] = {
{"filter-strength", OPT_ARG_FLOAT, &filter_strength, NULL},
{"ati-hack", OPT_ARG_BOOL, &ati_hack, NULL},
{"force-pbo", OPT_ARG_BOOL, &force_pbo, NULL},
{"mesa-buffer", OPT_ARG_BOOL, &mesa_buffer, NULL},
{"glfinish", OPT_ARG_BOOL, &use_glFinish, NULL},
{"swapinterval", OPT_ARG_INT, &swap_interval,NULL},
{"customprog", OPT_ARG_MSTRZ,&custom_prog, NULL},
@ -883,6 +912,7 @@ static int preinit(const char *arg)
use_osd = 1;
scaled_osd = 0;
use_aspect = 1;
use_ycbcr = 0;
use_yuv = 0;
lscale = 0;
cscale = 0;
@ -891,6 +921,7 @@ static int preinit(const char *arg)
use_glFinish = 0;
ati_hack = 0;
force_pbo = 0;
mesa_buffer = 0;
swap_interval = 1;
slice_height = 0;
custom_prog = NULL;
@ -909,6 +940,8 @@ static int preinit(const char *arg)
" Slice size for texture transfer, 0 for whole image\n"
" noosd\n"
" Do not use OpenGL OSD code\n"
" scaled-osd\n"
" Render OSD at movie resolution and scale it\n"
" noaspect\n"
" Do not do aspect scaling\n"
" rectangle=<0,1,2>\n"
@ -938,9 +971,12 @@ static int preinit(const char *arg)
" 1: use improved bicubic scaling for luma.\n"
" 2: use cubic in X, linear in Y direction scaling for luma.\n"
" 3: as 1 but without using a lookup texture.\n"
" 4: experimental unsharp masking.\n"
" 4: experimental unsharp masking (sharpening).\n"
" 5: experimental unsharp masking (sharpening) with larger radius.\n"
" cscale=<n>\n"
" as lscale but for chroma (2x slower with little visible effect).\n"
" filter-strength=<value>\n"
" set the effect strength for some lscale/cscale filters\n"
" customprog=<filename>\n"
" use a custom YUV conversion program\n"
" customtex=<filename>\n"
@ -951,6 +987,8 @@ static int preinit(const char *arg)
" use texture_rectangle for customtex texture\n"
" osdcolor=<0xAARRGGBB>\n"
" use the given color for the OSD\n"
" ycbcr\n"
" also try to use the GL_MESA_ycbcr_texture extension\n"
"\n" );
return -1;
}

View File

@ -1165,6 +1165,13 @@ void vo_x11_sizehint(struct vo *vo, int x, int y, int width, int height, int max
x11->vo_hint.flags |= PMinSize;
x11->vo_hint.min_width = x11->vo_hint.min_height = 4;
// Set the base size. A window manager might display the window
// size to the user relative to this.
// Setting these to width/height might be nice, but e.g. fluxbox can't handle it.
x11->vo_hint.flags |= PBaseSize;
x11->vo_hint.base_width = 0 /*width*/;
x11->vo_hint.base_height = 0 /*height*/;
x11->vo_hint.flags |= PWinGravity;
x11->vo_hint.win_gravity = StaticGravity;
XSetWMNormalHints(x11->display, x11->window, &x11->vo_hint);

View File

@ -11,7 +11,7 @@ typedef int (*wrapper_func_t)(void *stack_base, int stack_size, reg386_t *reg,
extern wrapper_func_t report_entry, report_ret;
void (*wrapper_target)(void);
extern void (*wrapper_target)(void);
int wrapper(void);
int null_call(void);