summaryrefslogtreecommitdiffstats
path: root/libaf
Commit message (Collapse)AuthorAgeFilesLines
* Rename directories, move files (step 1 of 2) (does not compile)wm42012-11-1241-12756/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tis drops the silly lib prefixes, and attempts to organize the tree in a more logical way. Make the top-level directory less cluttered as well. Renames the following directories: libaf -> audio/filter libao2 -> audio/out libvo -> video/out libmpdemux -> demux Split libmpcodecs: vf* -> video/filter vd*, dec_video.* -> video/decode mp_image*, img_format*, ... -> video/ ad*, dec_audio.* -> audio/decode libaf/format.* is moved to audio/ - this is similar to how mp_image.* is located in video/. Move most top-level .c/.h files to core. (talloc.c/.h is left on top- level, because it's external.) Park some of the more annoying files in compat/. Some of these are relicts from the time mplayer used ffmpeg internals. sub/ is not split, because it's too much of a mess (subtitle code is mixed with OSD display and rendering). Maybe the organization of core is not ideal: it mixes playback core (like mplayer.c) and utility helpers (like bstr.c/h). Should the need arise, the playback core will be moved somewhere else, while core contains all helper and common code.
* Replace fast_memcpy() useswm42012-11-112-6/+4
| | | | | | | fast_memcpy, defined in fastmemcpy.h, used to be mplayer's "optimized" memcpy. It has been removed from this fork, and fast_memcpy has been reduced to an alias for memcpy. Replace all remaining uses of the fast_memcpy macro alias.
* uncrustify af.hStefano Pigozzi2012-11-021-76/+77
| | | | used `uncrustify -l C -c TOOLS/uncrustify.cfg --no-backup --replace libaf/af.h`
* audio: untypedef af_streamStefano Pigozzi2012-11-022-29/+28
|
* audio: untypedef af_cfgStefano Pigozzi2012-11-023-5/+5
|
* audio: untypedef af_instanceStefano Pigozzi2012-11-0226-152/+151
|
* audio: untypedef af_infoStefano Pigozzi2012-11-0225-53/+52
|
* audio: untypedef af_data and rename it to mp_audioStefano Pigozzi2012-11-0227-190/+189
| | | | this is to have something specular to mp_image
* af_hrtf: clamp output to relieve noisesupsuper2012-10-311-4/+5
| | | | | | | | This patch relieves noises from af_hrtf by using av_clip_* instead of casting directly. There are still some noises, which indicates other bugs inside this filter. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35304 b3059339-0415-0410-9bf9-f77b7e298cf2
* af_scaletempo: reset latency info when reconfiguringUoti Urpala2012-10-281-0/+3
| | | | | | | | af_scaletempo kept outdated values in the af->delay field after reconfiguration until some audio was fed through the filter. This could affect audio sync code after a playback speed change. Additionally, in the special case speed=1 the code did not set the af->mul field at all. Initialize both fields after reconfiguration.
* Rename to "mpv"wm42012-10-121-2/+2
| | | | | | | | | | | | | | | | | | This changes the name of this project to mpv. Most user-visible mentions of "MPlayer" and "mplayer" are changed to "mpv". The binary name and the default config file location are changed as well. The new default config file location is: ~/.mpv/ Remove etc/mplayer.desktop. Apparently this was for the MPlayer GUI, which has been removed from mplayer2 ages ago. We don't have a logo, and the MS Windows resource files sort-of require one, so leave etc/mplayer.ico/.xpm as-is. Remove the debian and rpm packaging scripts. These contained outdated dependencies and likely were more harmful than useful. (Patches which add working and well-tested packaging are welcome.)
* rawaudio: use mplayer audio format for format optionwm42012-09-182-1/+8
| | | | | | | | | | | | | | | 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.)
* libaf: rename af_format.h to format.hwm42012-08-292-1/+1
| | | | | | | | | | 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, libaf: unify audio format name handlingwm42012-08-293-63/+28
| | | | | | | | | Remove the duplicated list of audio format names from m_option.c. Remove "long" audio format names, and let af_fmt2str() print the usual short format names. The long names were overly verbose, and were actually rarely user visible. The only difference between af_fmt2str() and af_fmt2str_short() is that the former prints unknown format values as hexadecimal string as fallback.
* af_scaletempo: fix crash on channel reconfigurationwm42012-08-261-0/+6
| | | | | | | | | | | | | | | | | | This crash happened when audio channels were reconfigured from 6 channels to 2, and playback speed was set to 2. The crash is caused by passing a negative size to memcpy. It appears reinitialization doesn't clear the buffer. As the result, the buffer can be larger as the maximum buffer size, i.e. the invariant bytes_queued <= bytes_queue is violated. Fix this by resetting the buffer length on reconfiguring (set the bytes_queued vairable to 0). Also reset some other state for clarity and robustness, although these changes aren't strictly needed for avoiding the actual crash. This may also get rid of some noise played right after reinitialization, as the re-used buffer was in the wrong audio format.
* Adjust ffmpeg/libav #includes to work with recent upstream changesUoti Urpala2012-08-211-0/+1
| | | | | | | | 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.
* reorder_ch: support reordering 8 channels to AAC layoutmplayer-svn2012-08-031-0/+19
| | | | | | | | | | | | | | | | This will allow us to encode 7.1 audio AAC. 7.1 audio not being really popular, instead of creating a new re_order function, I'm using 2 functions for the re_ordering from L R Ls Rs C LFE Rls Rrs --> C L R Ls Rs Rls Rrs LFE Patch by Thierry Foucu [tfoucu gmail] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34877 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: ranma http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2012-April/070252.html
* AF: remove af_statswm42012-08-032-161/+0
| | | | This was not very useful.
* af: some spelling/grammar fixesmplayer-svn2012-08-031-3/+3
| | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34349 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* af_lavcac3enc: remove pointless castsmplayer-svn2012-08-031-5/+5
| | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34348 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* af: fix crash on invalid channel countmplayer-svn2012-08-031-0/+4
| | | | | | | | | | Sanitize channel count for libaf to avoid crashes since it is used unchecked. af_downmix is an example of a function that can/will crash for invalid values. 0 is not invalid since it is used as "autodetect" for output. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34342 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* libmpcodecs: add ad_spdif.c, S/PDIF passthrough decodermplayer-svn2012-08-032-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* AF: remove af_gate and af_compwm42012-08-023-336/+0
| | | | | | | To quote the manpage: "This filter is untested, maybe even unusable." And it seems they were never touched again after it was added many years ago (except for cosmetic changes). Just get rid of them.
* Remove dead codewm42012-08-014-149/+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-312-2/+2
| | | | | This seems to be more portable. Should fix compilation on OSX and FreeBSD. Apparently also works on MinGW-w64.
* Remove compile time/runtime CPU detection, and drop some platformswm42012-07-302-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge remote-tracking branch 'origin/master' into my_masterwm42012-03-051-14/+12
|\ | | | | | | | | | | Conflicts: mplayer.c screenshot.c
| * build: switch to libavutil bswap.h and intreadwrite.hUoti Urpala2012-02-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Remove the private bswap and intreadwrite.h implementations and use libavutil headers instead. Originally these headers weren't publicly installed by libavutil at all. That already changed in 2010, but the pure C bswap version in installed headers was very inefficient. That was recently (2011-12) improved and now using the public bswap version probably shouldn't cause noticeable performance problems, at least if using a new enough compiler.
| * Update Libav API usesUoti Urpala2012-02-011-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change various code to use the latest Libav API. The libavcodec error_recognition setting has been removed and replaced with different semantics. I removed the "--lavdopts=er=<value>" option accordingly, as I don't think it's widely enough used to be worth attempting to emulate the old option semantics using the new API. A new option with the new semantics can be added later if needed. Libav dropped APIs that were necessary with all Libav versions until quite recently (like setting avctx->age), and it would thus not be possible to keep compatibility with previous Libav versions without adding workarounds. The new APIs also had some bugs/limitations in the recent Libav release 0.8, and it would not work fully (at least some avcodec options would not be set correctly). Because of those issues, this commit makes no attempt to maintain compatibility with anything but the latest Libav git head. Hopefully the required fixes and improvements will be included in a following Libav point release.
* | Merge branch 'softvol' into my_masterwm42012-01-181-1/+43
|\ \ | |/ |/|
| * af: fix crash when trying to use volume controls with AC3 pass-throughwm42012-01-181-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changing the volume when softvol is enabled or if the audio output driver doesn't support volume controls causes insertion of the "volume" filter. This fails with AC3. Since the filter wasn't removed after that, and the filter chain was in a bogus state, random crashes occured past this point. Fix it by reinitializing the filter chain completely on failure. Volume controls simply won't work. (This can't be fixed, because AC3 is a compressed format, and would require additional decoding/encoding passes in order to support arbitrary volume changes.) This also affects balance controls.
| * af: print audio filter chain in verbose modewm42012-01-181-0/+35
| | | | | | | | The string format used in print_fmt() is taken from init_audio_filters().
* | af_volume: do not change data when volume is 1wm42012-01-161-5/+4
|/ | | | | | | | | | | When the volume multiplier is 1, the data shouldn't be changed, but the code actually multiplied each sample with 255/256. Change the factor to 256, and hope there wasn't a good reason for the value 255. Additionally, don't work on the data if it wouldn't be changed anyway. This is a micro-optimization. This doesn't touch the code path for the float format.
* configure, build: remove --disable-libav supportUoti Urpala2011-12-111-7/+1
| | | | | Remove support for building the player without libavcodec and libavformat. These libraries are now always required.
* cleanup: do libav* initialization on startupUoti Urpala2011-07-181-3/+0
| | | | | | | Do the global initialization of libavcodec and libavformat (avcodec_register_all(), av_register_all()) immediately on program startup and remove the initialization calls from various individual modules that use libavcodec/libavformat functionality.
* cleanup: silence most of the clang warningsClément Bœsch2011-07-091-1/+1
|
* audio: clamp sample values in float->int format conversionsRudolf Polzer2011-05-041-4/+4
| | | | | | | | | Make af_format clamp float sample values to the range [-1, 1] before conversion to integer types. Before any out-of-range values wrapped around and caused nasty artifacts. This filter is used for all automatic format conversions; thus any decoder that outputs floats with possible out-of-range values would have been affected by the bad conversion if its output needed to be converted to integers for AO.
* cleanup: avoid various GCC warningsClément Bœsch2011-04-202-13/+14
|
* af_lavcac3enc: fix channel reorderingUoti Urpala2011-03-311-2/+3
| | | | | | Reordering to libavcodec channel order was broken with libavcodec versions using float input to the ac3 encoder because the reordering code still assumed int16 sample size. Fix.
* fix compilation with old FFmpeg versionsUoti Urpala2011-02-081-4/+5
| | | | | | | | | | | | af_lavcac3enc: use old SampleFormat names without AV_ prefix, the latter were only added in 2010-11 vd_ffmpeg: add ifdef around CODEC_ID_LAGARITH use demux_real: use ffmpeg_files/intreadwrite.h stream/http.c, stream/realrtsp/real.c: define AV_BASE64_SIZE macro for old libavutil versions lacking it
* af_lavcac3enc: fix for lavc AC-3 encoder change to float inputUoti Urpala2011-02-031-5/+26
| | | | | | | | | | | | | | | | The libavcodec AC-3 encoder was changed to use floats, and take floating point samples as input (the fixed-point version is still available under the new name "ac3_fixed"). This broke af_lavcac3enc because it blindly assumed without checking that the "ac3" encoder would take signed 16-bit integer samples. Improve af_lavcac3enc so that it checks the sample formats supported by the encoder and can handle either int16_t or float. Perhaps an option to keep using integer input but instead switch the encoder name to "ac3_fixed" for new libavcodec versions would have some value. Then again, maybe not. Using the preferred data format of the default "ac3" encoder should normally be best, so probably better not add such an option unless real need appears.
* cleanup: remove NULL checks before free() all over the codecboesch2010-11-1420-119/+51
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32624 b3059339-0415-0410-9bf9-f77b7e298cf2
* libaf: Make af_reinit "public", to allow using it in future patchesreimar2010-11-022-4/+8
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32504 b3059339-0415-0410-9bf9-f77b7e298cf2
* audio: auto-add downmix filter when stereo output is requestedcigaes2010-11-021-0/+25
| | | | | | | | | | When -channels 2 [default] is specified and the audio decoder used does not support internal downmixing, automatically add a pan filter after the decoder to downmix to stereo. Patch by Clément Bœsch, ubitux gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32356 b3059339-0415-0410-9bf9-f77b7e298cf2
* libaf: add opts pointer to struct af_streamUoti Urpala2010-11-021-0/+2
|
* af.c: Minor simplification of af_initreimar2010-11-021-5/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32347 b3059339-0415-0410-9bf9-f77b7e298cf2
* af.c: add "const" to af_append(), af_prepend() prototypesreimar2010-11-021-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32346 b3059339-0415-0410-9bf9-f77b7e298cf2
* build: enable/disable all FFmpeg libraries togetherUoti Urpala2010-11-021-3/+3
| | | | | | | | | Enable all of libavcodec, libavformat, libswscale, and libpostproc together (libavutil is always required). based on svn commit by diego: git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32226 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add central init_avcodec() to avoid duplicated libavcodec init codediego2010-11-021-7/+2
| | | | | | | | | | | | | | | | Patch by Vlad Seryakov, vseryakov gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32043 b3059339-0415-0410-9bf9-f77b7e298cf2 Refactor more instances of avcodec_initialized handling into init_avcodec(). This is a leftover from the previous commit. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32044 b3059339-0415-0410-9bf9-f77b7e298cf2 Add missing #include for vd_ffmpeg.h; fixes the warning: libmpcodecs/vf_zrmjpeg.c:472: warning: implicit declaration of function 'init_avcodec' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32176 b3059339-0415-0410-9bf9-f77b7e298cf2
* af_lavcresample: avoid multiple calls to av_resample_initreimar2010-11-021-2/+18
| | | | | | | | | | | | | Avoid calling av_resample_init again when the values are the same as before. The init function can be called multiple times when e.g. additional format filters are inserted, so this speeds things up. Patch by Dan Oscarsson [Dan.Oscarsson tieto com]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31698 b3059339-0415-0410-9bf9-f77b7e298cf2 Reindent. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31699 b3059339-0415-0410-9bf9-f77b7e298cf2
* af_export: Avoid void *-arithmentic warningsreimar2010-11-021-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31608 b3059339-0415-0410-9bf9-f77b7e298cf2
* af_ladspa: Fix multiple instances of a filter typereimar2010-11-021-3/+2
| | | | | | | | Ensure that activate is called on each filter instance, even if we have e.g. multiple mono filters handling a multichannel file. Fixes one of the bugs reported as bug #1685. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31558 b3059339-0415-0410-9bf9-f77b7e298cf2
* af_extrastereo: Improve filter descriptiondiego2010-11-021-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31544 b3059339-0415-0410-9bf9-f77b7e298cf2
* af_lavcac3enc: fix assert failure "s->expect_len <= s->pending_data_size"Uoti Urpala2010-10-141-11/+11
| | | | | | | The code handling input format negotiation incorrectly used the bps value of the suggested input format instead of the format it was going to actually use. As a result the player could abort with the above assertion failure. Fix.
* af_lavcac3enc: actually enable the filter by defaultUoti Urpala2