summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
Commit message (Collapse)AuthorAgeFilesLines
* 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 requested format is not passed to libavformat, instead we rely on the auto probing to select the correct libav demuxer (see code in demux_open_stream()).
* mplayer: remove benchmarking/CPU accounting codewm42012-07-301-18/+1
| | | | | | | | | | The code used for benchmarking and showing CPU stats in the status line was inaccurate, misleading and fragile. The final nail in the coffin is the fact that many libav decoders are multithreaded now, and mplayer couldn't possibly measure the CPU time consumed by them. Add the --untimed option. This makes the video untimed, just like --benchmark did (still requires disabling audio synchronization).
* libmpcodecs: silence lines reading "AUDIO:" and "VIDEO:"wm42012-07-302-2/+2
| | | | | Both of these are not very interesting, and redundant with the corresponding VO/AO initialization messages.
* vd: silence output about aspect ratiowm42012-07-301-1/+1
| | | | Uninteresting.
* vf_scale: don't pass CPU flags anymorewm42012-07-305-18/+6
| | | | | | libav detects them automatically. Also fix a bunch of other VFs, which use the get_sws_cpuflags() function defined by vf_scale.c.
* Rip out 3DNOW supportwm42012-07-308-78/+4
| | | | | | | | Ancient AMD specific enhancement to the MMX instruction set. Officually discontinued by AMD. Note that support for this was already disabled in the previous commit. This commit removes the actual code.
* Remove compile time/runtime CPU detection, and drop some platformswm42012-07-306-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mplayer had three ways of enabling CPU specific assembler routines: a) Enable them at compile time; crash if the CPU can't handle it. b) Enable them at compile time, but let the configure script detect your CPU. Your binary will only crash if you try to run it on a different system that has less features than yours. This was the default, I think. c) Runtime detection. The implementation of b) and c) suck. a) is not really feasible (it sucks for users). Remove all code related to this, and use libav's CPU detection instead. Now the configure script will always enable CPU specific features, and disable them at runtime if libav reports them not as available. One implication is that now the compiler is always expected to handle SSE (etc.) inline assembly at runtime, unless it's explicitly disabled. Only checks for x86 CPU specific features are kept, the rest is either unused or barely used. Get rid of all the dump -mpcu, -march etc. flags. Trust the compiler to select decent settings. Get rid of support for the following operating systems: - BSD/OS (some ancient BSD fork) - QNX (don't care) - BeOS (dead, Haiku support is still welcome) - AIX (don't care) - HP-UX (don't care) - OS/2 (dead, actual support has been removed a while ago) Remove the configure code for detecting the endianness. Instead, use the standard header <endian.h>, which can be used if _GNU_SOURCE or _BSD_SOURCE is defined. (Maybe these changes should have been in a separate commit.) Since this is a quite violent code removal orgy, and I'm testing only on x86 32 bit Linux, expect regressions.
* ad_faad: include neaacdec.h instead of faad.hwm42012-07-281-1/+1
| | | | | The faad.h header printed a warning that this header is outdated. The header neaacdec.h is probably the proper header, so use that.
* bstr: rename bstr() function to bstr0(), and typedef bstr to struct bstrwm42012-07-281-1/+1
| | | | | Replace all uses of bstr() with bstr0(). Also remove the ridiculous C++ workaround.
* osd: use libass for OSD renderingwm42012-07-282-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The OSD will now be rendered with libass. The old rendering code, which used freetype/fontconfig and did text layout manually, is disabled. To re-enable the old code, use the --disable-libass-osd configure switch. Some switches do nothing with the new code enabled, such as -subalign, -sub-bg-alpha, -sub-bg-color, and many more. (The reason is mostly that the code for rendering unstyled subtitles with libass doesn't make any attempts to support them. Some of them could be supported in theory.) Teletext rendering is not implemented in the new OSD rendering code. I don't have any teletext sources for testing, and since teletext is being phased out world-wide, the need for this is questionable. Note that rendering is extremely inefficient, mostly because the libass output is blended with the extremely strange mplayer OSD format. This could be improved at a later point. Remove most OSD rendering from vo_aa.c, because that was extremely hacky, can't be made work with osd_libass, and didn't work anyway in my tests. Internally, some cleanup is done. Subtitle and OSD related variable declarations were literally all over the place. Move them to sub.h and sub.c, which were hoarding most of these declarations already. Make the player core in mplayer.c free of concerns like bitmap font loading. The old OSD rendering code has been moved to osd_ft.c. The font_load.c and font_load_ft.c are only needed and compiled if the old OSD rendering code is configured.
* Merge remote-tracking branch 'origin/master'wm42012-07-287-66/+122
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .gitignore bstr.c cfg-mplayer.h defaultopts.c libvo/video_out.c The conflict in bstr.c is due to uau adding a bstr_getline function in commit 2ba8b91a97e7e8. This function already existed in this branch. While uau's function is obviously derived from mine, it's incompatible. His function preserves line breaks, while mine strips them. Add a bstr_strip_linebreaks function, fix all other uses of bstr_getline, and pick uau's implementation. In .gitignore, change vo_gl3_shaders.h to use an absolute path additional to resolving the merge conflict.
| * vd_vfw.c: fix part missing from previous commitUoti Urpala2012-07-261-2/+3
| | | | | | | | | | | | vd_vfw.c was missing a change to rename field used from 'flags' to 'keyframe'. This broke compilation with 32-bit Windows codec support enabled.
| * demux, vd_ffmpeg: fix demux keyframe flag, set AV_PKT_FLAG_KEYUoti Urpala2012-07-251-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was some confusion about the "flags" field in demuxer packets. Demuxers set it to either 1 or 0x10 to indicate a keyframe (and the field was not used to indicate anything else). This didn't cause visible problems because nothing read the value. Replace the "flags" field with a boolean "keyframe" field. Set AV_PKT_FLAG_KEY based on this field in packets fed to libavcodec video decoders (looks like PNG and ZeroCodec are the only ones which depend on values from demuxer; previously this was hardcoded to true for PNG). Make demux_mf set the keyframe field in every packet. This matters for PNG files now that the demuxer flag is forwarded to libavcodec. Fix logic setting the field in demux_mkv. It had probably not been updated when adding SimpleBlock support. This probably makes no difference for any current practical use.
| * video, audio: use lavc decoders without codecs.conf entriesUoti Urpala2012-07-246-62/+115
| | | | | | | | | | | | | | | | | | | | | | | | | |