From 45904b63eff9336036d3df27622eb298cbc9f6f6 Mon Sep 17 00:00:00 2001 From: reimar Date: Thu, 4 Dec 2008 15:07:15 +0000 Subject: [PATCH 01/16] Re-add "extern"s incorrectly removed in r28085 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28088 b3059339-0415-0410-9bf9-f77b7e298cf2 --- input/input.h | 2 +- loader/wrapper.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/input/input.h b/input/input.h index 9f92e1f636..8cb1b9730e 100644 --- a/input/input.h +++ b/input/input.h @@ -217,7 +217,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); diff --git a/loader/wrapper.h b/loader/wrapper.h index 346f9e0e64..64fbe94217 100644 --- a/loader/wrapper.h +++ b/loader/wrapper.h @@ -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); From dbbff8bd78c4aee1bdbf94c17726ccae49a09c46 Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 4 Dec 2008 18:11:05 +0000 Subject: [PATCH 02/16] Add entry for FFmpeg QCELP decoder, currently produces white noise. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28089 b3059339-0415-0410-9bf9-f77b7e298cf2 --- etc/codecs.conf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/etc/codecs.conf b/etc/codecs.conf index 1786822d62..67f372a1eb 100644 --- a/etc/codecs.conf +++ b/etc/codecs.conf @@ -2695,6 +2695,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 From 8c0897e81e374ee1775a0a25c72a0d9e71a9139c Mon Sep 17 00:00:00 2001 From: Gabrov Date: Fri, 5 Dec 2008 09:57:37 +0000 Subject: [PATCH 03/16] synced with r28089 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28090 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/man/hu/mplayer.1 | 19 ++++++++++++++----- help/help_mp-hu.h | 20 ++++++++++---------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/DOCS/man/hu/mplayer.1 b/DOCS/man/hu/mplayer.1 index 368fd62f29..473451b3b8 100644 --- a/DOCS/man/hu/mplayer.1 +++ b/DOCS/man/hu/mplayer.1 @@ -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= @@ -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 diff --git a/help/help_mp-hu.h b/help/help_mp-hu.h index 7744291dc1..5fb458e785 100644 --- a/help/help_mp-hu.h +++ b/help/help_mp-hu.h @@ -3,7 +3,7 @@ //... Okay enough of the hw, now send the other two! // // Updated by: Gabrov -// 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" From fa7614e9aa550d5c5f0b28a87e5b3ab91a7c2a77 Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 5 Dec 2008 14:21:22 +0000 Subject: [PATCH 04/16] Add const to avoid warnings about discarded qualifiers. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28091 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libaf/af_hrtf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libaf/af_hrtf.c b/libaf/af_hrtf.c index e8d0b9cd14..fe16823b9f 100644 --- a/libaf/af_hrtf.c +++ b/libaf/af_hrtf.c @@ -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 */ From 403cf73c9742e574f59e9a2f87b904a4bd4ec3fe Mon Sep 17 00:00:00 2001 From: compn Date: Fri, 5 Dec 2008 14:50:48 +0000 Subject: [PATCH 05/16] add a bunch of binary codecs with samples from this list: http://home.twmi.rr.com/compn/uncommon_video_codecs_final.txt change sif1 codec to vfw since the dshow codec was terrible mark videocodec alaris as working git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28092 b3059339-0415-0410-9bf9-f77b7e298cf2 --- etc/codecs.conf | 119 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 108 insertions(+), 11 deletions(-) diff --git a/etc/codecs.conf b/etc/codecs.conf index 67f372a1eb..5322147928 100644 --- a/etc/codecs.conf +++ b/etc/codecs.conf @@ -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 - status crashing - comment "only produces strange patterns" + status working fourcc VGPX,VTLP VGPX driver vfwex dll "vgpix32d.dll" From 0ca415447d33c75469724e16aba6385fd80691db Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 5 Dec 2008 15:36:54 +0000 Subject: [PATCH 06/16] Add support for YCBCR MESA texture format to vo_gl. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28093 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/gl_common.c | 9 +++++++++ libvo/gl_common.h | 9 +++++++++ libvo/vo_gl.c | 5 +++++ 3 files changed, 23 insertions(+) diff --git a/libvo/gl_common.c b/libvo/gl_common.c index eeb19feb54..4ff2a86320 100644 --- a/libvo/gl_common.c +++ b/libvo/gl_common.c @@ -212,6 +212,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 @@ -484,6 +491,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; diff --git a/libvo/gl_common.h b/libvo/gl_common.h index 2408b1a2e9..22e06eb60f 100644 --- a/libvo/gl_common.h +++ b/libvo/gl_common.h @@ -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 diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index fc7951d39f..736d9f6ae7 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -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; @@ -833,6 +834,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 +861,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}, @@ -883,6 +887,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; From 173e7ebc35f2a042f7422fa4350206895e7faa02 Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 5 Dec 2008 15:50:24 +0000 Subject: [PATCH 07/16] Add some forgotten documentation for gl suboptions git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28094 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_gl.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index 736d9f6ae7..452a086b38 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -914,6 +914,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" @@ -943,9 +945,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" " as lscale but for chroma (2x slower with little visible effect).\n" + " filter-strength=\n" + " set the effect strength for some lscale/cscale filters\n" " customprog=\n" " use a custom YUV conversion program\n" " customtex=\n" @@ -956,6 +961,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; } From c6f6d46ace8cbc223254a5506e430075a0c52908 Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 5 Dec 2008 15:54:31 +0000 Subject: [PATCH 08/16] Document missing vo_gl suboptions git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28095 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/man/en/mplayer.1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index 222c762f17..284526a05a 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -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= 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= Select the scaling function to use for chrominance scaling. For details see lscale. +.IPs filter-strength= +Set the effect strength for the lscale/cscale filters that support it. .IPs customprog= Load a custom fragment program from . See TOOLS/edgedect.fp for an example. From d8185b1040341c423504b22328aecfd2bc44fc5c Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 5 Dec 2008 15:55:25 +0000 Subject: [PATCH 09/16] Using rectangle=2 for vo_gl is probably a good idea nowadays. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28096 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/man/en/mplayer.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index 284526a05a..7ed4e19d56 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -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 From 476c9bfd95314fa05076cc6bfcda29ef334c5804 Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 5 Dec 2008 19:01:49 +0000 Subject: [PATCH 10/16] Set the base size window manager hint, otherwise some subtract the minimum size of 4x4 from the numbers displayed to the user which might be confusing. Based on patch by Bert Wesarg [bert wesarg googlemail com]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28097 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/x11_common.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libvo/x11_common.c b/libvo/x11_common.c index 883ada7715..dcbac97bbc 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -1191,6 +1191,13 @@ void vo_x11_sizehint(int x, int y, int width, int height, int max) vo_hint.flags |= PMinSize; vo_hint.min_width = 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. + vo_hint.flags |= PBaseSize; + vo_hint.base_width = 0 /*width*/; + vo_hint.base_height = 0 /*height*/; + vo_hint.flags |= PWinGravity; vo_hint.win_gravity = StaticGravity; XSetWMNormalHints(mDisplay, vo_window, &vo_hint); From e7d53f6d86eee73e0f48ad1032dfd67acd884a73 Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 5 Dec 2008 20:50:43 +0000 Subject: [PATCH 11/16] Simplify, do not duplicate buffer size calculation git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28098 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_gl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index 452a086b38..0bcd5c363a 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -698,9 +698,9 @@ static uint32_t get_image(mp_image_t *mpi) { 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; + BufferData(GL_PIXEL_UNPACK_BUFFER, gl_buffersize, + NULL, GL_DYNAMIC_DRAW); } if (!gl_bufferptr) gl_bufferptr = MapBuffer(GL_PIXEL_UNPACK_BUFFER, GL_WRITE_ONLY); From 7fd346bc71d8bf204c5fddd2ad532e7adb4794b9 Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 5 Dec 2008 20:56:49 +0000 Subject: [PATCH 12/16] Avoid one more duplicated logic. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28099 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_gl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index 0bcd5c363a..74142d5039 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -681,6 +681,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" @@ -697,8 +698,9 @@ static uint32_t get_image(mp_image_t *mpi) { 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) { - gl_buffersize = mpi->stride[0] * mpi->height; + needed_size = mpi->stride[0] * mpi->height; + if (needed_size > gl_buffersize) { + gl_buffersize = needed_size; BufferData(GL_PIXEL_UNPACK_BUFFER, gl_buffersize, NULL, GL_DYNAMIC_DRAW); } From 72200eda4e17dd232c6708c8a482deb8b83c9d6b Mon Sep 17 00:00:00 2001 From: gpoirier Date: Fri, 5 Dec 2008 21:46:28 +0000 Subject: [PATCH 13/16] sync w/r28096 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28100 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/man/fr/mplayer.1 | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/DOCS/man/fr/mplayer.1 b/DOCS/man/fr/mplayer.1 index b1a6491df8..d543979229 100644 --- a/DOCS/man/fr/mplayer.1 +++ b/DOCS/man/fr/mplayer.1 @@ -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= 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= Sélection de la fonction de mise ŕ l'échelle ŕ utiliser pour la chrominance. Pour plus de détails, voir lscale. +.IPs filter-strength= +Défini la force des filtres lscale/cscale. . .IPs customprog= Charge un programme fragment personnalisé depuis . From b6e113841c96daf383c5a9dfa8b406a1d5ab11f0 Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 5 Dec 2008 22:16:45 +0000 Subject: [PATCH 14/16] Add experimental support for glXAllocateMemoryMESA git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28101 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/gl_common.c | 4 ++++ libvo/gl_common.h | 2 ++ libvo/vo_gl.c | 32 +++++++++++++++++++++++++++----- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/libvo/gl_common.c b/libvo/gl_common.c index 4ff2a86320..fd85c3d6bf 100644 --- a/libvo/gl_common.c +++ b/libvo/gl_common.c @@ -77,6 +77,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 @@ -312,6 +314,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} }; diff --git a/libvo/gl_common.h b/libvo/gl_common.h index 22e06eb60f..31a21a5ff0 100644 --- a/libvo/gl_common.h +++ b/libvo/gl_common.h @@ -384,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 */ diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index 74142d5039..e5fd57daae 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -85,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; @@ -97,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; @@ -389,6 +392,9 @@ 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; + if (mesa_bufferptr) + FreeMemoryMESA(mDisplay, mScreen, mesa_bufferptr); + mesa_bufferptr = NULL; err_shown = 0; } @@ -694,11 +700,23 @@ static uint32_t get_image(mp_image_t *mpi) { mpi->width = texture_width; mpi->height = texture_height; } + mpi->stride[0] = mpi->width * mpi->bpp / 8; + 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); - mpi->stride[0] = mpi->width * mpi->bpp / 8; - needed_size = mpi->stride[0] * mpi->height; if (needed_size > gl_buffersize) { gl_buffersize = needed_size; BufferData(GL_PIXEL_UNPACK_BUFFER, gl_buffersize, @@ -708,6 +726,7 @@ static uint32_t get_image(mp_image_t *mpi) { 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" @@ -772,7 +791,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]; @@ -782,10 +801,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) { @@ -807,7 +827,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(); @@ -872,6 +892,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}, @@ -898,6 +919,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; From a86076ac44279ef6b60b9d90dbf81ad4adfddebb Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 5 Dec 2008 22:35:24 +0000 Subject: [PATCH 15/16] Fix indentation git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28102 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_gl.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index e5fd57daae..ba60ea8bff 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -714,18 +714,18 @@ static uint32_t get_image(mp_image_t *mpi) { #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_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 (!mpi->planes[0]) { if (!err_shown) From c6ef66231818b90c75f84b9407730647c93f040c Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 5 Dec 2008 23:35:32 +0000 Subject: [PATCH 16/16] 10l, add forgotten a #ifndef GL_WIN32, fixes win32 builds. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28103 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_gl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index ba60ea8bff..21d310e170 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -392,8 +392,10 @@ 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; }