summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
Commit message (Collapse)AuthorAgeFilesLines
* vf_rectangle: remove as it is very dirty and we have a replacement nowRudolf Polzer2012-09-185-199/+0
|
* vf_dlopen: improve performance for 1-frame-for-1-frame filtersRudolf Polzer2012-09-181-21/+53
| | | | | | This is done by requesting a buffer from the next filter in the chain, instead of always allocating our own. This allows the next filter to e.g. ensure its own preferred memory layout.
* ad_dvdpcm: add back PCM decoder for DVDwm42012-09-182-0/+164
| | | | | | This is needed by demux_mpg (and possibly by demux_ts) for PCM playback. The decoder does the mapping from MPEG headers to the actual PCM format, and also unpacks sample data for 20/24 bit formats.
* subs, vo_vdpau: support RGBA color for PGS subtitlesUoti Urpala2012-09-183-0/+3
| | | | | | | | | | | | | | | | | | | | | | Support passing bitmap subtitles to VOs in full RGBA color, and implement this for libavcodec-decoded subtitle formats on decoding side and vo_vdpau on display side. Currently this is enabled for PGS (blu-ray) and DVB subtitles. VDPAU seems to have sampling issues similar to known GL ones when drawing a sub-rectangle from a larger texture with scaling, where adjacent pixels outside the specified source rectangle affect the result. As the bitmap subtitles may be scaled, add padding support to the bitmap packer code. In principle, this could be used for colored DVD subtitles too. However, the libavcodec DVD decoder lacks parts of the resolution and palette handling that are present in spudec.c. Conflicts: libvo/vo_gl.c sub/dec_sub.h sub/sd_lavc.c
* rawaudio: use mplayer audio format for format optionwm42012-09-181-0/+6
| | | | | | | | | | | | | | | The rawaudio demuxer had a rather hard to use way to set the audio format with the --rawaudio=format=value option. The user had to pass a numeric value, which then was set as wFormatTag member in the WAVEFORMATEX header. Make it use the mplayer audio format (the same as --af=format=value). Add a new internal pseudo audio codec tag, which is hopefully unused, which makes ad_pcm use the value in wFormatTag as internal mplayer audio format. Playing non-PCM formats is disabled. (At least AC3 can be played directly.)
* dec_audio: do not overwrite sh_audio->wf->wFormatTagwm42012-09-181-8/+2
| | | | | | | | | No decoder actually used this value (except ad_acm, which was removed a while ago), so this change shouldn't have any bad consequences. ad_ffmpeg passes wf to libavcodec decoders, but only the extra data portion. This change is needed by the next commit.
* ad_pcm: add back raw decoderwm42012-09-182-0/+216
| | | | | | | | | | | This was removed in commit 6a26b4a66504. Add it back, because it was needed by demuxer_rawaudio and for PCM audio with demuxers other than demux_lavf. (In practice, this broke rawaudio and PCM-in-Matroska only.) Unlike with raw video, there is no single raw audio "decoder" in libavcodec. Instead of trying to mess raw audio input into ad_ffmpeg using a table to map audio formats to the respective libavcodec decoders, it seems advantageous to simply add back ad_pcm.
* demuxer: remove ImageDesc fieldwm42012-09-181-21/+0
| | | | | | | | | | | | | | | | | | This was needed by the now-removed mov demuxer for QuickTime video, or to be more specific, the Sorenson 3 video codec. QuickTime can (probably) still decoded by libavcodec, but this field is not needed for this. The reference in demux_mkv was apparently for decoding QuickTime in Matroska, using binary QuickTime codecs (QTX stuff). It's possible that this has been broken with the binary codecs removal (see commit aebfbbf2bdd), because it removed related code from demux_mkv. On the other hand, the code section in question was enabled only if binary win32 codecs were enabled. The win32 codec loader worked on 32 bit x86 only. This means QuickTime-in-Matroska was broken on all other architectures, including 64 bit x86. Despite being possibly broken on a major platform, nobody has complained about it yet, and since I couldn't find a sample of such a mkv file, so don't bother with it.
* subs, vo: do sub bitmap change detection by comparing IDsUoti Urpala2012-09-181-15/+1
| | | | | | | | | | | | | | | | | vo_vdpau and vo_gl cache the last subtitle bitmaps uploaded to video card in case they stay the same over multiple frames. Detecting whether the bitmaps have changed and should be re-uploaded was somewhat fragile. Change the VO API to provide a bitmap ID which can be compared with what the VO has to determine whether a new upload of the bitmaps is needed. Conflicts: libvo/vo_gl.c Note: the changes for vo_gl.c were not merged. Instead, eosd_packer is modified to use the new way of detecting EOSD changes. This takes care of vo_gl, vo_gl3 and vo_direct3d, which all render EOSD. They don't need to be updated in turn.
* subs: always use sub decoder framework for libass renderingUoti Urpala2012-09-182-35/+25
| | | | | | | | | | | | | | | | | | | | | Remove subtitle selection code setting osd->ass_track directly and vf_ass/vf_vo code rendering the track directly with libass. Instead, do track selection and rendering with dec_sub.c functions. Before, mpctx->set_of_ass_tracks[] contained bare libass tracks generated from external subtitle files. For use with dec_sub.c, it now contains struct sh_sub instances with decoder already initialized. This commit breaks the sub_step command ('g' and 'y' keys) for libass-rendered subtitles. It could be fixed, but it's so useless - especially as with the existing implementation there's no practical way to get subtitle delay back to normal after using it - that I didn't bother. Conflicts: command.c mp_core.h mplayer.c
* subs: libass: use a single persistent renderer for subtitlesUoti Urpala2012-09-182-72/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To draw libass subtitles, the code used ASS_Renderer objects created in vf_vo (VO rendering) or vf_ass. They were destroyed and recreated together with the video filter chain. Change the code to use a single persistent renderer instance stored in the main osd_state struct. Because libass seems to misbehave if fonts are changed while a renderer exists (even if ass_set_fonts() is called on the renderer afterwards), the renderer is recreated after adding embedded fonts. The known benefits are simpler code and avoiding delays when switching between timeline parts from different files (libass fontconfig initialization, needed when creating a new renderer, can take a long time in some cases; switching between files rebuilds the video filter chain, and this required recreating the renderers). On the other hand, I'm not sure whether this could cause inefficient bitmap caching in libass; explicitly resetting the renderer in some cases could be beneficial. The new code does not keep the distinction of separate renderers for vsfilter munged aspect vs normal; this means that changing subtitle tracks can lose cache for the previous track. The new code always sets some libass parameters on each rendering call, which were previously only set if they had potentially changed. This should be harmless as libass itself has checks to see if the values differ from previous ones. Conflicts: command.c libmpcodecs/vf_ass.c libmpcodecs/vf_vo.c mplayer.c sub/ass_mp.c
* cleanup: remove pointless #definesUoti Urpala2012-09-182-4/+0
| | | | | | | | | | | | | | | | | | | | Remove the following #defines, which should never change in practice: CONFIG_FAKE_MONO, OUTBURST, FAST_OSD, FAST_OSD_TABLE The configure script hardcoded these to particular values in config.h. They could only be changed by manually editing it. I don't think anyone would want to. X11_FULLSCREEN This once did something, but became meaningless years ago and was now always set to true if the files using it were compiled at all. Conflicts: configure libvo/osd.c libvo/vo_gl.c Merged from mplayer2. The OSD defines were already removed in this fork.
* libaf: rename af_format.h to format.hwm42012-08-292-2/+2
| | | | | | | | | | af_format.h declares some symbols which are defined in format.c. The fact that af_format.c is a completely unrelated file is rather confusing. Having the header and implementation file use the same base name is more uniform. (af_format.c is the audio conversion filter, while af_format.h and format.c are about audio formats and their properties.) Also fix all source files which include this file.
* options, codecs.conf, img_format: unify imgfmt name handlingwm42012-08-293-99/+29
| | | | | | | | | | | | | Remove the duplication of image format name lists from codec-cfg.c and img_format.c. Remove the list of "long" image format names from img_format.c. One user visible change is that now mplayer won't print "long" format names anymore: e.g. instead of "Planar 420P 10-bit little-endian", the name "420p10le" is used. This is consistent with the names used by the option parser, and also less noisy. Partially based on mplayer2 commit f98e47574de15, with some differences.
* cleanup: remove XvMC remains, reformat img_format.cUoti Urpala2012-08-283-41/+33
| | | | | Remove remaining references to XvMC. It was already not supported; remove references to the imgfmt too. Reformat img_format.c.
* vf_dlopen: add a generic filter to load external filtersRudolf Polzer2012-08-233-0/+446
| | | | | | Usage: -vf dlopen=filename.so:args... Examples of such filters are provided in TOOLS/vf_dlopen/
* img_format, m_option: make image format name list globally availablewm42012-08-232-0/+111
| | | | And add functions for converting them from/to the name string.
* Adjust ffmpeg/libav #includes to work with recent upstream changesUoti Urpala2012-08-217-10/+17
| | | | | | | | The <libavutil/avutil.h> stopped including <libavutil/common.h> recursively in recent ffmpeg/libav git revisions. As a result, some files no longer got needed definitions, causing a build failure. Modify #include lines in various files to fix build with the latest versions of ffmpeg/libav headers.
* video: honor the video's colormatrix and color range flagscantabile2012-08-212-0/+11
| | | | | | If either of them is not defined, the old behavior is used: - the colormatrix is guessed based on resolution. - the color range is assumed to be tv aka limited range.
* vd_ffmpeg, demux_mng: allow general raw formats, fix MNG demuxerwm42012-08-201-7/+17
| | | | | | | | | | | | | | | Change vd_ffmpeg such that if sh_video->format is a mplayer pixel format, and there's no other codec information, try to play it as raw video. (The case of no codec information happens if the "generic" ffmpeg decoder is instantiated, which is tried last. This means clashes with actual existing formats are less likely.) demux_mng did not initialize all fields of the bih, which made vd_ffmpeg do invalid memory accesses when trying to copy the extradata. Also, use IMGFMT_RGB32 instead of creating the FourCC directly. (They should be the same, but what if mplayer changes the IMGFMT_* values.) This also fixes demux_rawvideo.
* libmpcodecs: remove redundant audio and video decoderswm42012-08-2021-4351/+0
| | | | | | | | Probably all of these are supported by libavcodec. Missing things can be added back. Also remove qtpalette.h. It was used by demux_mov.c, and should have been deleted with commit 1fde09db6f4ce.
* Remove support for libdvwm42012-08-205-262/+0
| | | | | This removes the libdv demuxer and audio/video decoders. FFmpeg has support for it, and it's even preferred over the internal decoders.
* Remove win32/qt/xanim/real binary codecs loadingwm42012-08-1614-3608/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the win32 loader - the win32 emulation layer, as well as the code for using DirectShow/DMO/VFW codecs. Remove loading of xanim, QuickTime, and RealMedia codecs. The win32 emulation layer is based on a very old version of wine. Apparently, wine code was copied and hacked until it was somehow able to load a limited collection of binary codecs. It poked around in the code segment of some known binary codecs to disable unsupported win32 API calls to make them work. Example from module.c: for (i=0;i<5;i++) RVA(0x19e842)[i]=0x90; // make_new_region ? for (i=0;i<28;i++) RVA(0x19e86d)[i]=0x90; // call__call_CreateCompatibleDC ? for (i=0;i<5;i++) RVA(0x19e898)[i]=0x90; // jmp_to_call_loadbitmap ? for (i=0;i<9;i++) RVA(0x19e8ac)[i]=0x90; // call__calls_OLE_shit ? for (i=0;i<106;i++) RVA(0x261b10)[i]=0x90; // disable threads Just to show how utterly insane this code is. You wouldn't want even your worst enemy to have to maintain this. In fact, it seems nobody made major changes to this code ever since it was committed. Most formats can be decoded by libavcodecs these days, and the loader couldn't be used on 64 bit platforms anyway. The same is (probably) true for the other binary codecs. General note about how support for win32 codecs could be added back: It's not possible to replace the win32 loader code by using wine as library, because modern wine can not be linked with native Linux programs for certain reasons. It would be possible to to move DirectShow video decoding into a separate process linked with wine, like the CoreAVC-for-Linux patches do. There is also the mplayer-ww fork, which uses the dshownative library to use DirectShow codecs on Windows.
* ad_ffmpeg: add sanity check against decoder overreadsUoti Urpala2012-08-161-2/+4
| | | | | | | The libavcodec Musepack SV8 decoder returned 2 bytes consumed for 1 byte input, which triggered a crash due to negative input packet size later. Add a sanity check to prevent crashes with this type of minor decoder overreads. Also add a check to parser consumed data.
* vf_expand: remove OSD supportwm42012-08-161-98/+1
| | | | | | | | It's not clear why this video filter supported OSD rendering. The manpage says: "Can be used for placing subtitles/OSD in the resulting black bands." But every single VO already does this if vf_expand adds black borders. This feature is 100% pointless.
* VO: remove old VO gluewm42012-08-071-2/+1
| | | | | | | This transition to a new VO API started over 4 years ago. It's time to finally end it, and get rid of the horrible hacks. Also removes some previously undetected dead code from spudec.c.
* vf_unsharp: direct rendering fixesmplayer-svn2012-08-031-5/+5
| | | | | | | | | | | | | | | | | | unsharp: actually process the frame we got. Previously it would always process the last frame allocated, but that might be a different one than the one first returned. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34975 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar Request a sufficiently large image for direct rendering. Fixes broken video near the borders. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34979 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: ib
* vf_ass: use correct height when copying imagewm42012-08-031-1/+1
| | | | | | | The target image can be larger than the image size the video filter was configured for. Based on mplayer-svn commit 34973.
* vf_ass: request a sufficiently large image for direct renderingmplayer-svn2012-08-031-1/+3
| | | | | | | | | | | | Request a sufficiently large image for direct rendering. Due to alignment and similar, we might need a buffer larger than the output of the ASS filter. Fixes out of bound writes and/or broken video near the borders. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34970 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* ad_mad: cleanupsmplayer-svn2012-08-031-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | Remove unnecessary casts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34827 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34828 b3059339-0415-0410-9bf9-f77b7e298cf2 libmad: set i_bps only if it is not already set. Since that value is only based on the very first MP3 frame, it is very likely to be much less accurate than any existing value from a demuxer. Patch by Benoît Thébaudeau. Signed-off-by: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34829 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* vf_spp, vf_fspp: replace use of deprecated libav functionmplayer-svn2012-08-032-2/+2
| | | | | | | Replace use of deprecated dsputil_init() by ff_dsputil_init(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34816 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: diego
* vf_uspp: fix possible crash when the output format is Y8mplayer-svn2012-08-031-0/+2
| | | | | | | | Fix possible crash when using -vf uspp,format=y8 i.e. the destination format is Y8. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34805 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* vf.c: increase default alignment valuesmplayer-svn2012-08-031-4/+3
| | | | | | | | | Adjust MPlayer default alignment values to match FFmpeg's. Fixes "stride changed" errors when using e.g. MPEG-2 decoder with -vf unsharp. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34753 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* dec_audio: add sanity check against 0 channelsmplayer-svn2012-08-031-0/+2
| | | | | | | | Add a safeguard to avoid crash if the decoder e.g. claims 0 channels. That would be a decoder bug, but an extra check can still help. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34738 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* vf_yadif: fix green bottom linemplayer-svn2012-08-031-2/+13
| | | | | | | | | | | | Fix green bottom line on yadif with certain parity. This implementation of the filter method needs a padding, that mplayer allocates but never fills with data. Do the padding properly and tweak the height alignment to even number of lines, instead of rounding to 32. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34691 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: iive
* libmpcodecs: use 128 instead of 64 to define non-native RGB image formatsmplayer-svn2012-08-031-16/+16
| | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34659 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: cehoyos
* libmpcodecs: add support for 422P9mplayer-svn2012-08-034-0/+10
| | | | | | | For some reason only 9-bit 422 wasn't added before. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34524 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* vf_expand: add sanity checksmplayer-svn2012-08-031-1/+20
| | | | | | | | | | Make vf expand more picky: refuse operating on compressed or hwaccel formats and fix up offsets that would cause color corruption for YUV formats with downsampled chroma. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34356 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* mp_image: set chroma_x_shift for 1-plane YUV formatsmplayer-svn2012-08-031-0/+1
| | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34355 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* libmpcodecs: add ad_spdif.c, S/PDIF passthrough decodermplayer-svn2012-08-032-0/+312
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | patch by Naoya OYAMA, naoya.oyama gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34191 b3059339-0415-0410-9bf9-f77b7e298cf2 fix ad_spdif Call av_register_all() before initialising the SPDIF muxer. Fixes playback with -demuxer mpegts -ac spdifac3. Patch by Naoya OYAMA, naoya D oyama gmail git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34291 b3059339-0415-0410-9bf9-f77b7e298cf2 Use new API avformat_new_stream() instead of the deprecated av_new_stream(). Patch by Naoya OYAMA, naoya D oyama gmail git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34292 b3059339-0415-0410-9bf9-f77b7e298cf2 Cosmetics: Remove empty statement. Patch by Naoya OYAMA, naoya D oyama gmail git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34293 b3059339-0415-0410-9bf9-f77b7e298cf2 Use init_avformat() instead of av_register_all(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34294 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: diego
* vf_stereo3d.c: half-width side-by-side formats for stereo3dmplayer-svn2012-08-031-0/+16
| | | | | | | | | Half-width side-by-side formats for stereo3d. Patch by Steaphan Greene [sgreene cs.binghamton.edu] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33877 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* Remove teletext supportwm42012-08-032-2036/+0
| | | | | | | | Teletext requires special OSD support. Because I can't even test teletext, I can't restore support for it. Since teletext can be considered ancient and obscure, and since it doesn't make sense to keep the remaining teletext code without being able to use it, I'm removing it.
* VO: remove VO direct renderingwm42012-08-021-1/+1
| | | | | | | | | | | | | | | | | | | This was disabled by default, and could be enabled with -dr. It was disabled by default because it was buggy: there were issues with OSD corruption. It wasn't entirely sane for OpenGL based VOs either. OpenGL can chose to drop mapped pixel buffer objects, requiring the application to map and fill the buffer again. But there was no mechanism in mplayer to fill the lost buffer again. (It seems this rarely happened in practice, though.) On the other side, users liked the --dr flag, because it promised them more speed. I'm not sure if it actually helped with speed, but it's unlikely it had any real advantages on modern systems. In order to evade the --dr cargo culting in mplayer config files, it's best to get rid of it.
* vf: remove VFCAP_FLIPPED and VFCAP_CONSTANTwm42012-08-023-18/+1
| | | | These were unused.
* Remove dead codewm42012-08-015-32/+0
| | | | | | | | | | | | | This was done with the help of callcatcher [1]. Only functions which are statically known to be unused are removed. Some unused functions are not removed yet, because they might be needed in the near future (such as open_output_stream for the encode branch). There is one user visible change: the --subcc option did nothing, and is removed with this commit. [1] http://www.skynet.ie/~caolan/Packages/callcatcher.html
* Change <endian.h> include to <sys/types.h>wm42012-07-315-5/+5
| | | | | This seems to be more portable. Should fix compilation on OSX and FreeBSD. Apparently also works on MinGW-w64.
* configure: remove checks for malloc.h and alloca()wm42012-07-308-30/+0
| | | | | | | | Including <malloc.h>, especially if all you want is malloc(), has no legitimate uses (on sane platforms at least). Remove the check for it, and remove all uses in the code. Remove unused check for alloca().
* Remove some demuxers and decoderswm42012-07-3012-2601/+0
| | | | | | | | | | | | | | | | | | Most of these demuxers and decoders are provided in better form by libav, while the mplayer builtin ones are essentially unmaintained. The only legimitate use case for not using the libav ones was working around libav bugs or bugs related to the way mplayer uses libav. Instead of trying to keep dead code alive, development effort should go into improving libav or the mplayer libav glue code. Note that the libav demuxer have been preferred over the mplayer builtin ones for a while in mplayer2. There were some exceptions: playing DVDs with dvdnav or playing network sources. (That's because some stream modules and network.c requested explicit file formats, such as DEMUXER_TYPE_MPEG_PS, which mapped to builtin demuxers.) With this commit, they are switched to use libav. One caveat is that the request